Re: Special initialization behavior for the default determinized library (was: more comments)
Wolfgang Corcoran-Mathe 18 May 2026 23:13 UTC
On 2026-05-18 17:37 -0400, Peter McGoron wrote:
> On 5/18/26 12:41, Vincent Manis (he/him) wrote:
> > I'm still coming at this from a teaching viewpoint. The #t
> > suggestion is great, but if I were teaching with this, I'd want
> > to show that different seeds produce different random sequences.
> > So I'd like to extend this slightly so that any integer can be
> > used (as well as #t), with the requirement that each integer
> > leads to an initial state (presumably different, but that's not
> > guaranteed). -- vincent
>
> I like that, however, it might be too much of a requirement to give
> all random ports.
This sounds a bit like MIDI presets--we get a whole bunch (up to
one for every integer) of well-known random states which you can
select "by name" when you create a port. But are all those
predetermined states really necessary? I don't think they are. In
fact, I don't see why we need more than a single predetermined state,
to avoid the dance that Shiro has described.
So here's a variant of Peter's single-preset proposal that does not
give 'make-random-port' more arguments and does not require clever
transformations from exact integers to random states: Have each
determinized library export a constant, say 'sample-random-port-state',
whose value is an arbitrary state. If you need to generate the same
sequence many times, you feed that constant to each 'make-random-port'
call.
If this is unacceptable, please explain why.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>