Re: A possible future purpose for D1 [rant]

2010-03-01 Thread Brad Roberts
On 3/1/2010 11:43 PM, Fawzi Mohamed wrote: > > On 2-mar-10, at 01:26, Walter Bright wrote: > >> Fawzi Mohamed wrote: >>> Maybe I am painting the situation more dire than it is, but I sure >>> got annoyed by it, and I hope that it will be rectified soon. >>> More than new language features D needs

Re: A possible future purpose for D1 [rant]

2010-03-01 Thread Fawzi Mohamed
On 2-mar-10, at 01:26, Walter Bright wrote: Fawzi Mohamed wrote: Maybe I am painting the situation more dire than it is, but I sure got annoyed by it, and I hope that it will be rectified soon. More than new language features D needs stable and efficient libraries, something that can come o

Re: std.array.put doesn't put

2010-03-01 Thread Robert Jacques
On Mon, 01 Mar 2010 16:51:41 -0500, Lars T. Kyllingstad wrote: Paul D. Anderson wrote: I've entered this as a Phobos bug, but wanted to be sure I was understanding this properly (i.e., this is a bug, right?): From the description of the put primitive in std.range: "r.put(e) puts e in the r

Re: Recursive template expansion

2010-03-01 Thread Robert Jacques
On Mon, 01 Mar 2010 12:47:49 -0500, Philippe Sigaud wrote: [snip] Still I would like to know the reason for my original failure, especially since the compiler error message did not contain any line number whatsoever. Getting this kind of error message in a large project must be really ug

Re: A possible future purpose for D1 [rant]

2010-03-01 Thread Walter Bright
Fawzi Mohamed wrote: Maybe I am painting the situation more dire than it is, but I sure got annoyed by it, and I hope that it will be rectified soon. More than new language features D needs stable and efficient libraries, something that can come only if the compiler is stable enough, and at lea

Re: A possible future purpose for D1 [rant]

2010-03-01 Thread Fawzi Mohamed
On 27-feb-10, at 15:49, Lutger wrote: D1 has but one major advantage over D2: it is much more mature. I think D1 has a future as long as that is the case, or as long as there is a large enough body of code depending on it. Assuming Walter Bright keeps supporting it of course (as he has). Well

Re: std.array.put doesn't put

2010-03-01 Thread Lars T. Kyllingstad
Paul D. Anderson wrote: I've entered this as a Phobos bug, but wanted to be sure I was understanding this properly (i.e., this is a bug, right?): From the description of the put primitive in std.range: "r.put(e) puts e in the range (in a range-dependent manner) and advances to the popFront po

std.array.put doesn't put

2010-03-01 Thread Paul D. Anderson
I've entered this as a Phobos bug, but wanted to be sure I was understanding this properly (i.e., this is a bug, right?): >From the description of the put primitive in std.range: "r.put(e) puts e in the range (in a range-dependent manner) and advances to the popFront position in the range. Succ

Off-topic: Haskell I/O (was Re: disabling unary "-" for unsigned types)

2010-03-01 Thread Jeff Nowakowski
Andrei Alexandrescu wrote: I'm telling you that pre-monads there was an I/O paradigm that everybody FP swore by. I looked this up out of curiosity. The Haskell 1.2 report, circa 1992, talks about "streams of messages" and also "continuation-based I/O" as an alternative to streams. Monads we

Readonly asserts and more

2010-03-01 Thread bearophile
If you think the following idea is useful, then I can turn it into an enhancement request (or even a little DEP). Many of the features that D adds to C seems to consist in statically verified fences and walls that can be added to the flow of information across different parts of a program state

Re: Recursive template expansion

2010-03-01 Thread Philippe Sigaud
On Mon, Mar 1, 2010 at 17:26, Norbert Nemec wrote: > Thanks, Philippe, for the elegant workaround! > De nada. I vaguely remembered being confronted by this one, but didn't know it was a bug (my code wasn't as clear as yours). I now realize that my coding in D is a least partially made of such tr

Re: Recursive template expansion

2010-03-01 Thread Norbert Nemec
Thanks, Philippe, for the elegant workaround! Still I would like to know the reason for my original failure, especially since the compiler error message did not contain any line number whatsoever. Getting this kind of error message in a large project must be really ugly to solve, even if the w

Re: Recursive template expansion

2010-03-01 Thread Robert Jacques
On Mon, 01 Mar 2010 04:16:41 -0500, Norbert Nemec wrote: Hi there, trying out a few ideas on expression templates, I stumbled over the following problem, for which I cannot find a solution. The code below demonstrates what I try to do: I need to construct a nested template type at compil

