Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Jonathan M Davis
On Tuesday, September 06, 2011 08:42:14 Jacob Carlborg wrote: > On 2011-09-06 08:00, Walter Bright wrote: > > On 9/5/2011 7:48 PM, Andrei Alexandrescu wrote: > >> I agree with all of the above. However, as is often the case, there's > >> more than > >> one side to the story. > >> > >> Bad APIs hav

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Jacob Carlborg
On 2011-09-06 08:00, Walter Bright wrote: On 9/5/2011 7:48 PM, Andrei Alexandrescu wrote: I agree with all of the above. However, as is often the case, there's more than one side to the story. Bad APIs have their costs too. We can't afford to have an XML library that offers few and badly packag

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Jacob Carlborg
On 2011-09-06 04:48, Andrei Alexandrescu wrote: I agree with all of the above. However, as is often the case, there's more than one side to the story. Bad APIs have their costs too. We can't afford to have an XML library that offers few and badly packaged features and comes at the tail of all be

Re: Review Queue: std.log, std.regionallocator, or something else?

2011-09-05 Thread Jacob Carlborg
On 2011-09-06 02:33, dsimcha wrote: == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article dsimcha, is there any reason not to start the review of the region allocator shortly? Does a review period of about 2 weeks, ending on Wednesday, the 21st sound good? - Jonathan M Davis Sounds pe

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Walter Bright
On 9/5/2011 7:48 PM, Andrei Alexandrescu wrote: I agree with all of the above. However, as is often the case, there's more than one side to the story. Bad APIs have their costs too. We can't afford to have an XML library that offers few and badly packaged features and comes at the tail of all be

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > In many ways a language's standard library is a > showcase of the language, YES!!! I'm glad someone besides me finally realizes this. For example, whenever someone asks me about why D metaprogramming is so great, I just

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Josh Simmons
On Tue, Sep 6, 2011 at 12:48 PM, Andrei Alexandrescu wrote: > On 09/05/2011 04:51 PM, Walter Bright wrote: >>> >>> If the new std.path breaks existing code, I need to fix it before it is >>> released. Please let me know what problems you are experiencing. >> >> It prints out all the deprecation me

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Andrei Alexandrescu
On 09/05/2011 04:51 PM, Walter Bright wrote: If the new std.path breaks existing code, I need to fix it before it is released. Please let me know what problems you are experiencing. It prints out all the deprecation message. It means I'll have to go edit existing, working code to change the nam

Re: Review Queue: std.log, std.regionallocator, or something else?

2011-09-05 Thread dsimcha
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article > dsimcha, is there any reason not to start the review of the region allocator > shortly? Does a review period of about 2 weeks, ending on Wednesday, the 21st > sound good? > - Jonathan M Davis Sounds perfect. Thanks. A few issues th

Re: Review Queue: std.log, std.regionallocator, or something else?

2011-09-05 Thread Jonathan M Davis
On Wednesday, August 31, 2011 23:56:04 dsimcha wrote: > Unless something has changed, the review of std.curl (formerly etc.curl > but I think there's some agreement now that it should be in std) ends > today. (David Naglinger is the review manager. David, please make this > official.) > > Since

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Adam Ruppe
Count me as another who is sick and tired of the gratuitous breaking changes every damned month. The worst part is there's still some new stuff I actually want each month, so I'm not doing my usual strategy of never, ever, ever updating software. It's just pain. Trivial changes are easy enough to

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread bearophile
Jonathan M Davis: > > Breaking std.stdio, which is used everywhere, this thoroughly needs a very > > high bar of justification. > > Agreed. The purpose of the gofix tool in the Go language library is to lower this bar significantly :-) Bye, bearophile

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread bearophile
Andrej Mitrovic: > It would really help out if we had some sort of semi-automated script > that can do at least partial translation of code that uses old phobos > functions to new ones. Maybe this wouldn't work 100% but at least it > would help out. I'm thinking of something similar to what Python

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Timon Gehr
On 09/06/2011 12:36 AM, zeljkog wrote: On 05.09.2011 23:06, Timon Gehr wrote: The aggregate to loop over is evaluated at compile time: int[] getAggregate(){return [1,2,3,];} static foreach(x;getAggregate()) { pragma(msg,x); } Eh :) For me the only compile time agregate is tuple. foreach a

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread zeljkog
On 05.09.2011 23:06, Timon Gehr wrote: The aggregate to loop over is evaluated at compile time: int[] getAggregate(){return [1,2,3,];} static foreach(x;getAggregate()) { pragma(msg,x); } Eh :) For me the only compile time agregate is tuple. We should talk about basic looping construct for c

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Marco Leise
Am 06.09.2011, 00:05 Uhr, schrieb Andrej Mitrovic : On 9/5/11, Walter Bright wrote: It prints out all the deprecation message. It means I'll have to go edit existing, working code to change the names. It would really help out if we had some sort of semi-automated script that can do at leas

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > On 9/4/2011 2:17 AM, Lars T. Kyllingstad wrote: > I'll again note that I know of know successful operating system or programming > language that goes around breaking existing code unless it is really, really > urgent. > Camel-cas

