Threading errors.

2010-07-26 Thread dcoder
Hello. I am working through Alexandrescu's "The D Programming Language". He has an example in his concurrency chapter which I can't compile. It looks to be missing a few import packages, but getting over that, I still can't get the example to work: import std.concurrency, std.stdio; import std.

Re: Threading errors.

2010-07-26 Thread Dmitry Olshansky
On 26.07.2010 19:45, dcoder wrote: Hello. [snip] $ dmd --help Digital Mars D Compiler v2.042 Copyright (c) 1999-2010 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/2.0/index.html I suggest updating compiler - it's should be 2.047 now. The outdate

Re: Threading errors.

2010-07-26 Thread Rory Mcguire
Dmitry Olshansky wrote: > On 26.07.2010 19:45, dcoder wrote: >> Hello. >> >> > [snip] >> $ dmd --help >> Digital Mars D Compiler v2.042 >> Copyright (c) 1999-2010 by Digital Mars written by Walter Bright >> Documentation: http://www.digitalmars.com/d/2.0/index.html >> >> >> > I suggest upd

Re: Threading errors.

2010-07-26 Thread dcoder
== Quote from Rory Mcguire (rjmcgu...@gm_no_ail.com)'s article > Dmitry Olshansky wrote: > > On 26.07.2010 19:45, dcoder wrote: > >> $ dmd --help > >> Digital Mars D Compiler v2.042 > >> Copyright (c) 1999-2010 by Digital Mars written by Walter Bright > >> Documentation: http://www.digitalmars.com/

Re: Threading errors.

2010-07-26 Thread Philippe Sigaud
On Mon, Jul 26, 2010 at 19:11, dcoder wrote: > == Quote from Rory Mcguire (rjmcgu...@gm_no_ail.com)'s article > > Dmitry Olshansky wrote: > std.typecons.Tuple fields cannot be indexed like arrays, Andrei made a mistake. To access field #n, use ._n or .field[n]. There is no difference between t

Re: Threading errors.

2010-07-27 Thread Rory Mcguire
Philippe Sigaud wrote: > On Mon, Jul 26, 2010 at 19:11, dcoder wrote: > >> == Quote from Rory Mcguire (rjmcgu...@gm_no_ail.com)'s article >> > Dmitry Olshansky wrote: >> > > > std.typecons.Tuple fields cannot be indexed like arrays, Andrei made a > mistake. To access field #n, use ._n or .fie

Re: Threading errors.

2010-07-27 Thread Philippe Sigaud
On Tue, Jul 27, 2010 at 11:25, Rory Mcguire wrote: > > > Also, in my case, the return; in writer must be commented out, or DMD > > complains it cannot be reached. > > > Interesting, I didn't have to comment out return; using dmd 2.047 on linux > I think I have -w (warnings treated as errors?)

Re: Threading errors.

2010-07-27 Thread Rory Mcguire
Philippe Sigaud wrote: > On Tue, Jul 27, 2010 at 11:25, Rory Mcguire > wrote: > >> >> > Also, in my case, the return; in writer must be commented out, or DMD >> > complains it cannot be reached. >> > > >> >> Interesting, I didn't have to comment out return; using dmd 2.047 on >> linux >> > >

Re: Threading errors.

2010-07-27 Thread dcoder
== Quote from Rory Mcguire (rjmcgu...@gm_no_ail.com)'s article > Philippe Sigaud wrote: > >> > Also, in my case, the return; in writer must be commented out, or DMD > >> > complains it cannot be reached. > >> > > > > > >> > >> Interesting, I didn't have to comment out return; using dmd 2.047 on > >

Re: Threading errors.

2010-07-27 Thread Sean Kelly
The next release, 2.048, should bring things in line with TDPL. I had meant to do this for 2.047, but was too busy with other work to finish in time.

Re: Threading errors.

2010-07-27 Thread Philippe Sigaud
On Tue, Jul 27, 2010 at 19:03, Sean Kelly wrote: > The next release, 2.048, should bring things in line with TDPL. I had > meant to do this for 2.047, but was too busy with other work to finish in > time. > Do you mean, indexing tuples directly by a CT value as in msg[1]? Because that was the o

Re: Threading errors.

2010-09-03 Thread Andrej Mitrovic
So what's the word on this? Will we have simple indexing of tuples via T[] or do we still need T.field[] and T._1 ? The situations is the same in 2.048 as it was in 2.047. There are more examples of tuples being used via T[] in some Phobos code examples (which don't compile and I've reported th