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 John Cowan 18 May 2026 13:46 UTC

On Mon, May 18, 2026 at 7:52 AM Shiro Kawai <xxxxxx@gmail.com> wrote:
>
> Limiting the initializer to infinite binary ports sounds good, especially because
> we can delegate the responsibility for the required data length to the each
>PRNG implementation.

In the sense that a finite port won't do, yes.  But we need to be able to accept
a state object as an alternative to an infinite port, for reproducibilty.

>  But I need a guarantee that an arbitrary embed hardcoded number
> (e.g. a port that repeatedly generates a certain hardcoded sequence
> of bytes) works across all implementations.

That's not possible, because different implementations require
different amounts of state.  In Chibi's implementation of SRFI 27, for
example, the state is 128 bytes, but in Gauche's version it is 2500
bytes.  If Chibi writes out a state and Gauche tries to read it in, it
won't work.  Even if you pad it with zero bytes or repetitions, that
doesn't work for the algorithm (I forget which one it is) that blows
up on an all-zero initializer, since that is the default for both
Chibi and Gauche.   This also means, by the way, that you can't
initialize a random port usng n *arbitrray* binry port, becuse if the
port you are trying to use always produces 0, it doesn't mtater how
many bytes you read out of it, it will go into n infinite loop before
generating anything.

If you want reproducible random numbers, you have to create a port
initialized from a reasonably equiprobable source and then ask it for
its state, which you can then persist.