Re: Pinball Construction Set creator Bill Budge talks shortly about D and Go

2011-09-05 Thread Nick Sabalausky
"Paulo Pinto" wrote in message news:j3goop$1kh3$1...@digitalmars.com... > You can read about it here, > http://www.gamasutra.com/view/feature/6470/a_conversation_with_bill_budge.php?print=1 > This interview also ended up published in the Sept 2011 issue of Game Developer Magazine.

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Andrej Mitrovic
On 9/5/11, Walter Bright wrote: > It prints out all the deprecation message. It means I'll have to go edit > existing, working code to change the names. It would really help out if we had some sort of semi-automated script that can do at least partial translation of code that uses old phobos func

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread bearophile
Simen Kjaeraas: > Certainly we could sit in a corner and pray to almighty Walter that this be > implemented, Walter did find problems in trying to implement a *full* static foreach. Walter is intelligent, quite experienced, and knows the DMD codebase well, but he's just one person. So maybe if

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Walter Bright
On 9/4/2011 2:17 AM, Lars T. Kyllingstad wrote: On Sat, 03 Sep 2011 18:23:26 -0700, Walter Bright wrote: [I also don't like it that all my code that uses std.path is now broken.] What do you mean by "broken"? That it does not compile or work as expected, or that it spits out a bunch of annoy

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread bearophile
Andrei Alexandrescu: > We need a form of iteration that, just like > static if, plants symbols in the current scope, not in a new scope. > StaticIota is unable to help with that. A good static foreach works outside any functions too (as static if), at global scope. Bye, bearophile

Re: Just wanted to say

2011-09-05 Thread Andrei Alexandrescu
On 9/5/11 17:16 EDT, Andrei Alexandrescu wrote: On 9/5/11 14:38 EDT, Steve Teale wrote: I've been using a recent version of D2 along with gtkD and Code::Blocks to redo a quite complicated Windows GUI program I wrote back in the mid 90s with the changes I've though of since then, in an Ubuntu env

Re: Just wanted to say

2011-09-05 Thread Andrei Alexandrescu
On 9/5/11 14:38 EDT, Steve Teale wrote: I've been using a recent version of D2 along with gtkD and Code::Blocks to redo a quite complicated Windows GUI program I wrote back in the mid 90s with the changes I've though of since then, in an Ubuntu environment. This combination has definitely made m

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Timon Gehr
On 09/05/2011 10:43 PM, zeljkog wrote: On 05.09.2011 21:55, Timon Gehr wrote: static foreach is part of the design. The only reason it is not in the compiler (and we have the kludgy foreach that works on tuples) is because Walter experienced implementation difficulties. Before implementation

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread zeljkog
On 05.09.2011 21:55, Timon Gehr wrote: static foreach is part of the design. The only reason it is not in the compiler (and we have the kludgy foreach that works on tuples) is because Walter experienced implementation difficulties. Before implementation somebody must precisely define static

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Andrei Alexandrescu
On 9/5/11 13:31 EDT, Simen Kjaeraas wrote: On Mon, 05 Sep 2011 13:05:23 +0200, bearophile wrote: Robert Jacques: > Seconded. StaticIota is extremely useful for loop unrolling optimizations, e.g.: vote++ vote-- StaticIota is not the good solution. I have explained why elsewhere: http://d.

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Timon Gehr
On 09/05/2011 08:19 PM, kenji hara wrote: 2011/9/6 Simen Kjaeraas: On Mon, 05 Sep 2011 13:05:23 +0200, bearophile wrote: Robert Jacques: Seconded. StaticIota is extremely useful for loop unrolling optimizations, e.g.: vote++ vote-- StaticIota is not the good solution. I have explained

Re: Just wanted to say

2011-09-05 Thread Andrej Mitrovic
What kind of app? It would be cool if you would write a blog post about your experience (if you have the free time & would like to do that). :)

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Simen Kjaeraas
On Mon, 05 Sep 2011 19:49:43 +0200, Timon Gehr wrote: On 09/05/2011 07:31 PM, Simen Kjaeraas wrote: On Mon, 05 Sep 2011 13:05:23 +0200, bearophile wrote: Robert Jacques: > Seconded. StaticIota is extremely useful for loop unrolling optimizations, e.g.: vote++ vote-- StaticIota is not

