Re: [RFC] I/O and Buffer Range

2013-12-30 Thread Dmitry Olshansky
30-Dec-2013 02:45, Vladimir Panteleev пишет: On Sunday, 29 December 2013 at 22:02:57 UTC, Dmitry Olshansky wrote: [snip] Hmm, just yesterday I was rewriting a parser to use a buffer instead of loading the whole file in memory, so this is quite timely for me. Questions: 1. What happens when t

Re: [RFC] I/O and Buffer Range

2013-12-30 Thread Dmitry Olshansky
30-Dec-2013 09:29, Marco Leise пишет: Am Sun, 29 Dec 2013 22:45:35 + schrieb "Vladimir Panteleev" : [snip] 2. I don't understand the rationale behind the current semantics of lookahead/lookbehind. If you want to e.g. peek ahead/behind to find the first whitespace char, you don't know how m

Re: Bypassing the postblit?

2013-12-30 Thread Ritu
Nope. What you are asking for is basically a default constructor, which D does not provide. Ok. Now I get why preblit can not be there. Now how about postblit making both the source and target struct instance available? D makes only target object available. Is there a limitation why both so

Re: Go compiler moving from C to Go

2013-12-30 Thread Joseph Rushton Wakeling
On Sunday, 29 December 2013 at 21:26:33 UTC, CJS wrote: A variation of that is what numpy and Eigen use. In numpy, for the array class '*' is element-wise by default and the function np.dot is matrix multiplication. For Eigen '*' is matrix multiplication by default while the (member) function cwi

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Dicebot
On Monday, 30 December 2013 at 06:42:56 UTC, Andrei Alexandrescu wrote: If it is you judgement, let it be so. I prefer to start working on implementation whatever it is as opposed to endless discussion. What is your opinion about defining general guideline to use packs over nested templates for

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Jakob Ovrum
On Sunday, 29 December 2013 at 21:41:48 UTC, Dicebot wrote: Of course because we have damn nothing in our template algorithm set. Those are just basics. If stuff goes as planned std.meta.* will have template alternatives of almost all stuff from std.range and std.algorithm. Any function from th

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Jakob Ovrum
On Monday, 30 December 2013 at 03:44:49 UTC, Andrei Alexandrescu wrote: Template arguments lists are what they are - entities that can be passed to templates. Aliasing them is sensible but creating values thereof does not make sense. That's very confusing. Declaring an expression list from a t

Re: Cross referencing in Ddoc

2013-12-30 Thread Jakob Ovrum
On Sunday, 29 December 2013 at 17:38:55 UTC, Jacob Carlborg wrote: If nothing has happened recently the current situation of cross referencing in Ddoc sucks. What's currently being used in the Phobos documentation is the XREF, CXREF and ECXREF ddoc macros. These macros take two arguments, appen

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 05:05, H. S. Teoh wrote: Not only so, even without cross-referencing, the way Ddoc currently does referencing *within* a module is faulty, because it does not take symbols declared in nested scopes into account. For example: module mymodule; /// docs here

Re: Cross referencing in Ddoc

2013-12-30 Thread Dmitry Olshansky
30-Dec-2013 14:19, Jacob Carlborg пишет: On 2013-12-30 05:05, H. S. Teoh wrote: Not only so, even without cross-referencing, the way Ddoc currently does referencing *within* a module is faulty, because it does not take symbols declared in nested scopes into account. For example: module mym

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-29 19:35, Sönke Ludwig wrote: This is done for the DDOX based docs that were supposed to end up on the home page at some point: BTW, although DDOX seems to be the best solution currently. It still feels like a workaround for something that should be fixed in the compiler. -- /Jac

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 10:43, Jakob Ovrum wrote: bootDoc[1] fixes this (thanks to Denis) with a number of standard macros that are reasonably easy to use[2]. Based on the documentation it looks like it has the same problems as the current approach, that is: * Multiple macros are needed for something

Re: Microsoft working on new systems language

