DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Article on JS V8 math.random()  (Read 8,917 times)

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Article on JS V8 math.random()
« on: November 21, 2015, 09:45 PM »
This is an interesting and very well written article on random number generation:

https://medium.com/@betable/tifu-by-using-math-random-f1c308c4fd9d#.nk9324n3r

1 short snippet from it:

Quote
The same thing is happening with the V8 PRNG and our random identifiers — under certain conditions, the PRNG’s lack of randomness is making it less likely that we’ll see a collision.

In this case the generator’s determinism worked in our favor, but that’s not always true. The general lesson here is that, even for a high quality PRNG, you can’t assume a random distribution unless the generator’s cycle length is much larger than the number of random values you’re generating.

More at the link.

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: Article on JS V8 math.random()
« Reply #1 on: November 21, 2015, 11:02 PM »
Interesting read, even if it was a bit above my understanding. :)

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: Article on JS V8 math.random()
« Reply #2 on: November 22, 2015, 07:10 AM »
Interesting read, even if it was a bit above my understanding. :)

You're not the only one. I understood a good amount of it, but not all of it.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: Article on JS V8 math.random()
« Reply #3 on: November 22, 2015, 03:40 PM »
Well, yes, Chrome's underlying "engines" are not actually known for being secure. Yesterday I've read another thing: Did you know that Chrom[e|ium] lets you force-install "admin" add-ons?
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Original address: https://www.donationcoder.com/forum/index.php?topic=41932.0