Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.lisp > #60792
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Stefan Monnier <monnier@iro.umontreal.ca> |
| Newsgroups | comp.lang.lisp |
| Subject | Re: Make a random-state from a non-random source |
| Date | Mon, 11 May 2026 11:23:31 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 24 |
| Message-ID | <jwvv7cu2cst.fsf-monnier+comp.lang.lisp@gnu.org> (permalink) |
| References | <jwvmryfku8t.fsf-monnier+comp.lang.lisp@gnu.org> <10tntu1$3r6q9$1@dont-email.me> |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Date | Mon, 11 May 2026 15:55:29 +0000 (UTC) |
| Injection-Info | dont-email.me; logging-data="1302787"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3Z009ea1Rl+XVpMPy/DKgaoOTeRflDfA="; posting-host="f4eca0d85508394e3ec118d35882d557" |
| User-Agent | Gnus/5.13 (Gnus v5.13) |
| Cancel-Lock | sha1:SNqZrZu8oZ0Pkm3+y50XzJf3CiM= sha1:gYW6dYkbelcMM7J5lXpImb9jN6U= sha256:MqpAOyUJIas8uSQqO5KbahmLQT0w7JnWqkyDXqZ5fuI= sha1:lHw/bn6mKWmtNL33/8ZYFbb9mYE= |
| In-Reply-To | <10tntu1$3r6q9$1@dont-email.me> (message from tfb <no_email@invalid.invalid> on Sat, 9 May 2026 18:20:49 -0000 (UTC)) |
| Xref | csiph.com comp.lang.lisp:60792 |
Show key headers only | View raw
tfb [2026-05-09 18:20:49] wrote: > 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")) Hmm... interesting. So that a case where the availability of reader-level conditionals has influenced the design of a "primitive". Thanks, === Stefan
Back to comp.lang.lisp | Previous — Previous in thread | Find similar
Make a random-state from a non-random source Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-04 12:46 -0400
Re: Make a random-state from a non-random source Alan Bawden <alan@csail.mit.edu> - 2026-05-05 00:45 -0400
Re: Make a random-state from a non-random source Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-05 16:03 -0400
Re: Make a random-state from a non-random source tfb <no_email@invalid.invalid> - 2026-05-09 18:20 +0000
Re: Make a random-state from a non-random source Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-11 11:23 -0400
csiph-web