#1272: newStdGen returns the same value on successive calls
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------+--------------------------------------------------
It seems newStdGen only depends on the second, it should have better
resolution and/or use /dev/random.
Test program:
import Random
main = newStdGen >>= print
compiled with ghc 6.6 or 6.7 (at some point in time)
Running "date; ./random" gives:
Thu Apr 12 10:51:54 CEST 2007
1938403181 6764
Thu Apr 12 10:51:54 CEST 2007
1938403181 6764
Thu Apr 12 10:51:55 CEST 2007
529729936 6762
Thu Apr 12 10:51:55 CEST 2007
529729936 6762
Thu Apr 12 10:51:56 CEST 2007
1023702766 6762
Thu Apr 12 10:51:56 CEST 2007
1023702766 6762
Thu Apr 12 10:52:03 CEST 2007
186545450 6762
Thu Apr 12 10:52:04 CEST 2007
680518280 6762
Thu Apr 12 10:52:04 CEST 2007
680518280 6762
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1272>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs