Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Bryan O'Sullivan
On Fri, Dec 4, 2009 at 7:38 AM, Duncan Coutts wrote: > Wait! This is not going to work! > > You cannot use the MTGen from the mersenne-random in a concurrent IO > program because the C code uses a single global mutable RNG state. So use the PRNG in the statistics package instead. It's got some n

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Paul Johnson
On 04/12/09 11:51, Patrick Caldon wrote: I'm looking for the "right" concurrency library/semantics for what should be a reasonably simple problem. I have a little simulator: runWorldSim :: MTGen -> SimState -> IO SimState it takes about a second to run on a PC. It's functional except it wh

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Duncan Coutts
On Fri, 2009-12-04 at 22:51 +1100, Patrick Caldon wrote: > I'm looking for the "right" concurrency library/semantics for what > should be a reasonably simple problem. > > I have a little simulator: > > runWorldSim :: MTGen -> SimState -> IO SimState > > it takes about a second to run on a PC. I

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Sebastian Sylvan
On Fri, Dec 4, 2009 at 12:28 PM, Patrick Caldon wrote: > Neil Brown wrote: > >> Patrick Caldon wrote: >> >>> >>> I'm looking for the "right" concurrency library/semantics for what should >>> be a reasonably simple problem. >>> >>> I have a little simulator: >>> >>> runWorldSim :: MTGen -> SimStat

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Patrick Caldon
Neil Brown wrote: Patrick Caldon wrote: I'm looking for the "right" concurrency library/semantics for what should be a reasonably simple problem. I have a little simulator: runWorldSim :: MTGen -> SimState -> IO SimState it takes about a second to run on a PC. It's functional except it wh

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Neil Brown
Patrick Caldon wrote: I'm looking for the "right" concurrency library/semantics for what should be a reasonably simple problem. I have a little simulator: runWorldSim :: MTGen -> SimState -> IO SimState it takes about a second to run on a PC. It's functional except it whacks the rng, which

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Patrick Caldon
Ivan Lazar Miljenovic wrote: Patrick Caldon writes: it takes about a second to run on a PC. It's functional except it whacks the rng, which needs IO. I run 5-10 of these jobs, and then use: Which RNG are you using that it needs so much IO? Mersenne Twister, System.Random.Mersenne. The

Re: [Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Ivan Lazar Miljenovic
Patrick Caldon writes: > it takes about a second to run on a PC. It's functional except it > whacks the rng, which needs IO. I run 5-10 of these jobs, and then > use: Which RNG are you using that it needs so much IO? > > mergeWorld :: [SimState] -> SimState > > to pick the best features of the r

[Haskell-cafe] You are in a twisty maze of concurrency libraries, all different ...

2009-12-04 Thread Patrick Caldon
I'm looking for the "right" concurrency library/semantics for what should be a reasonably simple problem. I have a little simulator: runWorldSim :: MTGen -> SimState -> IO SimState it takes about a second to run on a PC. It's functional except it whacks the rng, which needs IO. I run 5-10 o