Re: What's left to do for a stable D2?

2010-01-21 Thread bearophile
Jesse Phillips: > This page[1] has been getting regular updates, so it should do a good > job answering the question. > 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections Most things on that page seems OK and not too much complex to understand. There are two things in that p

Re: Guy Steele on language design

2010-01-21 Thread Nick Sabalausky
"Simen kjaeraas" wrote in message news:op.u6t6wwhwvxi...@biotronic-pc.home... > Bane wrote: > >> So he's programming during day and acting over night? Man, that is >> perfect job! > > Nonono. He's a programmer at night and actor during the day. > How could anyone ever program while the sun is u

dmd warning request: warn for bitwise OR in conditional

2010-01-21 Thread Ali Çehreli
We've been bitten by the following bug recently in C code: uint flag = 0x1; uint flags; if (flags | flag) { dout.writefln("oops"); } The programmer intended &. It is (almost?) always an error to use | in a conditional. At least the conditional in the above code is alwa

Re: D Language 2.0

2010-01-21 Thread BCS
Hello Andrei, BCS wrote: Hello Andrei, Well if we get into details we'll figure that things must be quite different for different memory management models. For example Object in ref-counted mode is not a class anymore, it's a struct. So now there's going to be two parts in an app: those in w

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
BCS wrote: Hello Andrei, Well if we get into details we'll figure that things must be quite different for different memory management models. For example Object in ref-counted mode is not a class anymore, it's a struct. So now there's going to be two parts in an app: those in which Object is a

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Well if we get into details we'll figure that things must be quite different for different memory management models. For example Object in ref-counted mode is not a class anymore, it's a struct. So now the

Re: D Language 2.0

2010-01-21 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > Well if we get into details we'll figure that things must be quite > different for different memory management models. For example Object in > ref-counted mode is not a class anymore, it's a struct. So now there's > going

Re: D Language 2.0

2010-01-21 Thread BCS
Hello Andrei, Well if we get into details we'll figure that things must be quite different for different memory management models. For example Object in ref-counted mode is not a class anymore, it's a struct. So now there's going to be two parts in an app: those in which Object is a class, and t

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
Craig Black wrote: "Andrei Alexandrescu" wrote in message news:hj8gd7$2so...@digitalmars.com... Craig Black wrote: "Andrei Alexandrescu" wrote in message news:hj7vnu$200...@digitalmars.com... BCS wrote: Hello Andrei, The nice part about refcounting is that for the most part you don't

Re: D Language 2.0

2010-01-21 Thread Craig Black
"Andrei Alexandrescu" wrote in message news:hj8gd7$2so...@digitalmars.com... Craig Black wrote: "Andrei Alexandrescu" wrote in message news:hj7vnu$200...@digitalmars.com... BCS wrote: Hello Andrei, The nice part about refcounting is that for the most part you don't need to cripple the

Re: What's left to do for a stable D2?

2010-01-21 Thread Jesse Phillips
Jason House wrote: > Andrei's finishing his last TDPL chapter, Sean is updating std.thread(?), and > Walter's been fixing forward reference and CTFE bugs. What's left? This page[1] has been getting regular updates, so it should do a good job answering the question. 1. http://www.prowiki.org/wi

Re: opDispatch or equivalent at static context

2010-01-21 Thread Ali Çehreli
Chris Nicholson-Sauls wrote: Isn't that what opDispatch does now? -Lars Not as a static member, to my knowledge. At the very least, I see no mention of static forwarding in the docs: http://www.digitalmars.com/d/2.0/operatoroverloading.html#Dispatch The fact that the name of the non-exis

What's left to do for a stable D2?

2010-01-21 Thread Jason House
Andrei's finishing his last TDPL chapter, Sean is updating std.thread(?), and Walter's been fixing forward reference and CTFE bugs. What's left?

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
Bill Baxter wrote: On Thu, Jan 21, 2010 at 2:43 PM, Andrei Alexandrescu wrote: Walter Bright wrote: retard wrote: On Linux the processes almost always stay on main memory, and only start to fill swap when running out of main memory. So unless you have no swap set up, OOM cannot happen unless

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread Andrei Alexandrescu
Rainer Deyke wrote: Andrei Alexandrescu wrote: std.traits has a Unsigned template. I plan to add two functions: signed(x) and unsigned(x), which transform the integral x into the signed/unsigned integral of the same size. Generic code could then call signed or unsigned wherever necessary. For ab

Re: D Language 2.0

2010-01-21 Thread Rainer Deyke
Andrei Alexandrescu wrote: > Please stop spreading that information. Even if it has truth to it, it's > not a reason to throw our hands in the air. In my field apps routinely > encounter and handle the problem of running tight on memory. I think in general it's better to detect and respond to low

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread Rainer Deyke
Andrei Alexandrescu wrote: > std.traits has a Unsigned template. I plan to add two functions: > signed(x) and unsigned(x), which transform the integral x into the > signed/unsigned integral of the same size. Generic code could then call > signed or unsigned wherever necessary. For abs, they'd have