2013-12-30 Thread bearophile
Barry L.: Just saw this: http://joeduffyblog.com/2013/12/27/csharp-for-systems-programming/ A little more info: https://plus.google.com/+AleksBromfield/posts/SnwtcXUdoyZ http://www.reddit.com/r/programming/comments/1tzk5j/the_m_error_model/ From the article: our language has excellent supp

Re: Bypassing the postblit?

2013-12-30 Thread monarch_dodra
On Monday, 30 December 2013 at 08:15:21 UTC, Ritu wrote: Nope. What you are asking for is basically a default constructor, which D does not provide. Ok. Now I get why preblit can not be there. Now how about postblit making both the source and target struct instance available? D makes only t

Re: Cross referencing in Ddoc

2013-12-30 Thread Jakob Ovrum
On Monday, 30 December 2013 at 10:23:25 UTC, Jacob Carlborg wrote: Based on the documentation it looks like it has the same problems as the current approach, that is: Yep, its only benefit is that it's a standardized set of macros and works for any reasonably deep hierarchy. bootDoc is about

Re: Microsoft working on new systems language

2013-12-30 Thread JN
I'm kind of an outsider to this discussion, but take a look how many games are written using GC-languages, Minecraft is written in Java, Terraria in C# and all Unity3D games use Mono underneath (usually C#). And these languages don't allow you to use malloc even if you wanted to (you can do some o

Re: Bypassing the postblit?

2013-12-30 Thread Ritu
Why would you want access to the original struct though, if you have a bit for bit copy? The *only* reason I could imagine, is to *mutate* the original struct... Yes. That way I could make sure that the class object in the struct gets lazily initialized to the same object in both the source

Re: Bypassing the postblit?

2013-12-30 Thread Benjamin Thaut
Am 30.12.2013 12:26, schrieb Ritu: Yes. That way I could make sure that the class object in the struct gets lazily initialized to the same object in both the source and the copied struct instance. So in the appender example you earlier gave, both app1 and app2 can have the same internal object.

Re: Bypassing the postblit?

2013-12-30 Thread Ritu
But then the source object may not be mutable. I am not a compiler expert, but could a special case be made in D compiler for the cases where the source struct instance is mutable and is made available to ease such lazy initialization? I am suggesting a DIP here. Could the postblit take tw

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 11:24, schrieb Jacob Carlborg: > On 2013-12-29 19:35, Sönke Ludwig wrote: > >> This is done for the DDOX based docs that were supposed to end up on the >> home page at some point: > > BTW, although DDOX seems to be the best solution currently. It still > feels like a workaround for

Re: Bypassing the postblit?

2013-12-30 Thread Ritu
As I already said, the solution is another level of indirection. Well, I do not have a possibility of another level of indirection. I am working on a DSL embedded in D. My biggest gripe with D is that it does not let me create a struct that gives the end user a feeling of native data type.

Re: Microsoft working on new systems language

2013-12-30 Thread bearophile
JN: take a look how many games are written using GC-languages, Minecraft is written in Java, Terraria in C# But the Oracle JVM has a GC (more than one) way better then the current D one :-) Bye, bearophile

Re: Microsoft working on new systems language

2013-12-30 Thread develop32
On Monday, 30 December 2013 at 11:23:22 UTC, JN wrote: I'm kind of an outsider to this discussion, but take a look how many games are written using GC-languages, Minecraft is written in Java, Terraria in C# and all Unity3D games use Mono underneath (usually C#). And these languages don't allow

Accessing vtable, initialiser, etc symbols from debug (gdb)

2013-12-30 Thread Iain Buclaw
Hi. I've fixed up the D demangler in gdb with one or two hicks left to address. As the below auto-complete feature presents, the full function signatures are now shown. (gdb) break 'gdbstress.testsig( gdbstress.testsig(double) gdbstress.testsig(float) gdbstress.testsig(real) Currently, I h

Re: readln() returns new line charater

2013-12-30 Thread Regan Heath
On Sat, 28 Dec 2013 17:42:23 -, Jakob Ovrum wrote: On Saturday, 28 December 2013 at 17:23:30 UTC, Jeroen Bollen wrote: Usually if you're working with a console though the input stream won't exhaust and thus the blocking 'readln' would be a better option, no? The blocking behaviour of

Re: [RFC] I/O and Buffer Range

2013-12-30 Thread Marco Leise
Am Mon, 30 Dec 2013 12:08:18 +0400 schrieb Dmitry Olshansky : > 30-Dec-2013 09:29, Marco Leise пишет: > > Am Sun, 29 Dec 2013 22:45:35 + > > schrieb "Vladimir Panteleev" : > > > >> [snip] > >> > >> 2. I don't understand the rationale behind the current semantics > >> of lookahead/lookbehind. I

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 12:39, Sönke Ludwig wrote: Although I think that it is more important to have a well defined documentation format that can be processed by external tools, it would indeed be much nicer if for example DMD could automatically emit $(XREF ...) or similar for recognized symbol names. A

Re: Microsoft working on new systems language

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 12:23, JN wrote: I'm kind of an outsider to this discussion, but take a look how many games are written using GC-languages, Minecraft is written in Java, Terraria in C# and all Unity3D games use Mono underneath (usually C#). And these languages don't allow you to use malloc even if

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 11:26, Jakob Ovrum wrote: Yep, its only benefit is that it's a standardized set of macros and works for any reasonably deep hierarchy. Not as far as I can see. What I can see it only supports one level of packages. That means basically a flat hierarchy like Phobos. All of my pr

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 13:47, schrieb Jacob Carlborg: > On 2013-12-30 12:39, Sönke Ludwig wrote: > >> Although I think that it is more important to have a well defined >> documentation format that can be processed by external tools, it would >> indeed be much nicer if for example DMD could automatically em

Re: Accessing vtable, initialiser, etc symbols from debug (gdb)

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 13:24, Iain Buclaw wrote: However I'm not sure if the names are sufficient, and whether or not they should really be prefixed with a double underscore to ensure that they don't conflict with user-declared members (especially the compiler-generated symbols). I think they should ha

Re: Bypassing the postblit?

2013-12-30 Thread monarch_dodra
On Monday, 30 December 2013 at 11:42:52 UTC, Ritu wrote: As I already said, the solution is another level of indirection. Well, I do not have a possibility of another level of indirection. I am working on a DSL embedded in D. My biggest gripe with D is that it does not let me create a struc

Re: readln() returns new line charater

2013-12-30 Thread Jakob Ovrum
On Monday, 30 December 2013 at 12:36:15 UTC, Regan Heath wrote: Cue "empty vs null" theme music.. Empty vs null is not a factor here. It returns a string containing the line terminator(s) for an empty line, but an empty string (incidentally non-null) if the file is closed.

Re: Microsoft working on new systems language

2013-12-30 Thread ponce
On Monday, 30 December 2013 at 10:27:43 UTC, bearophile wrote: http://www.reddit.com/r/programming/comments/1tzk5j/the_m_error_model/ As compared with D: - unrecoverable errors crash immediately like they should. I like it since the most sensible reason to catch Error in D is to crash anyway

Re: Reserving/Preallocating associative array?

2013-12-30 Thread Daniel Kozak
On Saturday, 28 December 2013 at 20:20:36 UTC, Benjamin Thaut wrote: Because I was always curious to do some hashmap profiling with real data, I did some more. Here are the results: My implementation. Power of two size (25% free): building hashmap: 8 seconds 28880605 ticks looking entries up: 0

Re: Microsoft working on new systems language

2013-12-30 Thread Peter Alexander
On Monday, 30 December 2013 at 00:08:10 UTC, Ola Fosheim Grøstad wrote: On Sunday, 29 December 2013 at 23:58:34 UTC, Andrei Alexandrescu wrote: Then don't use the GC. I agree! Thus: any language that makes it hard to not use the GC is not competing with C++ as a performant language. ;-] Go

Re: Microsoft working on new systems language

2013-12-30 Thread Chris Cain
On Monday, 30 December 2013 at 11:23:22 UTC, JN wrote: The best you can do in those languages usually is to just not allocate stuff during the game. Yeah. The techniques to accomplish this in GC-only languages surprisingly mirror some of the techniques where malloc is available, though. For i

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 12:39 AM, Dicebot wrote: On Monday, 30 December 2013 at 06:42:56 UTC, Andrei Alexandrescu wrote: If it is you judgement, let it be so. I prefer to start working on implementation whatever it is as opposed to endless discussion. What is your opinion about defining general guideline to

Re: Bypassing the postblit?

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 3:29 AM, Benjamin Thaut wrote: Am 30.12.2013 12:26, schrieb Ritu: Yes. That way I could make sure that the class object in the struct gets lazily initialized to the same object in both the source and the copied struct instance. So in the appender example you earlier gave, both app1

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread John Colvin
On Monday, 30 December 2013 at 08:39:55 UTC, Dicebot wrote: On Monday, 30 December 2013 at 06:42:56 UTC, Andrei Alexandrescu wrote: If it is you judgement, let it be so. I prefer to start working on implementation whatever it is as opposed to endless discussion. What is your opinion about defin

Re: Bypassing the postblit?

2013-12-30 Thread Benjamin Thaut
Am 30.12.2013 16:53, schrieb Andrei Alexandrescu: On 12/30/13 3:29 AM, Benjamin Thaut wrote: As I already said, the solution is another level of indirection. I had a similar discussion with Andrei a while back and he made clear that there is no intention in adding any other copy constructor /

Re: Cross referencing in Ddoc

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 3:39 AM, Sönke Ludwig wrote: Am 30.12.2013 11:24, schrieb Jacob Carlborg: On 2013-12-29 19:35, Sönke Ludwig wrote: This is done for the DDOX based docs that were supposed to end up on the home page at some point: BTW, although DDOX seems to be the best solution currently. It stil

Re: Reserving/Preallocating associative array?

2013-12-30 Thread Benjamin Thaut
Am 30.12.2013 15:06, schrieb Daniel Kozak: This is cool! Can you post somewhere your code and data which you use for this test? I really like to test it on my new AA implementation :) Here is the post that describes how to get the data: http://forum.dlang.org/post/yglwnmawrvbhpszds...@forum.

Re: Bypassing the postblit?

2013-12-30 Thread Maxim Fomin
On Sunday, 29 December 2013 at 19:22:51 UTC, monarch_dodra wrote: On Sunday, 29 December 2013 at 18:40:07 UTC, Maxim Fomin wrote: Why this is a problem? You can create function which return class field from struct wrapper and make such function alias this, in addition postblit should allocate n

Re: Bypassing the postblit?

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 3:34 AM, Ritu wrote: But then the source object may not be mutable. I am not a compiler expert, but could a special case be made in D compiler for the cases where the source struct instance is mutable and is made available to ease such lazy initialization? I am suggesting a DIP h

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 16:57, schrieb Andrei Alexandrescu: > On 12/30/13 3:39 AM, Sönke Ludwig wrote: >> Am 30.12.2013 11:24, schrieb Jacob Carlborg: >>> On 2013-12-29 19:35, Sönke Ludwig wrote: >>> This is done for the DDOX based docs that were supposed to end up on the home page at some poi

Re: Bypassing the postblit?

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 7:58 AM, Benjamin Thaut wrote: Am 30.12.2013 16:53, schrieb Andrei Alexandrescu: On 12/30/13 3:29 AM, Benjamin Thaut wrote: As I already said, the solution is another level of indirection. I had a similar discussion with Andrei a while back and he made clear that there is no inten

Re: Bypassing the postblit?

2013-12-30 Thread Maxim Fomin
On Sunday, 29 December 2013 at 19:26:09 UTC, monarch_dodra wrote: Nope. What you are asking for is basically a default constructor, which D does not provide. Workarounds include the "static opCall" pattern, as well as the "function builder" pattern (eg: "MyStruct myStruct(Args args)") Actuall

Re: Cross referencing in Ddoc

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 4:55 AM, Sönke Ludwig wrote: Am 30.12.2013 13:47, schrieb Jacob Carlborg: On 2013-12-30 12:39, Sönke Ludwig wrote: Although I think that it is more important to have a well defined documentation format that can be processed by external tools, it would indeed be much nicer if for ex

Re: Bypassing the postblit?

2013-12-30 Thread Benjamin Thaut
Am 30.12.2013 17:19, schrieb Andrei Alexandrescu: There's no state. Just that it's an area in which Walter is opened to a language change. Kenji is opposed though. Andrei I must say, that the current situation with only postblit makes it quite easy to implement containers and gives a lot of

Re: Cross referencing in Ddoc

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 8:10 AM, Sönke Ludwig wrote: In my experience it is far more annoying to have the source files littered with $(MACROS) instead of putting a few _underscores to avoid bogus links (not to mention that most of the time this results in no links at all due to laziness). Oh the default is

Re: Cross referencing in Ddoc

2013-12-30 Thread Andrei Alexandrescu
On 12/29/13 10:35 AM, Sönke Ludwig wrote: Am 29.12.2013 18:38, schrieb Jacob Carlborg: A. Automatic cross reference This is done for the DDOX based docs that were supposed to end up on the home page at some point: It's past time we do this. So the code is in there, we need to build it appro

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 17:31, schrieb Andrei Alexandrescu: > On 12/29/13 10:35 AM, Sönke Ludwig wrote: >> Am 29.12.2013 18:38, schrieb Jacob Carlborg: >>> A. Automatic cross reference >> >> This is done for the DDOX based docs that were supposed to end up on the >> home page at some point: > > It's past ti

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 14:59:49 UTC, Peter Alexander wrote: Good job D isn't that language :-) Yes, that would be great!! :-o But... new isn't listed among overloadable operators, and I don't want to set allocators per class. I want to allocate the same class from different pools. Ho

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Jakob Ovrum
On Monday, 30 December 2013 at 01:36:48 UTC, David Nadlinger wrote: On Sunday, 29 December 2013 at 15:42:34 UTC, Jakob Ovrum wrote: I think we should use this chance to rectify the capitalization of the name. As the result is not exclusively a list of types, current conventions state that the n

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 12:20:56 UTC, develop32 wrote: As far as I know, Unreal Engine 3 has its own GC implemention for its scripting system. Yes, for heavy weight objects with complex relationships. So it closer to segmented GC.

Re: Microsoft working on new systems language

2013-12-30 Thread Chris Cain
On Monday, 30 December 2013 at 17:17:06 UTC, Ola Fosheim Grøstad wrote: But... new isn't listed among overloadable operators, and I don't want to set allocators per class. I want to allocate the same class from different pools. How? See emplace: http://dlang.org/phobos/std_conv.html#.emplace

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 17:26:30 UTC, Chris Cain wrote: See emplace: http://dlang.org/phobos/std_conv.html#.emplace Thanks. I guess that is the equivalent of c++ in-place new expression. I hoped for solution that is a bit more transparent than creating my own new syntax though, a so

Re: readln() returns new line charater

2013-12-30 Thread Regan Heath
On Mon, 30 Dec 2013 13:51:46 -, Jakob Ovrum wrote: On Monday, 30 December 2013 at 12:36:15 UTC, Regan Heath wrote: Cue "empty vs null" theme music.. Empty vs null is not a factor here. It returns a string containing the line terminator(s) for an empty line, but an empty string (incid

Re: Microsoft working on new systems language

2013-12-30 Thread Chris Cain
On Monday, 30 December 2013 at 17:36:56 UTC, Ola Fosheim Grøstad wrote: Thanks. I guess that is the equivalent of c++ in-place new expression. No problem and yes, that pretty much is the equivalent of C++'s in-place new. I hoped for solution that is a bit more transparent than creating my o

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 17:52:33 UTC, Chris Cain wrote: I'm confused by this. Could you rephrase and/or explain? In cpp you transparently replace new gobally and through a hack (include files) map it to different pools for different sections of your code if you wish. Although explicit

Re: Bypassing the postblit?

2013-12-30 Thread Ritu
There's no state. Just that it's an area in which Walter is opened to a language change. Kenji is opposed though. Andrei Greetings I thank Andrei for spending some time on this thread and for informing that he and Walter are actively considering extensions to the postblit behavior. I tak

Re: Microsoft working on new systems language

2013-12-30 Thread Chris Cain
On Monday, 30 December 2013 at 18:02:26 UTC, Ola Fosheim Grøstad wrote: In cpp you transparently replace new gobally and through a hack (include files) map it to different pools for different sections of your code if you wish. Although explicit allocation from pools using regular new-syntax wou

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Timon Gehr
On 12/30/2013 07:26 PM, Timon Gehr wrote: assert(y==Seq!(3,4.0)); int x; (Ignore the 'x' :o).)

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Timon Gehr
On 12/30/2013 07:45 AM, Andrei Alexandrescu wrote: ... If you are going to claim that this is not proper creation of an instance of a type, except that: int x; static assert(is(typeof(x)==int)); Seq!(int, double) y; static assert(is(typeof(y)==Seq!(int, double))); // presumably "bad" Then I

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Timon Gehr
On 12/30/2013 07:43 AM, Andrei Alexandrescu wrote: Template arguments lists are what they are - entities that can be passed to templates. Aliasing them is sensible but creating values thereof does not make sense. You are doing it in the implementation of std.typecons.Tuple, and on every variad

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 18:22:22 UTC, Chris Cain wrote: Sounds pretty dangerous to me. I wouldn't really describe that as "transparent" either. If it's working for you in C++, that's great. I wouldn't count on D adopting such an approach, however. Well, either that or using a thread loc

Re: Microsoft working on new systems language

2013-12-30 Thread John Colvin
On Monday, 30 December 2013 at 18:32:05 UTC, Ola Fosheim Grøstad wrote: Ok. :) as long as I don't have to pass the allocator around,mwhich is tedious. See this thread for some perspective/info: http://forum.dlang.org/thread/l4btsk$5u8$1...@digitalmars.com

