Re: dmd 2.029 release

2009-04-20 Thread Georg Wrede
Andrei Alexandrescu wrote: Craig Black wrote: I like very much the direction D2 is going now. Language refactoring and enhancements driven by the goal of more elegant implementation of standard libraries. This approach seems very practical and promising. Thank you very much and keep it up!

Format specs idea

2009-04-20 Thread Georg Wrede
Andrei Alexandrescu wrote: Nick Sabalausky wrote: "BCS" wrote Reply to Nick, "Andrei Alexandrescu" wrote in message news:gsiqdr$1cs...@digitalmars.com... BCS wrote: One option would be to not throw an error if the format string uses indexing formats (e.i. out of order formatting) Yah,

Re: dmd 2.029 release

2009-04-20 Thread Unknown W. Brackets
Well, there's push (svn commit) and pull (svn up), so he must mean one or the other... -[Unknown] Walter Bright wrote: BCS wrote: I think he was asking about the otherway (not that I known why) I think he'll need to be more specific!

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
BCS wrote: I think he was asking about the otherway (not that I known why) I think he'll need to be more specific!

Re: DCat - a compact web application server in D.

2009-04-20 Thread Steve Teale
Michel Fortin Wrote: > On 2009-04-20 00:38:48 -0400, Steve Teale said: > > > Michel Fortin Wrote: > > > >> On 2009-04-19 15:19:24 -0400, Steve Teale > >> said: > >> > >>> This is incomplete at this point, but there's a working example. I have > >>> to break off now and do some building work.

Re: dmd 2.029 release

2009-04-20 Thread BCS
Hello Walter, Stewart Gordon wrote: Walter, how often do you update your working copy from the SVN? Obviously less than once every 2 releases. As far as I know, it is current. Everything got checked in. I think he was asking about the otherway (not that I known why)

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
Stewart Gordon wrote: Walter, how often do you update your working copy from the SVN? Obviously less than once every 2 releases. As far as I know, it is current. Everything got checked in.

Re: dmd 2.029 release

2009-04-20 Thread Stewart Gordon
Walter, how often do you update your working copy from the SVN? Obviously less than once every 2 releases. Stewart.

Re: DCat - a compact web application server in D.

2009-04-20 Thread Robert Jacques
On Mon, 20 Apr 2009 06:34:11 -0400, Steve Teale wrote: Jacob Carlborg Wrote: Steve Teale wrote: > Michel Fortin Wrote: > >> On 2009-04-19 15:19:24 -0400, Steve Teale said: >> >>> This is incomplete at this point, but there's a working example. I have >>> to break off now and do some b

Re: dmd 2.029 release

2009-04-20 Thread Nick Sabalausky
"BCS" wrote in message news:78ccfa2d3e68b8cb8fe69f8b7...@news.digitalmars.com... > Reply to Nick, > >> "Andrei Alexandrescu" wrote in message >> news:gsiqdr$1cs...@digitalmars.com... >> >>> BCS wrote: One option would be to not throw an error if the format string uses indexing for

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Nick Sabalausky wrote: "BCS" wrote in message news:78ccfa2d3e68b8cb8fe69f8b7...@news.digitalmars.com... Reply to Nick, "Andrei Alexandrescu" wrote in message news:gsiqdr$1cs...@digitalmars.com... BCS wrote: One option would be to not throw an error if the format string uses indexing forma

Re: where's fwritefln? Re: dmd 2.029 release

2009-04-20 Thread Tyro[a.c.edwards]
annoyed Wrote: > It's in dmd-v2.026/src/phobos/std/stdio.d:void fwritefln(FILE* fp, ...) > > but I cannot find it in 2.029. > It was removed, use File.writefln() instead. std.stdio has been rewritten so you might want to take a look at the docs. Andrew

where's fwritefln? Re: dmd 2.029 release

2009-04-20 Thread annoyed
It's in dmd-v2.026/src/phobos/std/stdio.d:void fwritefln(FILE* fp, ...) but I cannot find it in 2.029.

Re: dmd 2.029 release

2009-04-20 Thread BCS
Reply to Nick, "Andrei Alexandrescu" wrote in message news:gsiqdr$1cs...@digitalmars.com... BCS wrote: One option would be to not throw an error if the format string uses indexing formats (e.i. out of order formatting) Yah, that's an option I considered. Maybe it's the best way to go. T

Re: dmd 2.029 release

2009-04-20 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:gsiqdr$1cs...@digitalmars.com... > BCS wrote: >> Reply to bearophile, >> >>> Andrei Alexandrescu: >>> If it were an error, I wouldn't let it go. >>> It's an error. It will lead to troubles. >>> >>> Bye, >>> bearophile >> >> Then there need to

Re: dmd 2.029 release

