Once you notice that you usually need a fast solution. The easiest solution
is to just pass around an instance of java.util.Random which you create
with the desired seed. Another options is to have a constructor function
returning a rand function.
(defn prng [seed]
(let [rnd
On Tuesday, June 3, 2014 4:56:26 PM UTC-5, Andy Fingerhut wrote:
This ticket seems to be at least somewhat related to your questions:
http://dev.clojure.org/jira/browse/CLJ-1420
Andy
Yes, thanks for finding that, Andy. It looks like it would address the
problem about accessing an RNG
On Wednesday, June 4, 2014 2:55:20 AM UTC-5, Gunnar Völkel wrote:
Once you notice that you usually need a fast solution.
Yes!
The easiest solution is to just pass around an instance of
java.util.Random which you create with the desired seed. Another options is
to have a constructor
Data.generative already has this function and many more, I realized.
/Linus
On Wednesday, June 4, 2014, Mars0i marsh...@logical.net wrote:
On Wednesday, June 4, 2014 2:55:20 AM UTC-5, Gunnar Völkel wrote:
Once you notice that you usually need a fast solution.
Yes!
The easiest
Sorry, of course i meant the clojure.data.generators library
https://github.com/clojure/data.generators
esp. the *rnd* that can be bound around many of the functions in the
library.
/Linus
On Wednesday, June 4, 2014, Linus Ericsson oscarlinuserics...@gmail.com
wrote:
Data.generative already
t appears that the random number generator for rand used can't be reseeded,
so there is no way to precisely repeat an experiment involving randomness,
except by redefining rand. Also, there is no way to specify that rand in
different threads should use different RNGs (a strategy discussed in