
| > (Oh now I see Ivan mentions existing PRNGs that don't (can't?) support | > split... that may be a reasonable argument; I'll have to think about it; is | > this the main motivation? or just one observation among many?) | | I think it's the main one; that things like the Mersenne twister can't be | made instances of Random has stuck in people's craws for a while. In GHC's unique-supply generator we use a trick due to Lennart Augustsson to turn a linear generator (such as the Mersenne twister) into a splittable one. Code is here: http://darcs.haskell.org/ghc/compiler/basicTypes/UniqSupply.lhs Maybe the same would work for Mersenne. (Yes it uses unsafeInterleaveIO under the hood.) Simon | -----Original Message----- | From: libraries-bounces@haskell.org [mailto:libraries-bounces@haskell.org] On | Behalf Of Brandon S Allbery KF8NH | Sent: 15 September 2010 05:01 | To: libraries@haskell.org | Subject: Re: Proposal: Move 'split' into a separate class in System.Random | | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | On 9/14/10 23:44 , Isaac Dupree wrote: | > (Oh now I see Ivan mentions existing PRNGs that don't (can't?) support | > split... that may be a reasonable argument; I'll have to think about it; is | > this the main motivation? or just one observation among many?) | | I think it's the main one; that things like the Mersenne twister can't be | made instances of Random has stuck in people's craws for a while. | | - -- | brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com | system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu | electrical and computer engineering, carnegie mellon university KF8NH | -----BEGIN PGP SIGNATURE----- | Version: GnuPG v2.0.10 (Darwin) | Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ | | iEYEARECAAYFAkyQRPkACgkQIn7hlCsL25WuNQCdE+XCzyytOfzO/2SAU/qk+jpj | cx8Anjz9nToSZJNflAaIL3zJiI14iGc8 | =nx2g | -----END PGP SIGNATURE----- | _______________________________________________ | Libraries mailing list | Libraries@haskell.org | http://www.haskell.org/mailman/listinfo/libraries