Top
Best
New

Posted by todsacerdoti 2 days ago

A brief history of random numbers (2018)(crates.io)
200 points | 68 commentspage 2
lucasfcosta 2 days ago|
This is what I come to HN for.
buildbot 2 days ago||
I did not realize xorshift no longer as favored! Permuted Congruential Generators seems very cool. https://en.wikipedia.org/wiki/Permuted_congruential_generato...
adgjlsfhk1 1 day ago|
Xorshift variations (specifically xoshiro256++ and friends) are still really good.
gwbas1c 1 day ago||
I've always wondered, if you started recording audio, can you treat the least significant bit as random? Perhaps as an alternative to a real hardware random number generator?
arch_btw 1 day ago|
Yeah it would be fun to play with...

I gotta think there are going to be some periodics in there that will be toggling the LSB. Like some hum from some device far away will be at the right tiny amplitude to toggle it in a predictable way. Also the ADC hardware could concievably get stuck.

The whole system breaks because someone didn't set up their pulseaudio correctly?

and what if you need 1TB of random data? With 48kHz audio you would be waiting 5000 years haha. 1MB is still more than a day

tralarpa 1 day ago||
> and what if you need 1TB of random data? With 48kHz audio you would be waiting 5000 years haha. 1MB is still more than a day

I think you dropped the "k" in "kHz" in your calculations.

a-dub 1 day ago||
i thought they were all built on the compression functions from secure hashes these days?
tptacek 1 day ago|
That's how secure random number generators work. Those are suitable for almost all purposes except for simulations, where you're tapping the RNG so often that its performance really matters and demands more than the cycles/bytes of even optimized cryptography gets you.
wglb 1 day ago||
Plus with a simulation, you may want to replicate runs.
some_furry 1 day ago||
You can use a seeded PRNG (e.g., AES-CTR-DRBG) and get replication while still preserving cryptographic security.
nzeid 1 day ago||
> So, just using any old LCG wasn't good enough, you had to use one made by someone with a PhD in mathematics. Donald Knuth shook his fist at the world and shouted "Hah! I told you so!", published a book on how to do it Right that most people didn't read, and then went back into his Fortress of Solitude to write TeX.

Haaaaaaaaaaaaaaa, I believe every word of this.

Cold_Miserable 1 day ago||
Xorshift, LCM and hardware rdrand work just fine. PCG and Weyl are overkill.
camel-cdr 1 day ago||
sure, a += b is overkill
rurban 1 day ago||
Hardware rdrand, lol! Totally broken
NoSalt 1 day ago||
I dunno ... his saucy language made this very difficult to read.
butlike 1 day ago||
Please tell me if I'm off-base here, but something I always thought about and have been toying with is the notion that "there's no true random in this universe."

From a particle physics perspective, as an observer in the electromagnetic spectrum, we're always observing through a reference frame based on the speed of light in relation to the observed object. Because it's always in reference to a constant, c, anything perceived at random can theoretically be measured if you had the position of the observer at the time of observation, right?

Am I way off-base here?

kryptiskt 1 day ago|
Any fan of determinism would need to tackle quantum physics and what seems like unavoidable randomness in it (and there are such theories, but they offer little hope of getting around the randomness from our point of view, since they hide the order from us). The typical example of a random phenomena in nature is radioactive decay. You can't predict when any given nucleus will decay, only the probability that it will happen (which gives the half-life).
butlike 21 hours ago||
Fair enough. Thanks!
SAYANG13 1 day ago||
[flagged]
SAYANG13 1 day ago|
[flagged]
SAYANG13 1 day ago||
[flagged]
websku 1 day ago|
random numbers are not exactly random.
nachox999 1 day ago|
natural random numbers are not (exactly) random or artifical generated random numbers are not (exactly) random?