In the documentation for spork/randgen, I think there should be a section at the top that explains that the results of running randgen functions are deterministic by default (they'll be the same every time you run your program) and the way to avoid this is by running something like:
(randgen/set-seed (os/time))
Or some other sane default way to set the random seed.
That way newcomers from languages like Python or JavaScript - where the random seed is set to something unique by default - won't be left wondering why the random number generation in Janet "doesn't work".
It might also be helpful to have some similar notes for the random functions inside of math, but the community examples might be enough in that case.
In the documentation for spork/randgen, I think there should be a section at the top that explains that the results of running randgen functions are deterministic by default (they'll be the same every time you run your program) and the way to avoid this is by running something like:
Or some other sane default way to set the random seed.
That way newcomers from languages like Python or JavaScript - where the random seed is set to something unique by default - won't be left wondering why the random number generation in Janet "doesn't work".
It might also be helpful to have some similar notes for the random functions inside of
math, but the community examples might be enough in that case.