Re: D Language 2.0

2010-01-21 Thread Johan Granberg
Andrei Alexandrescu wrote: > BCS wrote: >> Hello Andrei, >> >>> BCS wrote: >>> Also there is one thing that -nogc would have over what you are talking about; you could use it on some modules and not others. If I have some performance critical code where attempting to use the GC >>>

Re: D Language 2.0

2010-01-21 Thread sclytrack
> > It's much more complicated than that. What if a library returns an > > object or an array to another library? > The same that happens in C now, memory management is part of the interface > and you should state if the returned object's memory is managed by the > library or the user. library or

Re: D Language 2.0

2010-01-21 Thread Bill Baxter
On Thu, Jan 21, 2010 at 2:43 PM, Andrei Alexandrescu wrote: > Walter Bright wrote: >> >> retard wrote: >>> >>> On Linux the processes almost always stay on main memory, and only start >>> to fill swap when running out of main memory. So unless you have no swap set >>> up, OOM cannot happen unless

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
Walter Bright wrote: retard wrote: On Linux the processes almost always stay on main memory, and only start to fill swap when running out of main memory. So unless you have no swap set up, OOM cannot happen unless the swap is >95% filled. OOM inside the GC's virtual memory space can happen ear

Re: Isn't it time

2010-01-21 Thread Jesse Phillips
Steve Teale Wrote: > I don't believe that D aficionados are going to post many 'wow, this is cool > - look at this' articles on the .learn group. They'll answer questions, yes, > but with its rankings sinking, D needs more oomph. Truth is that D aficionados don't really post those here either.

Re: D Language 2.0

2010-01-21 Thread Walter Bright
retard wrote: On Linux the processes almost always stay on main memory, and only start to fill swap when running out of main memory. So unless you have no swap set up, OOM cannot happen unless the swap is >95% filled. OOM inside the GC's virtual memory space can happen earlier, of course. Yea

Re: Isn't it time

2010-01-21 Thread Steve Teale
Jesse Phillips Wrote: > Steve Teale Wrote: > > > That this newsgroup was renamed digitalmars.d2. Probably > 80% of the > > discussion here is on topics relating to the evolution of the language. > > Don't get me wrong, as soon as D2 is stable, I'll be the first to switch. > > > > But where doe

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread Andrei Alexandrescu
Rainer Deyke wrote: Don wrote: bearophile wrote: And abs() of an unsigned number probably needs a compilation warning. Not a warning, it's always an error. I can imagine abs(x) being useful in a generic function where x can be either signed or unsigned. std.traits has a Unsigned template.

Re: D Language 2.0

2010-01-21 Thread retard
Thu, 21 Jan 2010 18:38:07 +, BCS wrote: > Hello bearophile, >> (And it can be positive to define a standard way the D GC talks with >> the virtual memory subsystem of the operationg system, to avoid useless >> swaps from and to disk). > > IIRC virtual memeory and swapping has little or nothi

Re: D Language 2.0

2010-01-21 Thread BCS
Hello bearophile, Walter Bright: You can design a system that has "free these blobs of memory I'm keeping in reserve if I run out and hopefully that will be enough", but that strategy needs to be part of the gc itself, not user recovery code. Do you mean that the D2 GC API needs to grow some

Re: Isn't it time

2010-01-21 Thread Jesse Phillips
Steve Teale Wrote: > That this newsgroup was renamed digitalmars.d2. Probably > 80% of the > discussion here is on topics relating to the evolution of the language. Don't > get me wrong, as soon as D2 is stable, I'll be the first to switch. > > But where does the current discussion leave those

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread Rainer Deyke
Don wrote: > bearophile wrote: >> And abs() of an unsigned number probably needs a compilation warning. > > Not a warning, it's always an error. I can imagine abs(x) being useful in a generic function where x can be either signed or unsigned. -- Rainer Deyke - rain...@eldwood.com

Isn't it time

2010-01-21 Thread Steve Teale
That this newsgroup was renamed digitalmars.d2. Probably > 80% of the discussion here is on topics relating to the evolution of the language. Don't get me wrong, as soon as D2 is stable, I'll be the first to switch. But where does the current discussion leave those of us who want to use D and

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
Leandro Lucarella wrote: Andrei Alexandrescu, el 20 de enero a las 20:48 me escribiste: BCS wrote: Hello Andrei, BCS wrote: Also there is one thing that -nogc would have over what you are talking about; you could use it on some modules and not others. If I have some performance critical cod

Re: D Language 2.0

2010-01-21 Thread Andrei Alexandrescu
Leandro Lucarella wrote: Andrei Alexandrescu, el 20 de enero a las 19:13 me escribiste: Leandro Lucarella wrote: Andrei Alexandrescu, el 20 de enero a las 17:39 me escribiste: Leandro Lucarella wrote: Danny Wilson, el 20 de enero a las 16:44 me escribiste: On Wed, 20 Jan 2010 14:18:52 +0100,

