From Newsgroup: comp.lang.lisp
Stefan Monnier <
monnier@iro.umontreal.ca> wrote:
I guess I could print a random state into a file and then read it back in, but that depends on internals, so it's doubly messy.
It only depends on internals in the sense that you don't know what the
details of a random-state object are. You *do* know that printing and then reading one results in an equivalent object.
So all you need to do is (inside with-standard-io-syntax if need be) is
print one. Then you can simply say
(defvar *my-random-state*
#+<impl>
<paste thing you just printed>
... versions for any other implementations ...
#-(or <impl> ...)
(error "add a case"))
--
www.tfeb.org/computer/
--- Synchronet 3.22a-Linux NewsLink 1.2