2009-04-20 Thread Nick Sabalausky
"bearophile" wrote in message news:gsipn1$1bn...@digitalmars.com... > Andrei Alexandrescu: >> If it were an error, I wouldn't let it go. > > It's an error. It will lead to troubles. > Sometimes it is an error, but there are times when it isn't: Suppose you're writing a reporting module for an e

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
BCS wrote: Reply to bearophile, Andrei Alexandrescu: If it were an error, I wouldn't let it go. It's an error. It will lead to troubles. Bye, bearophile Then there need to be a way for the format string to use an argument without generating output for it because as Andrei is saying, the

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: If it were an error, I wouldn't let it go. It's an error. It will lead to troubles. Well at most you could say it's error-prone, something that is easier to argue. The problem is that forcing it into an error makes quite a number of valid uses impossi

Re: dmd 2.029 release

2009-04-20 Thread BCS
Reply to bearophile, Andrei Alexandrescu: If it were an error, I wouldn't let it go. It's an error. It will lead to troubles. Bye, bearophile Then there need to be a way for the format string to use an argument without generating output for it because as Andrei is saying, there are real

Re: dmd 2.029 release

2009-04-20 Thread bearophile
Andrei Alexandrescu: > If it were an error, I wouldn't let it go. It's an error. It will lead to troubles. Bye, bearophile

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: extraneous arguments passed to writef will be ignored, not printed with default formatting. That sounds bad: => "Errors should never pass silently." It's better to raise a compilation error. (And if that's not possible, then an exception at run-time. But

Re: dmd 2.029 release

2009-04-20 Thread bearophile
Andrei Alexandrescu: > extraneous arguments passed to writef will > be ignored, not printed with default formatting. That sounds bad: => "Errors should never pass silently." It's better to raise a compilation error. (And if that's not possible, then an exception at run-time. But a compilation er

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Russell Lewis wrote: Walter Bright wrote: tama wrote: I tested following code. writefln(3 * 4); This code doesn't work in the first place:-< Yes, that's one of the breaking changes in the new phobos2. writefln expects its first argument to be a format string. If it isn't, use writeln inste

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Russell Lewis wrote: Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip Was fwritefln() removed intentionally? Or should I write up a Bugzilla

Re: dmd 2.029 release

2009-04-20 Thread Russell Lewis
Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip Was fwritefln() removed intentionally? Or should I write up a Bugzilla? I didn't noteice a

Re: dmd 2.029 release

2009-04-20 Thread Russell Lewis
Walter Bright wrote: tama wrote: I tested following code. writefln(3 * 4); This code doesn't work in the first place:-< Yes, that's one of the breaking changes in the new phobos2. writefln expects its first argument to be a format string. If it isn't, use writeln instead. I just hit the s

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Craig Black wrote: I like very much the direction D2 is going now. Language refactoring and enhancements driven by the goal of more elegant implementation of standard libraries. This approach seems very practical and promising. Thank you very much and keep it up! -Craig Thanks. Walter po

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
Andrei Alexandrescu wrote: Walter Bright wrote: I think the right fix for that is for the compiler to not complain about deprecated symbol usage if the usage is in the same module the deprecated symbol is defined in. Reading this, I thought "No chance Walter will ever do this" until I saw th

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
superdan wrote: Craig Black Wrote: I like very much the direction D2 is going now. Language refactoring and enhancements driven by the goal of more elegant implementation of standard libraries. This approach seems very practical and promising. Thank you very much and keep it up! -Craig

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Walter Bright wrote: Andrei Alexandrescu wrote: Ok, I've undeprecated rand_seed, sigh. I was hoping I'd eliminate rand() entirely from this release, but Walter pointed out it would break too much code. So I left rand() and rand_seed() as deprecated. Now I only left rand() deprecated so at leas

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
http://d.puremagic.com/issues/show_bug.cgi?id=2864

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
Andrei Alexandrescu wrote: Ok, I've undeprecated rand_seed, sigh. I was hoping I'd eliminate rand() entirely from this release, but Walter pointed out it would break too much code. So I left rand() and rand_seed() as deprecated. Now I only left rand() deprecated so at least the static construct

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
tama wrote: > I tested following code. > > writefln(3 * 4); > > This code doesn't work in the first place:-< Yes, that's one of the breaking changes in the new phobos2. writefln expects its first argument to be a format string. If it isn't, use writeln instead.

Re: dmd 2.029 release

2009-04-20 Thread downs
superdan wrote: > Craig Black Wrote: > >> I like very much the direction D2 is going now. Language refactoring and >> enhancements driven by the goal of more elegant implementation of standard >> libraries. This approach seems very practical and promising. Thank you >> very much and keep it

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
bearophile wrote: Assertion failure: '0' on line 935 in file 'glue.c' All assertion failures are compiler bugs and belong in bugzilla: http://d.puremagic.com/issues/show_bug.cgi?id=2863

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
bearophile wrote: I didn't even know that lambda delegates in D2 can now infer the type of their input argument, so you can use (x, y) instead of (int x, int y). Can you tell me when this was changed? :-) That change *is* the template function literals, and they are only valid as template argu