Re: Problem with writeln

2010-03-01 Thread Steven Schveighoffer
On Mon, 01 Mar 2010 10:42:00 -0500, Ivan wrote: On 1.3.2010 14:43, Steven Schveighoffer wrote: On Mon, 01 Mar 2010 07:14:23 -0500, Ivan wrote: On 1.3.2010 12:47, Steven Schveighoffer wrote: On Mon, 01 Mar 2010 04:11:28 -0500, Ivan wrote: The part of code in my main method is this: try

Re: Recursive template expansion

2010-03-01 Thread Philippe Sigaud
On Mon, Mar 1, 2010 at 10:16, Norbert Nemec wrote: > > Is there any fundamental error in my thinking? Some simple > misunderstanding? Some slightly different syntax to be used? Or is it simply > an unnessessary restriction in the compiler that could easily be removed? > I don't know. Using facto

Re: Problem with writeln

2010-03-01 Thread Ivan
On 1.3.2010 14:43, Steven Schveighoffer wrote: On Mon, 01 Mar 2010 07:14:23 -0500, Ivan wrote: On 1.3.2010 12:47, Steven Schveighoffer wrote: On Mon, 01 Mar 2010 04:11:28 -0500, Ivan wrote: The part of code in my main method is this: try { writefln("Starting main loop..."); global.loop.st

Re: Problem with writeln

2010-03-01 Thread Steven Schveighoffer
On Mon, 01 Mar 2010 07:14:23 -0500, Ivan wrote: On 1.3.2010 12:47, Steven Schveighoffer wrote: On Mon, 01 Mar 2010 04:11:28 -0500, Ivan wrote: The part of code in my main method is this: try { writefln("Starting main loop..."); global.loop.start(); writefln("Main loop finished..."); } catc

Re: Problem with writeln

2010-03-01 Thread Ivan
On 1.3.2010 12:47, Steven Schveighoffer wrote: On Mon, 01 Mar 2010 04:11:28 -0500, Ivan wrote: The part of code in my main method is this: try { writefln("Starting main loop..."); global.loop.start(); writefln("Main loop finished..."); } catch(Exception e) { writefln("Exception was: %s", e.ms

Re: Problem with writeln

2010-03-01 Thread Steven Schveighoffer
On Mon, 01 Mar 2010 04:11:28 -0500, Ivan wrote: The part of code in my main method is this: try { writefln("Starting main loop..."); global.loop.start(); writefln("Main loop finished..."); } catch(Exception e) { wr

Re: A rationale for pure nothrow ---> @pure @nothrow (and nothing else changes)

2010-03-01 Thread Steven Schveighoffer
On Sun, 28 Feb 2010 10:06:39 -0500, Don wrote: Sönke Ludwig wrote: I would also tend to agree that this set of rules is a bit arbitrary and seems a bit like some overfitted classifier in pattern recognition (although there were worse sets or rules in that regard). Almost everyone has missed

Re: A possible future purpose for D1

2010-03-01 Thread Bane
Walter Bright Wrote: > Bane wrote: > > On the other hand, D2 carries more complexity than D1, more power at > > a greater risk of potentially more dangerous programs (due to > > programmers fault). As Language D homepage states, D aims to balance > > simplicity and power. Seems to me D1 leans to f

Recursive template expansion

2010-03-01 Thread Norbert Nemec
Hi there, trying out a few ideas on expression templates, I stumbled over the following problem, for which I cannot find a solution. The code below demonstrates what I try to do: I need to construct a nested template type at compile time. Any expression should correspond to an equivalent nes

Re: Problem with writeln

2010-03-01 Thread Ivan
On 28.2.2010 20:42, Walter Bright wrote: Since printf and writeln versions both exhibit the same problem, I suspect the problem is elsewhere in your program. That wouldn't surprise me :) But I am having some problems figuring this out. Somehow playing with ddbg i was able to get this stack tr

Re: A rationale for pure nothrow ---> @pure @nothrow (and nothing else changes)

2010-03-01 Thread Pelle Månsson
On 03/01/2010 04:00 AM, Michel Fortin wrote: On 2010-02-28 19:46:29 -0500, Pelle Månsson said: What about @curried? It (potentially) changes the way the function is called, yet looks quite good as an @attribute. I'm not sure I understand how you expect a @curried attribute to be used. How wo