Re: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread kennytm
bearophile wrote: > Robert Jacques: > >>> Seconded. StaticIota is extremely useful for loop unrolling optimizations, >>> e.g.: >> >> vote++ > > vote-- > > StaticIota is not the good solution. I have explained why elsewhere: > http://d.puremagic.com/issues/show_bug.cgi?id=4085 > > Bye, > bea

Re: toString or not toString

2011-09-05 Thread Marco Leise
Am 05.09.2011, 19:51 Uhr, schrieb Sean Kelly : On Sep 3, 2011, at 9:06 PM, Andrei Alexandrescu wrote: On 8/30/11 8:59 PM, Paul D. Anderson wrote: Can someone clarify for me the status and/or direction of string formatting in D? [snip] I agree there are major inefficiencies and composability

Just wanted to say

2011-09-05 Thread Steve Teale
I've been using a recent version of D2 along with gtkD and Code::Blocks to redo a quite complicated Windows GUI program I wrote back in the mid 90s with the changes I've though of since then, in an Ubuntu environment. This combination has definitely made me highly productive. D is a joy to use, an

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread bearophile
Simen Kjaeraas: > Yes, static foreach would be nice, but the means to do what it would do, > are easily implemented in the language as is. Notes: - I am not asking for a real static foreach. The main point of bug 4085 is that that even half static foreach is better than the current situation.

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread kenji hara
2011/9/6 Simen Kjaeraas : > On Mon, 05 Sep 2011 13:05:23 +0200, bearophile > wrote: > >> Robert Jacques: >> >>> > Seconded.  StaticIota is extremely useful for loop unrolling >>> > optimizations, e.g.: >>> >>> vote++ >> >> vote-- >> >> StaticIota is not the good solution. I have explained why else

Re: toString or not toString

2011-09-05 Thread Sean Kelly
On Sep 3, 2011, at 9:06 PM, Andrei Alexandrescu wrote: > On 8/30/11 8:59 PM, Paul D. Anderson wrote: >> Can someone clarify for me the status and/or direction of string >> formatting in D? > [snip] > > I agree there are major inefficiencies and composability problems caused by a > blind toString

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Timon Gehr
On 09/05/2011 07:31 PM, Simen Kjaeraas wrote: On Mon, 05 Sep 2011 13:05:23 +0200, bearophile wrote: Robert Jacques: > Seconded. StaticIota is extremely useful for loop unrolling optimizations, e.g.: vote++ vote-- StaticIota is not the good solution. I have explained why elsewhere: http:/

Re: toString or not toString

2011-09-05 Thread Sean Kelly
On Sep 3, 2011, at 2:41 AM, Christophe wrote: 1. provide an alias void delegate(const(char)[]) Sink; This should be in std.conv; or std.format;, because nobody wants to add it to every single module and if there is a standard way to handle it, no maintenance programmer will

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread Simen Kjaeraas
On Mon, 05 Sep 2011 13:05:23 +0200, bearophile wrote: Robert Jacques: > Seconded. StaticIota is extremely useful for loop unrolling optimizations, e.g.: vote++ vote-- StaticIota is not the good solution. I have explained why elsewhere: http://d.puremagic.com/issues/show_bug.cgi?id=40

Re: How to Design a Good API and Why it Matters

2011-09-05 Thread Alix Pexton
On 05/09/2011 14:44, Mirko Pilger wrote: anyone has any other good API design resources to share. http://www.amazon.com/API-Design-C-Martin-Reddy/dp/0123850037 At first I worried that this would be too C++ specific, but from what I have seen in the example pages the opening chapters at least

Re: How to Design a Good API and Why it Matters

2011-09-05 Thread Jacob Carlborg
On 2011-09-05 15:09, Alix Pexton wrote: On 05/09/2011 13:11, Jacob Carlborg wrote: Another good read is the book "Clean Code": http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 Thanks for the recommendation! Looks like an interesting read, but my cursory glance

Re: How to Design a Good API and Why it Matters