Re: Bypassing the postblit?

2013-12-30 Thread bearophile
Ritu: First of all there is no way in D (at least I am not aware) to disallow the default constructor (the init value must exist). Do you mean something like this? struct Foo { @disable this(); this(int) {} } void main() { // Foo f1; // Error auto f2 = Foo(1); } Or do you m

Syntax question about inlined functions/delegates/lambdas

2013-12-30 Thread Gordon
Hello, I have a syntax question regarding the correct usage of function/delegates/lambdas, arising after a used it incorrectly and it took a long time to debug and see what's going on. I found out there's a syntax which compiles OK but doesn't work (as I naively expected). The following is a

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/29/2013 9:38 AM, Jacob Carlborg wrote: A. Automatic cross reference Automatically create links for all matching symbols in the current scope. That means to create a link to a symbol in the current scope it's enough to mention it's name in the documentation. This will create many unwanted

Re: Microsoft working on new systems language

2013-12-30 Thread Walter Bright
On 12/30/2013 9:36 AM, "Ola Fosheim Grøstad" " wrote: I hoped for solution that is a bit more transparent than creating my own new syntax though, a solution which makes replacing allocators across projects less work. *shrug* Having overloaded global operator new in C++ myself across many projec

Re: Syntax question about inlined functions/delegates/lambdas

2013-12-30 Thread Maxim Fomin
On Monday, 30 December 2013 at 19:00:49 UTC, Gordon wrote: So I've learned that syntaxes in cases 2,4,6 are wrong, but they still compile. May question is - what do they do? what usage do they have (since they do not trigger a compilation warning)? Thanks, -gordon You could notice that synt

Re: Syntax question about inlined functions/delegates/lambdas

2013-12-30 Thread bearophile
Gordon: ... case 5. X = ",x); } )(); call_function!( (x) => { writeln("lambda, case 6. X = ",x); } )(); call_function!( (x) => writeln("lambda, case 7. X = ",x))(); } There is also the simpler syntax: x => writeln("lambda, case 8. X =

Re: Syntax question about inlined functions/delegates/lambdas

2013-12-30 Thread Ali Çehreli
On 12/30/2013 11:00 AM, Gordon wrote: Hello, I have a syntax question regarding the correct usage of function/delegates/lambdas, arising after a used it incorrectly and it took a long time to debug and see what's going on. I found out there's a syntax which compiles OK but doesn't work (as I nai

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 18:39:08 UTC, John Colvin wrote: See this thread for some perspective/info: http://forum.dlang.org/thread/l4btsk$5u8$1...@digitalmars.com Thanks! That looks promising! Looks like a stack of allocators for new. If it is possible to use them explicitly too, then m

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 19:12:16 UTC, Walter Bright wrote:: Having overloaded global operator new in C++ myself across many projects, I eventually concluded that feature is a bug. I guess it can go wrong if you end up using the wrong pool in different parts of your code when making call

Re: DIP54 : revamp of Phobos tuple types

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 10:31 AM, Timon Gehr wrote: On 12/30/2013 07:43 AM, Andrei Alexandrescu wrote: Template arguments lists are what they are - entities that can be passed to templates. Aliasing them is sensible but creating values thereof does not make sense. You are doing it in the implementation o

Re: Microsoft working on new systems language

2013-12-30 Thread Andrei Alexandrescu
On 12/30/13 11:12 AM, Walter Bright wrote: On 12/30/2013 9:36 AM, "Ola Fosheim Grøstad" " wrote: I hoped for solution that is a bit more transparent than creating my own new syntax though, a solution which makes replacing allocators across projects less work. *shrug* Having overloaded global o

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 20:08, Walter Bright wrote: This will create many unwanted links, in three scenarios: I don't think so, see below. 1. In the description for S, there should not be hyperlinks to S. These would be annoying - when you click on them, nothing will happen. The compiler knows which

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 20:08, schrieb Walter Bright: > On 12/29/2013 9:38 AM, Jacob Carlborg wrote: >> A. Automatic cross reference >> >> Automatically create links for all matching symbols in the current >> scope. That >> means to create a link to a symbol in the current scope it's enough to >> mention >>

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
Broad statements with no explanation are not very enlightening.

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am I slow... ;)