Re: dmd 2.029 release

2009-04-20 Thread Georg Wrede
Walter Bright wrote: In std.array, the example for back() is the same as for front(). The example for put() seems to be correct (and put() behaves accordingly), however, the asserted results are not what the reader would expect. If we are verbose enough to explain the dot notation here, the

Re: dmd 2.029 release

2009-04-20 Thread superdan
Craig Black Wrote: > I like very much the direction D2 is going now. Language refactoring and > enhancements driven by the goal of more elegant implementation of standard > libraries. This approach seems very practical and promising. Thank you > very much and keep it up! > > -Craig holy g

Re: dmd 2.029 release

2009-04-20 Thread Craig Black
I like very much the direction D2 is going now. Language refactoring and enhancements driven by the goal of more elegant implementation of standard libraries. This approach seems very practical and promising. Thank you very much and keep it up! -Craig

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from dsimcha (dsim...@yahoo.com)'s article == Quote from Walter Bright (newshou...@digitalmars.com)'s article This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.co

Re: dmd 2.029 release

2009-04-20 Thread dsimcha
== Quote from dsimcha (dsim...@yahoo.com)'s article > == Quote from Walter Bright (newshou...@digitalmars.com)'s article > > This is a major revision to Phobos, including Andrei's revolutionary new > > range support. > > http://www.digitalmars.com/d/2.0/changelog.html > > http://ftp.digitalmars.com

Re: dmd 2.029 release

2009-04-20 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > This is a major revision to Phobos, including Andrei's revolutionary new > range support. > http://www.digitalmars.com/d/2.0/changelog.html > http://ftp.digitalmars.com/dmd.2.029.zip Two small issues I've just run into that might

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
bearophile wrote: In D1 I have written a very hairy (but not too much long) apply() function, that given a function and some arguments, returns the result of the function applied to them. (apply() is a basic higher-order thing common in most functional languages). So now I'm playing with this

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Andrei Alexandrescu wrote: Georg Wrede wrote: Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip The documentation for completeSort in std.alg

Re: dmd 2.029 release