2011-09-05 Thread Jacob Carlborg
On 2011-09-05 15:09, Alix Pexton wrote: On 05/09/2011 13:11, Jacob Carlborg wrote: Another good read is the book "Clean Code": http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 Thanks for the recommendation! Looks like an interesting read, but my cursory glance

Re: toString or not toString

2011-09-05 Thread Timon Gehr
On 09/05/2011 03:29 PM, Andrei Alexandrescu wrote: On 9/5/11 8:38 AM, Timon Gehr wrote: On 09/04/2011 05:46 AM, Andrei Alexandrescu wrote: On 9/3/11 4:40 PM, Timon Gehr wrote: On 09/03/2011 07:21 PM, Andrei Alexandrescu wrote: On 9/3/11 5:41 AM, Christophe wrote: 1. provide an alias void del

Re: toString or not toString

2011-09-05 Thread Timon Gehr
On 09/05/2011 03:33 PM, Andrei Alexandrescu wrote: On 9/5/11 12:22 AM, Walter Bright wrote: On 9/4/2011 7:34 PM, Andrei Alexandrescu wrote: On 9/4/11 22:20 EDT, kenji hara wrote: 2011/9/4 Andrei Alexandrescu: There are suggestions to add this method to Object: void writeTo(void delegate(cons

Re: How to Design a Good API and Why it Matters

2011-09-05 Thread Mirko Pilger
anyone has any other good API design resources to share. http://www.amazon.com/API-Design-C-Martin-Reddy/dp/0123850037

Re: toString or not toString

2011-09-05 Thread Andrei Alexandrescu
On 9/5/11 12:22 AM, Walter Bright wrote: On 9/4/2011 7:34 PM, Andrei Alexandrescu wrote: On 9/4/11 22:20 EDT, kenji hara wrote: 2011/9/4 Andrei Alexandrescu: There are suggestions to add this method to Object: void writeTo(void delegate(const(char)[]) sink, string format = null); I think co

Re: toString or not toString

2011-09-05 Thread Andrei Alexandrescu
On 9/5/11 8:38 AM, Timon Gehr wrote: On 09/04/2011 05:46 AM, Andrei Alexandrescu wrote: On 9/3/11 4:40 PM, Timon Gehr wrote: On 09/03/2011 07:21 PM, Andrei Alexandrescu wrote: On 9/3/11 5:41 AM, Christophe wrote: 1. provide an alias void delegate(const(char)[]) Sink; This should be in std.con

Re: How to Design a Good API and Why it Matters

2011-09-05 Thread Alix Pexton
On 05/09/2011 13:11, Jacob Carlborg wrote: Another good read is the book "Clean Code": http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 Thanks for the recommendation! Looks like an interesting read, but my cursory glance through the index on Amazon didn't aligh

Re: toString or not toString

2011-09-05 Thread Timon Gehr
On 09/04/2011 05:46 AM, Andrei Alexandrescu wrote: On 9/3/11 4:40 PM, Timon Gehr wrote: On 09/03/2011 07:21 PM, Andrei Alexandrescu wrote: On 9/3/11 5:41 AM, Christophe wrote: 1. provide an alias void delegate(const(char)[]) Sink; This should be in std.conv; or std.format;, because nobody want

Re: How to Design a Good API and Why it Matters

2011-09-05 Thread Jacob Carlborg
On 2011-09-05 11:55, Alix Pexton wrote: I had a quick look through the archives to see if anything about this talk by Joshua Bloch had been posted before, but couldn't find any references. Here are the slides... http://lcsd05.cs.tamu.edu/slides/keynote.pdf I think I remember seeing a (poor qual

Re: std.stdio overhaul by Steve Schveighoffer

2011-09-05 Thread Kagamin
Andrei Alexandrescu Wrote: > http://erdani.com/d/new-stdio/phobos-prerelease/std_stdio.html Ddoc screwed the types, right?

Re: RFC: StaticFilter, PApply, Compose, template predicates

2011-09-05 Thread bearophile
Robert Jacques: > > Seconded. StaticIota is extremely useful for loop unrolling optimizations, > > e.g.: > > vote++ vote-- StaticIota is not the good solution. I have explained why elsewhere: http://d.puremagic.com/issues/show_bug.cgi?id=4085 Bye, bearophile

How to Design a Good API and Why it Matters

2011-09-05 Thread Alix Pexton
I had a quick look through the archives to see if anything about this talk by Joshua Bloch had been posted before, but couldn't find any references. Here are the slides... http://lcsd05.cs.tamu.edu/slides/keynote.pdf I think I remember seeing a (poor quality) video of the presentation too. I'