Re: Microsoft working on new systems language

2013-12-30 Thread Brian Rogoff
On Monday, 30 December 2013 at 12:20:36 UTC, bearophile wrote: But the Oracle JVM has a GC (more than one) way better then the current D one :-) Of course. But Java requires a world class GC and state-of-the-art escape analysis to achieve excellent performance. These would be nice to have in

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/30/2013 12:14 PM, Jacob Carlborg wrote: On 2013-12-30 20:08, Walter Bright wrote: This will create many unwanted links, in three scenarios: I don't think so, see below. 1. In the description for S, there should not be hyperlinks to S. These would be annoying - when you click on them,

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/30/2013 8:23 AM, Andrei Alexandrescu wrote: Oh the default is to link and then disable manually? That's still manual, just the default is different :o). I can work with that. As I mentioned elsewhere, I dislike the requirement to use the inverse feature. Consider maintenance - I add a sy

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 21:58, schrieb Walter Bright: >>> 2. Using the word S as a word, not in reference to symbol S, would >>> generate a hyperlink which would not make sense. >> >> I've have seen that happened a couple of times with documentation >> generators >> that support it, it has never bother me. A

Re: Microsoft working on new systems language

2013-12-30 Thread Walter Bright
On 12/30/2013 11:39 AM, "Ola Fosheim Grøstad" " wrote: On Monday, 30 December 2013 at 19:12:16 UTC, Walter Bright wrote:: Having overloaded global operator new in C++ myself across many projects, I eventually concluded that feature is a bug. I guess it can go wrong if you end up using the wron

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/30/2013 12:33 PM, Sönke Ludwig wrote: > [...] I've pretty much replied to these points in my response to Jacob and Andrei.

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 22:00, schrieb Walter Bright: > On 12/30/2013 8:23 AM, Andrei Alexandrescu wrote: >> Oh the default is to link and then disable manually? That's still >> manual, just >> the default is different :o). I can work with that. > > As I mentioned elsewhere, I dislike the requirement to use

