Re: So how exactly does one make a persistent range object?

2011-06-06 Thread Andrej Mitrovic
On 6/6/11, Jonathan M Davis jmdavisp...@gmx.com wrote: On the whole, I believe that ranges were generally intended to be processed and then tossed, which is usually what happens with iterators.. That's what I thought but wasn't sure if that was really the case. I don't really have a solid C++

Re: So how exactly does one make a persistent range object?

2011-06-06 Thread Timon Gehr
Andrej Mitrovic wrote: On 6/6/11, Jonathan M Davis jmdavisp...@gmx.com wrote: So, anything you do on your own could be polymorphic, but as soon as you get ranges from Phobos, you lose the polymorphism. Yeah, I've noticed that. I wouldn't want to loose the ability to call into

Re: Is this a good way of setting up a timer?

2011-06-06 Thread Steven Schveighoffer
On Fri, 03 Jun 2011 17:37:40 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 6/3/11, Jonathan M Davis jmdavisp...@gmx.com wrote: Generally, you'd just put it to sleep for the period of time that you want to wait for. The only reason that I see to keep waking it up is if it

Re: Template error and parallel foreach bug?

2011-06-06 Thread Steven Schveighoffer
On Sat, 04 Jun 2011 08:11:01 -0400, simendsjo simen.end...@pandavre.com wrote: On 04.06.2011 14:02, simendsjo wrote: The template implementation works on low numbers, but not on 1000 (haven't checked when it fails). It gives me the following error: euler1.d(23): Error: template instance

Are spawn'ed threads waited automatically?

2011-06-06 Thread Ali Çehreli
First, the answer may be as simple as use core.thread.thread_joinAll. Is that the proper way of waiting for all threads? Second, my question may not be a valid example as starting a thread without communicating with it may be under the umbrella of parallelization. Maybe in concurrency,

Re: Is this a good way of setting up a timer?

2011-06-06 Thread Andrej Mitrovic
On 6/6/11, Steven Schveighoffer schvei...@yahoo.com wrote: Then, you have a function that sets the bool and signals the condition: void endProgram() { synchronized(mutex) { if(engineActive) { engineActive = false; cond.notifyAll(); }

Re: Are spawn'ed threads waited automatically?

2011-06-06 Thread Steven Schveighoffer
On Mon, 06 Jun 2011 14:09:25 -0400, Ali Çehreli acehr...@yahoo.com wrote: First, the answer may be as simple as use core.thread.thread_joinAll. Is that the proper way of waiting for all threads? main (the C main, not D main) does this already:

Re: Are spawn'ed threads waited automatically?

2011-06-06 Thread Ali Çehreli
On 06/06/2011 12:07 PM, Steven Schveighoffer wrote: On Mon, 06 Jun 2011 14:09:25 -0400, Ali Çehreli acehr...@yahoo.com wrote: First, the answer may be as simple as use core.thread.thread_joinAll. Is that the proper way of waiting for all threads? main (the C main, not D main) does this

Re: Are spawn'ed threads waited automatically?

2011-06-06 Thread Jonathan M Davis
On 2011-06-06 14:37, Ali Çehreli wrote: On 06/06/2011 12:07 PM, Steven Schveighoffer wrote: On Mon, 06 Jun 2011 14:09:25 -0400, Ali Çehreli acehr...@yahoo.com wrote: First, the answer may be as simple as use core.thread.thread_joinAll. Is that the proper way of waiting for all threads?

Re: Are spawn'ed threads waited automatically?

2011-06-06 Thread Ali Çehreli
On 06/06/2011 03:52 PM, Jonathan M Davis wrote: At this point, I don't trust spawn at all (on Linux at least). I've had too many problems with it. Thank you. I've spawned threads from within threads and now received ThreadException and segmentation faults as well:

Conventions for installing third party libraries?

2011-06-06 Thread Jonathan Sternberg
I know for C/C++, include files are usually placed in prefix/include and libraries in prefix/lib. What's the convention for D files (as the module files would need to be given for imports and I'm assuming that you don't recompile the D files for every project). Where are these files typically

Re: Problem with dsss 0.78 rebuild error: out of memory

2011-06-06 Thread armando sano
I am trying to compile dsss from source using dmd v2.051 and get the same problem when the dsss executable (v0.78) is being compiled by rebuild as of: ./rebuild/rebuild -full -Irebuild sss/main.d -ofdsss Linux here too. Has the problem been fixed? armando

Re: Conventions for installing third party libraries?

2011-06-06 Thread Jonathan M Davis
On 2011-06-06 18:56, Jonathan Sternberg wrote: I know for C/C++, include files are usually placed in prefix/include and libraries in prefix/lib. What's the convention for D files (as the module files would need to be given for imports and I'm assuming that you don't recompile the D files for