I just thought about something: basically all these APIs provides a IO
[a] (where a is a randomly generable type) function.
Is there a problem with the approach that is to rely on lazy evaluation to
pass to pure code (either explicitely or through State) the infinite list
generated in IO and
On 10.02.2012 18:38, Yves Parès wrote:
I just thought about something: basically all these APIs provides a IO
[a] (where a is a randomly generable type) function.
Is there a problem with the approach that is to rely on lazy evaluation
to pass to pure code (either explicitely or through State)
It's more like Seed → [a]. IO is not really needed here.
You're absolutely right. I stand corrected.
1. One may want to generate values of different types and/or distibutions.
Yes, I saw this limitation before. But you can just generate one infinite
list (and then one seed) per distribution,
Yves Parès yves.pa...@gmail.com wrote:
I've been in the past told that mersenne-random was much better than
the standard random package.
This is relative. The Mersenne Twister algorithm has a large memory
footprint, but in relation to the size of the average Haskell program,
this is probably
On 09.02.2012 01:56, Yves Parès wrote:
Hi,
I've been in the past told that mersenne-random was much better than the
standard random package.
...
So is it possible to use the fast and efficient mersenne generator with
the convenient and general random API?
I think design of Random type class
Aleksey Khudyakov :
I think design of Random type class basically precludes efficient
generators with large periods and consequently large state.
Look at next function:
next :: g - (Int, g)
It means that state has to be copied but for efficiency we want to
mutate it in place. I consider
On 09.02.2012 15:32, Jerzy Karczmarczuk wrote:
Aleksey Khudyakov :
1. Mersenne Twister, AND congruential generators AND the Marsaglia
stuff, all use some kind of seed, all are stateful. There are no
miracles. Just look the agressive monadization, the form of defaultSeed,
etc. within MWC.hs,
Aleksey Khudyakov:
On 09.02.2012 15:32, Jerzy Karczmarczuk wrote:
1. Mersenne Twister, AND congruential generators AND the Marsaglia
stuff, all use some kind of seed, all are stateful. There are no
miracles. Just look the agressive monadization, the form of defaultSeed,
etc. within MWC.hs,
On 9 February 2012 10:59, Aleksey Khudyakov alexey.sklad...@gmail.com wrote:
So is it possible to use the fast and efficient mersenne generator with
the convenient and general random API?
I think design of Random type class basically precludes efficient generators
with large periods and
On 09.02.2012 18:27, Duncan Coutts wrote:
Actually it is not true that the state has to be copied. Using the
lazy ST monad we can implement this interface and internally use
mutable ST arrays.
See for example
On 09.02.2012 17:28, Jerzy Karczmarczuk wrote:
Aleksey Khudyakov:
On 09.02.2012 15:32, Jerzy Karczmarczuk wrote:
1. Mersenne Twister, AND congruential generators AND the Marsaglia
stuff, all use some kind of seed, all are stateful. There are no
miracles. Just look the agressive monadization,
Hi,
I've been in the past told that mersenne-random was much better than the
standard random package.
However, System.Random.Mersenne doesn't follow the general API described in
System.Random, MTGen is not an instance of RandomGen.
But a sample on System.Random.Mersenne.getStdRandom documentation
12 matches
Mail list logo