more comments Peter McGoron (17 May 2026 04:39 UTC)
Re: more comments Wolfgang Corcoran-Mathe (17 May 2026 20:33 UTC)
Re: more comments Peter McGoron (17 May 2026 21:21 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 00:54 UTC)
Re: more comments Shiro Kawai (18 May 2026 11:52 UTC)
Re: more comments John Cowan (18 May 2026 13:46 UTC)
Re: more comments Shiro Kawai (18 May 2026 17:21 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 18:03 UTC)
Re: more comments Peter McGoron (18 May 2026 15:33 UTC)
Re: more comments Vincent Manis (he/him) (18 May 2026 16:41 UTC)
Re: more comments Shiro Kawai (18 May 2026 17:13 UTC)
Re: more comments Peter McGoron (18 May 2026 18:28 UTC)
Re: more comments Shiro Kawai (18 May 2026 18:42 UTC)
Re: more comments Peter McGoron (19 May 2026 02:12 UTC)
Re: more comments Shiro Kawai (19 May 2026 03:16 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 16:59 UTC)
Re: more comments Shiro Kawai (18 May 2026 17:08 UTC)
Re: more comments John Cowan (18 May 2026 06:17 UTC)
Re: more comments Peter McGoron (18 May 2026 11:30 UTC)
Re: more comments John Cowan (18 May 2026 13:21 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 17:19 UTC)

Re: more comments Peter McGoron 19 May 2026 02:11 UTC

I am not understanding here.

On 5/18/26 14:42, Shiro Kawai wrote:
 > The saved state cannot stay in the build tree, as it is completely
 > cleaned or freshly check out before each new test. [...]
> It is much easier if the seed(s) are written into test files and
> commited to the repo.

What stopping you from committing the serialized state as test data? If
you need it to reproduce behavior, then it's no different than
committing something like an example script to test for compiler bugs,
or an example document to test for parser bugs.

If one really wanted to have the seed in the actual test script, then
many algorithms have short enough seeds to be reasonably embedded in a
source file. For example, I ran `(write (random-port-state
(make-random-port)))` with the sample implementation. I get the
following out:

     #u8(73 50 30 230 10 135 184 200 41 134 184 204 39 36 250 177 243
231 148 216 214 177 91 34 35 171 97 253 214 2 76 73)

I can write that state into a Scheme code file, as it is just a constant.

Saving and restoring state is implementation-specific, but that is not a
problem: a generic seed like "7" would generate different sequences on
different implementations. You can use a specific algorithm by importing
`(srfi 271 determinized xoshiro256++)` (or other).

-- Peter McGoron