Re: Why is null lowercase?

2013-01-25 Thread Don
On Friday, 25 January 2013 at 01:17:44 UTC, Ali Çehreli wrote: On 01/24/2013 12:42 PM, Matthew Caron wrote: for not null checks if ( ptr !is null) ... And too much perl has me wanting to write: if (ptr is not null) IIRC, the !is operator is thanks to bearophile. No, it's from 2002

Re: Why is null lowercase?

2013-01-25 Thread Ali Çehreli
On 01/25/2013 06:22 AM, Don wrote: IIRC, the !is operator is thanks to bearophile. No, it's from 2002 (well, it was !==, renamed to !is in 2005). Bearophile only joined us about the time D2 began, in late 2007. Ok. How about !in then? Did he lobby for that one? :) Ali

Re: Segfault in _d_dynamic_cast ()

2013-01-25 Thread Minas Mina
I found what the root of all evil was - The GC. After disabling it, the program runs fine.

Re: Why is null lowercase?

2013-01-25 Thread Maxim Fomin
On Friday, 25 January 2013 at 14:22:20 UTC, Don wrote: On Friday, 25 January 2013 at 01:17:44 UTC, Ali Çehreli wrote: On 01/24/2013 12:42 PM, Matthew Caron wrote: for not null checks if ( ptr !is null) ... And too much perl has me wanting to write: if (ptr is not null) IIRC, the !is

Re: Segfault in _d_dynamic_cast ()

2013-01-25 Thread Maxim Fomin
On Friday, 25 January 2013 at 15:15:32 UTC, Minas Mina wrote: I found what the root of all evil was - The GC. After disabling it, the program runs fine. Perhaps you was working with C code, GC + legacy code sometimes lead to logical memory errors. However GC per se is unlikely to cause any

Re: Coping files and folders

2013-01-25 Thread Ali Çehreli
On 01/24/2013 10:23 PM, Joel wrote: // parallel foreach for regular files foreach(fn ; taskPool.parallel(files,100)) { What is the 100 number for? It is the work unit size: http://dlang.org/phobos/std_parallelism.html#.TaskPool Quoting: The number of elements processed per work unit is

Re: Why is null lowercase?

2013-01-25 Thread Era Scarecrow
On Friday, 25 January 2013 at 14:43:01 UTC, Ali Çehreli wrote: On 01/25/2013 06:22 AM, Don wrote: No, it's from 2002 (well, it was !==, renamed to !is in 2005). Bearophile only joined us about the time D2 began, in late 2007. Ok. How about !in then? Did he lobby for that one? :) //hmmm

Re: Why is null lowercase?

2013-01-25 Thread Ali Çehreli
On 01/25/2013 10:31 AM, Era Scarecrow wrote: On Friday, 25 January 2013 at 14:43:01 UTC, Ali Çehreli wrote: On 01/25/2013 06:22 AM, Don wrote: No, it's from 2002 (well, it was !==, renamed to !is in 2005). Bearophile only joined us about the time D2 began, in late 2007. Ok. How about !in

Re: Why is null lowercase?

2013-01-25 Thread Era Scarecrow
On Friday, 25 January 2013 at 18:57:06 UTC, Ali Çehreli wrote: On 01/25/2013 10:31 AM, Era Scarecrow wrote: After looking at all these 'in' should be reserved for array searching, not pointer checking. It makes more sense to me that way. Sorry if I implied otherwise. Yes, 'in' should be for

Re: Segfault in _d_dynamic_cast ()

2013-01-25 Thread Minas Mina
Maybe. I am re-writing the code in C++ to see, and also to compare the performance.

Re: Segfault in _d_dynamic_cast ()

2013-01-25 Thread Minas Mina
On Friday, 25 January 2013 at 16:19:15 UTC, Maxim Fomin wrote: On Friday, 25 January 2013 at 15:15:32 UTC, Minas Mina wrote: I found what the root of all evil was - The GC. After disabling it, the program runs fine. Perhaps you was working with C code, GC + legacy code sometimes lead to

Re: Segfault in _d_dynamic_cast ()

2013-01-25 Thread David
I have written the same program in C++ -- and I get no seg-fault. Well I don't know for sure that something isn't wrong with my code, but I suspect it is the GC that is messing things up. This is definitly possible, I also had random segfaults GC related. It worked fine on my PC, but crashed

Re: Coping files and folders

2013-01-25 Thread Jay Norwood
I also wrote a copy version that orders file sequence on disk efficiently, using write through, and posted it. This speeds up any subsequent file system operations done in the directory order as if you have done a defrag. Great for hard drives, but not needed for ssd.