Re: D Language 2.0

2010-01-21 Thread Leandro Lucarella
Walter Bright, el 21 de enero a las 02:18 me escribiste: > Leandro Lucarella wrote: > >But I don't think people that *really* need to be in full control would > >see a RC GC as something tempting. As long as there is an option to > >(easily) avoid the GC, I'm happy, if you want to provice an RC > >

Re: D Language 2.0

2010-01-21 Thread Leandro Lucarella
Andrei Alexandrescu, el 20 de enero a las 20:48 me escribiste: > BCS wrote: > >Hello Andrei, > > > >>BCS wrote: > >> > >>>Also there is one thing that -nogc would have over what you are > >>>talking about; you could use it on some modules and not others. If I > >>>have some performance critical cod

Re: D Language 2.0

2010-01-21 Thread Leandro Lucarella
Walter Bright, el 21 de enero a las 02:15 me escribiste: > Often programs that purportedly can recover from oom actually > cannot, because they were never tested and the recovery code doesn't > work. Unless you use fault-injection. Is *not* that rare... -- Leandro Lucarella (AKA luca)

Re: D Language 2.0

2010-01-21 Thread Leandro Lucarella
Andrei Alexandrescu, el 20 de enero a las 19:13 me escribiste: > Leandro Lucarella wrote: > >Andrei Alexandrescu, el 20 de enero a las 17:39 me escribiste: > >>Leandro Lucarella wrote: > >>>Danny Wilson, el 20 de enero a las 16:44 me escribiste: > On Wed, 20 Jan 2010 14:18:52 +0100, Leandro Luc

Re: D Language 2.0

2010-01-21 Thread bearophile
Walter Bright: > You can design a system that has "free these blobs of memory I'm keeping > in reserve if I run out and hopefully that will be enough", but that > strategy needs to be part of the gc itself, not user recovery code. Do you mean that the D2 GC API needs to grow something to tell th

Re: D Language 2.0

2010-01-21 Thread Walter Bright
Leandro Lucarella wrote: But I don't think people that *really* need to be in full control would see a RC GC as something tempting. As long as there is an option to (easily) avoid the GC, I'm happy, if you want to provice an RC implementation then, great. I can't see an RC implementation fitting

Re: D Language 2.0

2010-01-21 Thread Walter Bright
Michel Fortin wrote: But that's probably just a bug somewhere. We decided that gc allocations are allowable inside a "nothrow" function. The idea is that there are two classifications of exceptions - recoverable and non-recoverable. "nothrow" only refers to recoverable ones. Out of memory is

Re: opDispatch or equivalent at static context

2010-01-21 Thread Lutger
On 01/21/2010 09:28 AM, Chris Nicholson-Sauls wrote: Lars T. Kyllingstad wrote: Chris Nicholson-Sauls wrote: (Apologies ahead of time if I've overlooked something.) How possible could it be to have opDispatch or an equivalent feature (opStaticDispatch?) available for static forwarding? Use-cas

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread Andrei Alexandrescu
Don wrote: bearophile wrote: And abs() of an unsigned number probably needs a compilation warning. Not a warning, it's always an error. Ok, makes sense. I'll operate the change in Phobos. Andrei

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread Don
bearophile wrote: And abs() of an unsigned number probably needs a compilation warning. Not a warning, it's always an error.

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread bearophile
And abs() of an unsigned number probably needs a compilation warning. Bye, bearophile

Re: opDispatch or equivalent at static context

2010-01-21 Thread Chris Nicholson-Sauls
Lars T. Kyllingstad wrote: Chris Nicholson-Sauls wrote: (Apologies ahead of time if I've overlooked something.) How possible could it be to have opDispatch or an equivalent feature (opStaticDispatch?) available for static forwarding? Use-case: I'm envisioning an ORM library, where one could

Re: opDispatch or equivalent at static context

2010-01-21 Thread Lars T. Kyllingstad
Chris Nicholson-Sauls wrote: (Apologies ahead of time if I've overlooked something.) How possible could it be to have opDispatch or an equivalent feature (opStaticDispatch?) available for static forwarding? Use-case: I'm envisioning an ORM library, where one could do things like: Player.

Re: "Unsigned-related bugs never occur in real code."

2010-01-21 Thread bearophile
Andrei Alexandrescu: >May this post be an innocent victim of the war against unsigned-related bugs.< Unsigned numbers are evil (especially if you use them in a language with no integral overflow tests). A partial solution to this problem is: 1) to use them in a program only where you really need

opDispatch or equivalent at static context

2010-01-21 Thread Chris Nicholson-Sauls
(Apologies ahead of time if I've overlooked something.) How possible could it be to have opDispatch or an equivalent feature (opStaticDispatch?) available for static forwarding? Use-case: I'm envisioning an ORM library, where one could do things like: Player.findFirstByName( "Bob" )