3 ms·
I was also exploring randomness in JS at some point and found lots of interesting things! One was that the Alea PRNG algorithm[1] by Johannes Baagøe performed f
by blixt 2y ago
I was also exploring randomness in JS at some point and found lots of interesting things! One was that the Alea PRNG algorithm[1] by Johannes Baagøe performed faster on JavaScript's floating point numbers. Another was that Dieharder[2] is a really fun tool to test PRNGs. I also made an attempt at consolidating other PRNG methods which were not great[3] and that led me to other people who had done the same[4].
And finally I tried to make a nicer Dieharder wrapper and a simple PRNG library, but lord knows how relevant it is anymore: https://github.com/blixt/js-arbit https://github.com/blixt/js-arbit
I guess in this archaeological dig I also found how many useful resources on the internet disappear in less than a decade.
[1]: https://web.archive.org/web/20120502223108/http://baagoe.com/en/RandomMusings/javascript/ https://web.archive.org/web/20120502223108/http://baagoe.com... (Baagøe's original site is down)
[2]: https://rurban.github.io/dieharder/ https://rurban.github.io/dieharder/ (old site is dead, though here's a web archive link: https://web.archive.org/web/20170609075452/http://www.phy.duke.edu/~rgb/General/dieharder.php https://web.archive.org/web/20170609075452/http://www.phy.du...)
[3]: https://gist.github.com/blixt/f17b47c62508be59987b https://gist.github.com/blixt/f17b47c62508be59987b (Don't use this)
[4]: https://github.com/nquinlan/better-random-numbers-for-javascript-mirror https://github.com/nquinlan/better-random-numbers-for-javasc... (this is mainly a mirror of Baagøe's wiki)