News for hackers. Stuff that matters.
Re:Predictably Random by jgrahamc on Tuesday August 13, 2019 @09:14AM (#20685463)
It's easy to see some major problems, but take a look at this: https://random.isthe.link/?code=let+x+%3D+Date.now%28%29+%26...

The random number generator here is used quite often in projects and it looks pretty random. But if you look at the code you can see that it has four numbers that store state and its output can be entirely predicted from those four numbers that are consecutive outputs of the RNG.

Re:Predictably Random by perspective1 on Tuesday August 13, 2019 @09:42AM (#20685723)
Oh wow. At some point I've thrown up my hands and just used Pcg64 because people I trust but can't possibly verify recommended it. Your post reaffirms that that was the right decision (trusting others).
Re:Predictably Random by jgrahamc on Tuesday August 13, 2019 @10:12AM (#20685990)
Worth reading Knuth on this and his attempt to create his own RNG and fail horribly: http://www.informit.com/articles/article.aspx?p=2221790
Re:Predictably Random by tiborsaas on Tuesday August 13, 2019 @09:26AM (#20685569)
It's quite useful if you want to see if your seeded RNG matches a high quality pRNG.