Re: Cross referencing in Ddoc

2013-12-30 Thread Jacob Carlborg
On 2013-12-30 21:58, Walter Bright wrote: I've run into this a few times, and it cannot be dismissed easily. Worse, there is the issue of how one overrides the auto-link generation to be the right link. I guess that would require a macro. I'll have to disagree on that. I just finished doing

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 21:21:06 UTC, Walter Bright wrote: It causes problems when linking in code developed elsewhere that makes assumptions about new's behavior. Yes, if you don't do new/delete pairs under the same circumstances you risk having problems. Even if you wrote all the co

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/30/2013 1:31 PM, Jacob Carlborg wrote: On 2013-12-30 21:58, Walter Bright wrote: I'll have to disagree on that. I just finished doing it with std.datetime, and it didn't take more than a few minutes with global query-search-replace. How did you limit that search to only the documentation

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/30/2013 1:25 PM, Sönke Ludwig wrote: Identifiers in documentation comments that are function parameters or are names that are in scope at the associated declaration are emphasized in the output. So the same problem is already reality - you already have to go through the documentation to se

Re: Bypassing the postblit?

2013-12-30 Thread monarch_dodra
On Monday, 30 December 2013 at 16:18:22 UTC, Maxim Fomin wrote: On Sunday, 29 December 2013 at 19:26:09 UTC, monarch_dodra wrote: Nope. What you are asking for is basically a default constructor, which D does not provide. Workarounds include the "static opCall" pattern, as well as the "function

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 30.12.2013 23:13, schrieb Walter Bright: > On 12/30/2013 1:25 PM, Sönke Ludwig wrote: >> Identifiers in documentation comments that are function parameters or >> are names that are in scope at the associated declaration are emphasized >> in the output. >> >> So the same problem is already realit

