[gambit-list] Random random-integer?
David St-Hilaire
sthilaid at iro.umontreal.ca
Tue Sep 11 06:53:59 EDT 2007
Hi!
I'm using the random-integer function, but it would seem that it always give the
same set of results after each execution... I then guessed I had to set the
random seed, somehow but I couldn't figure out the way to do it...
I tried something like:
(set! default-random-source (make-random-source))
(random-source-randomize! default-random-source)
(pp (random-integer 10))
(pp (random-integer 10))
(pp (random-integer 10))
And tried to run it multiple times and I still get the same answer each time I
run this simple program... :(
What should be done to make this random? Shouldn't be that the
default-random-source produce different random integers at each program launch??
Thanks!
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20070911/a94ddff1/attachment.sig>
More information about the Gambit-list
mailing list