Hacker News new | ask | show | jobs
by swatcoder 1417 days ago
That’s true, but this thing is not code any more.

It’s an incantation that’s propagated for 50+ years because it’s minimal and effective. Over time, it’s been fully distilled to those properties.

Since comments aren’t essential to being minimal and effective, they don’t survive the distillation.

Think of it like a clever gist that got pasted and shared a hundred times. Even if the original source had explained every step in great detail, with inline comments and deep explanatory discourses and citations to prior art and etc, they’d eventually get trimmed away as fat as people repeatedly prune it down to some “important” bits pasted into their own copies and then later share those trimmed copies, ad infinitum.

This is that, but 50 years out.

1 comments

Since it's an LCG, it does not matter how it was derived as long as the randomness properties are known. Such as cycle length, identical initial state set and dispersion properties. Perhaps also performance.

These should be documented.

It's a rather weak PRNG of short cycle, so the suspicion is that it's made for particular dispersion properties, such as for a hash table of particular data and size or other bucketing algorithm.

>These should be documented.

They're trivial to look up, and any modern source would likely outlive the game of telephone of trying to keep such a comment intact correctly.