Re: Microsoft working on new systems language

2013-12-30 Thread Walter Bright
On 12/30/2013 1:39 PM, "Ola Fosheim Grøstad" " wrote: On Monday, 30 December 2013 at 21:21:06 UTC, Walter Bright wrote: It causes problems when linking in code developed elsewhere that makes assumptions about new's behavior. Yes, if you don't do new/delete pairs under the same circumstances yo

Re: Cross referencing in Ddoc

2013-12-30 Thread Walter Bright
On 12/30/2013 3:13 PM, Sönke Ludwig wrote: Am 30.12.2013 23:13, schrieb Walter Bright: On 12/30/2013 1:25 PM, Sönke Ludwig wrote: Identifiers in documentation comments that are function parameters or are names that are in scope at the associated declaration are emphasized in the output. So the

Re: Cross referencing in Ddoc

2013-12-30 Thread Sönke Ludwig
Am 31.12.2013 00:37, schrieb Walter Bright: > On 12/30/2013 3:13 PM, Sönke Ludwig wrote: >> Am 30.12.2013 23:13, schrieb Walter Bright: >>> On 12/30/2013 1:25 PM, Sönke Ludwig wrote: Identifiers in documentation comments that are function parameters or are names that are in scope at the a

Re: Microsoft working on new systems language

2013-12-30 Thread Ola Fosheim Grøstad
On Monday, 30 December 2013 at 23:38:39 UTC, Walter Bright wrote: And people don't do that with C++. That's the whole problem with GLOBAL state. Well, it should work ok for autoreleasepools (delete all objects at once) even under bad circumstances, I think. But isn't this exactly what the pr

  1   2   >