2009-04-20 Thread Tomas Lindquist Olsen
On Mon, Apr 20, 2009 at 2:47 PM, Saaa wrote: > Using D1 feels especially retarded today :( > Why retarded ?

Re: dmd 2.029 release

2009-04-20 Thread Georg Wrede
Saaa wrote: Using D1 feels especially retarded today :( Don't cry now. :-) Soon you'll be using D2 for work, and cry when you see the D3 change log...

Re: dmd 2.029 release

2009-04-20 Thread Andrei Alexandrescu
Georg Wrede wrote: Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip The documentation for completeSort in std.algorithm says: Performs O(

Re: dmd 2.029 release

2009-04-20 Thread Georg Wrede
Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip The documentation for completeSort in std.algorithm says: Performs O(n * log(n)) (best ca

Re: dmd 2.029 release

2009-04-20 Thread Saaa
Using D1 feels especially retarded today :( > This is a major revision to Phobos, including Andrei's revolutionary new > range support. > > http://www.digitalmars.com/d/2.0/changelog.html > http://ftp.digitalmars.com/dmd.2.029.zip

Re: dmd 2.029 release

2009-04-20 Thread tama
Denis Koroskin wrote: writefln now expects a string as a first argument. Use writeln() if you need no formattings, it is both faster and safer. To one's shame, I didn't know detailed writef/writefln spec. I checked D2 changelog and founded it at version 2.006 and 2.029. Thanks! -- tama http:/

Re: DCat - a compact web application server in D.

2009-04-20 Thread Frits van Bommel
Michel Fortin wrote: On 2009-04-20 00:38:48 -0400, Steve Teale said: Michel Fortin Wrote: What's the license? Hmm, forgot about that stuff, BSD maybe - suggest one please. By looking at the code, I've found a license. Not sure which license it is (looks a little BSD-like), but at least

Re: DCat - a compact web application server in D.

2009-04-20 Thread Michel Fortin
On 2009-04-20 00:38:48 -0400, Steve Teale said: Michel Fortin Wrote: On 2009-04-19 15:19:24 -0400, Steve Teale said: This is incomplete at this point, but there's a working example. I have to break off now and do some building work. You can find documentation and a zip file (currently it i

Re: dmd 2.029 release

2009-04-20 Thread Denis Koroskin
On Mon, 20 Apr 2009 14:58:38 +0400, tama wrote: bearophile wrote: tama: void foo(alias f)() { writefln(f(3, 4)); } foo!((x,y){ return x * y; })(); This code doesn't work(compile error). To me the following works: import std.stdio: writeln; void foo(alias f)() { writeln(f(3, 4));

Re: dmd 2.029 release

2009-04-20 Thread tama
bearophile wrote: tama: void foo(alias f)() { writefln(f(3, 4)); } foo!((x,y){ return x * y; })(); This code doesn't work(compile error). To me the following works: import std.stdio: writeln; void foo(alias f)() { writeln(f(3, 4)); } void main() { foo!((x,y){ return x * y; })()

Re: DCat - a compact web application server in D.

2009-04-20 Thread Steve Teale
Jacob Carlborg Wrote: > Steve Teale wrote: > > Michel Fortin Wrote: > > > >> On 2009-04-19 15:19:24 -0400, Steve Teale > >> said: > >> > >>> This is incomplete at this point, but there's a working example. I have > >>> to break off now and do some building work. You can find documentation > >

Re: dmd 2.029 release

2009-04-20 Thread bearophile
tama: > void foo(alias f)() > { > writefln(f(3, 4)); > } > foo!((x,y){ return x * y; })(); > > This code doesn't work(compile error). To me the following works: import std.stdio: writeln; void foo(alias f)() { writeln(f(3, 4)); } void main() { foo!((x,y){ return x * y; })(); } Bye

Re: dmd 2.029 release

2009-04-20 Thread tama
On Mon, 20 Apr 2009 18:12:16 +0900, Walter Bright wrote: bearophile wrote: BCS Wrote: Cool template function literals sounds interesting May I have one example of them? I am looking in the docs, but I am not finding anything... void foo(alias f)() { f(3, 4); } foo!((x,y){return x

Re: dmd 2.029 release

2009-04-20 Thread bearophile
In D1 I have written a very hairy (but not too much long) apply() function, that given a function and some arguments, returns the result of the function applied to them. (apply() is a basic higher-order thing common in most functional languages). So now I'm playing with this new toy of D2, not

Re: dmd 2.029 release

2009-04-20 Thread bearophile
Walter Bright: > void foo(alias f)() > { > f(3, 4); > } > foo!((x,y){return x * y;))(); I have tried: import std.stdio: writeln; void foo(alias f)() { f(3, 4); } void main() { foo!( (x, y) { writeln(x * y); } )(); } And it works, printing 12 :-) Very cute. This is able to simplify s

Re: dmd 2.029 release

2009-04-20 Thread Georg Wrede
Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip Ooohhh, just half way through the change log, and already breathless!!!

Re: dmd 2.029 release

2009-04-20 Thread Daniel Keep
Daniel Keep wrote: > > bearophile wrote: >> BCS Wrote: >>> Cool template function literals sounds interesting >> May I have one example of them? >> I am looking in the docs, but I am not finding anything... >> >> Bye, >> bearophile > > If I had to guess, I'd say it was something like this: > >

Re: dmd 2.029 release

2009-04-20 Thread Walter Bright
bearophile wrote: BCS Wrote: Cool template function literals sounds interesting May I have one example of them? I am looking in the docs, but I am not finding anything... void foo(alias f)() { f(3, 4); } foo!((x,y){return x * y;))();

Re: dmd 2.029 release

2009-04-20 Thread Daniel Keep
bearophile wrote: > BCS Wrote: >> Cool template function literals sounds interesting > > May I have one example of them? > I am looking in the docs, but I am not finding anything... > > Bye, > bearophile If I had to guess, I'd say it was something like this: > alias (T)(T a, T b) { return (a+

Re: dmd 2.029 release

2009-04-20 Thread bearophile
BCS Wrote: > Cool template function literals sounds interesting May I have one example of them? I am looking in the docs, but I am not finding anything... Bye, bearophile

Re: DCat - a compact web application server in D.

2009-04-20 Thread Jacob Carlborg
Steve Teale wrote: Michel Fortin Wrote: On 2009-04-19 15:19:24 -0400, Steve Teale said: This is incomplete at this point, but there's a working example. I have to break off now and do some building work. You can find documentation and a zip file (currently it is Windows only, DMD2.026, and

Re: TypeInfoEx: it's here!

2009-04-20 Thread Kagamin
fst tbyte ptr [eax]

Re: dmd 2.029 release

2009-04-20 Thread BCS
Hello Walter, This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip Cool template function literals sounds interesting

Re: dmd 2.029 release

2009-04-20 Thread Simen Kjaeraas
On Mon, 20 Apr 2009 09:09:09 +0200, Walter Bright wrote: This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip Butbutbut... I've just barely managed to install 2.02

dmd 2.029 release

2009-04-20 Thread Walter Bright
This is a major revision to Phobos, including Andrei's revolutionary new range support. http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.029.zip