summaryrefslogtreecommitdiffstats
path: root/random.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-08 11:37:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-08 11:37:30 -0700
commit55fcb2f23fe2d173fedfdcb194150794355c7593 (patch)
tree74b7e60e63bb948af10b0b7abdc51086b02659a6 /random.tl
parente6f728259e93aa98eab154bf5410c15fdafff4f3 (diff)
downloadtamarind-55fcb2f23fe2d173fedfdcb194150794355c7593.tar.gz
tamarind-55fcb2f23fe2d173fedfdcb194150794355c7593.tar.bz2
tamarind-55fcb2f23fe2d173fedfdcb194150794355c7593.zip
Specify longer PRNG warm-up period.
Use new make-random-state argument available in TXR 140 to obtain better random numbers from the /dev/urandom seed. This eliminates obvious patterns in the digits of the aliases generated by Tamarind.
Diffstat (limited to 'random.tl')
-rw-r--r--random.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.tl b/random.tl
index 3b188e4..cd2eb90 100644
--- a/random.tl
+++ b/random.tl
@@ -3,6 +3,6 @@
(reduce-left (op + (* @1 256) @2) (take noctets (gun (get-byte s))))))
(defun randomize ()
- (set *random-state* (make-random-state (get-urand-num 8))))
+ (set *random-state* (make-random-state (get-urand-num 8) 128)))
(defun save-random-state ())