Open rtfeldman opened 8 months ago
(Copied from Zulip)
I think I'm interested in contributing to the chapter on PRNGs. I don't have a lot of Roc experience, but I'm comfortable with numerical programming and technical writing.
I think something in the PCG family of RNGs would be a good one to use; it's got good numerical properties and is very compact.
In terms of content, I'd see the following sections:
We already have an implementation of PCG pseudorandom number generation in roc-random but implementing random generators in a purely functional language seems like a good fit for this book because:
random()
function which isn't pure (since it potentially returns a different answer each time it's called). Because of this, it's a common beginner surprise to discover that a random number generator in a pure FP language has to present a different API.