On Mon, Oct 12, 2009 at 12:25 AM, Michael Mossey <mpm@alumni.caltech.edu> wrote:
I'm trying to learn how to use randomness in Haskell and it seems very non-straightforward and complex. I could do a lot of things using 'split' from System.Random, but apparently it's broken. There is the statistics package here:
http://hackage.haskell.org/package/statistics
Is this a better solution?
Yes, as it's much faster, more robust, and (depending on your perspective) easier to use, provided you understand the ST monad.
It uses the ST monad in the RandomVariate module. Can someone point me to a tutorial explaining ST, and/or a tutorial in the RandomVariate module?
Pseudorandomness seems like one case where it would just be a hell of a lot simpler to have a global generator--never split the state. Is the ST monad some way to accomplish this?
Having