[Haskell-cafe] StdGen Reliability Across Versions / Systems

Thomas DuBuisson thomas.dubuisson at gmail.com
Wed Aug 31 20:48:24 UTC 2016


If you want random numbers that are consistent across package version
changes then you could simply leverage a package that aims to
implement a standard.  Short of bug fixes, code implementing a
standard should not behave differently across versions.  For example,
use a cryptographic algorithm (AES CTR or ChaCha20) or a standardized
cryptographic RNG like Hash SP 800-90 as your RNG.

-Thomas

On Fri, Aug 26, 2016 at 10:13 PM, Christopher Howard <ch.howard at zoho.com> wrote:
> I know that, ff you feed mkStdGen a particular seed, and pull a list of
> random numbers from that StdGen, that that the list will always be the
> same if your run your compiled program over and over again on that same
> system. But which of the following will cause you to get different output?:
>
> 1) Changes in GHC version
> 2) Changes in "random" library version
> 3) Compiling / Running on a different host computer (but compiling with
> the same GHC & random versions.
>
> --
> https://qlfiles.net
> My PGP public key ID is 0x340EA95A (pgp.mit.edu).
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.


More information about the Haskell-Cafe mailing list