Clarification of make-random-source-generator Shiro Kawai (17 Jan 2024 11:42 UTC)
Re: Clarification of make-random-source-generator Bradley Lucier (17 Jan 2024 18:59 UTC)
Re: Clarification of make-random-source-generator Arthur A. Gleckler (17 Jan 2024 20:44 UTC)
Re: Clarification of make-random-source-generator Bradley Lucier (17 Jan 2024 22:14 UTC)
Re: Clarification of make-random-source-generator John Cowan (18 Jan 2024 00:02 UTC)
Re: Clarification of make-random-source-generator Arthur A. Gleckler (18 Jan 2024 00:37 UTC)

Re: Clarification of make-random-source-generator Bradley Lucier 17 Jan 2024 18:58 UTC

On 1/17/24 6:42 AM, Shiro Kawai wrote:
>
> The srfi description of make-random-source-generator reads:
>
> "Each invocation of the generator returns the random source returned by
> passing the value of (current-random-source), i, and successive integers
> j (starting with 0) to the SRFI 27 procedure
> random-source-pseudo-randomize!."
>
> I think there's some error or incompleteness.  Passing the value of
> (current-random-source) doesn't make sense, for
> random-source-pseudo-randomize! changes the state of the random source,
> and it does not return a value.
> Following the reference implementation, something like this may be
> appropriate?
>
> "Each invocation of the generator returns a new random source created by
> calling make-random-source (SRFI 27), which is passed to
> random-source-pseudo-randomize! with i, and successive integers j
> (starting with 0), before being returned."
>

I believe you are correct.  Your description is what the sample code
does, and what I meant it to do.  Sorry it wasn't specified correctly.

Brad