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 this thread <https://groups.google.com/forum/#!searchin/clojure/random/clojure/cRVS19PB06E/8FsmtsYx6SkJ>). It appears that this creates a bottleneck when using Clojure's parallel functions such as pmap. (Try timing map rand vs. pmap rand.) Again, this can be fixed by rebinding rand, but that's an ugly solution. clojure.data.generators <http://clojure.github.io/data.generators/> allows rebinding the RNG, but only for its own functions. I wonder whether Clojure's core ought to allow rebinding the RNG behind rand, rand-int, and rand-nth. I haven't found discussions of this issue. It's reflects a common need in scientific computing.
btw bigmlcom/sampling <https://github.com/bigmlcom/sampling> also supports use of RNGs with different seeds (as well as providing different algorithms). -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.