not sure where a suitable place is to post this, but im definitely a beginner, so maybe here! :)
i am playing around with random number generation and found that the same number kept being generator regardless of what seed i used. not sure if a bug, but definitely surprised me.
i was able to produce this is a minimal example https://github.com/JanCVanB/roc-random/issues/14. i realized i posted in the wrong repo, but the repo for the fork im using (https://github.com/lukewilliamboswell/roc-random) doesn't allow issues
Fuxed that, should be able to add issues. This looks like the first one :grinning_face_with_smiling_eyes:
I'm not sure how quickly I'll be able to investigate this issue. I'm definitely not familiar with roc random, I just revived @JanCVanB work and packaged it so it was useable.
ah cool, moved the issue over :+1: no rush at all from my side, i've worked around it
is there a recommended way to generate seeds during runtime? didnt find anything in the docs so just went with Utc.now millis
Not sure about reccomend or anything, but I've been using Utc too
What platform are you using? Maybe we should add a Task for getting properly random seeds? That's a pretty easy to do if your interested.
I've been unavailable to the Roc community for a year or so now, but I'm slowly re-entering! I hope to take a look this week :)
I didn't do any work on seed generation, just left that to the consumer - millis sounds reasonable
Luke, did I ever get you the permissions/config you wanted? I'm afk today, but I imagine there's some friendly PR from you that I've completely ghosted
Lorentz, nice job finding a workaround
i'm on linux.
a task to get a properly random seed sounds lovely :heart:
Unfortunately there's no such thing ;)
If you had it, you wouldn't need the library!
Last updated: Jul 06 2025 at 12:14 UTC