Tech article
When random is not actually random enough
No preview is available. Read the original article for the full story.
Hacker News | Oct 6, 2026 | steveklabnik
Automated excerpt
Assuming that our random choice function has being chosen. The previous weights would be represented with (4, 3, 3) instead. 4 + 3 + 3 = 10 and so 3 / 10 = 0. 3 as we expect. Then simply draw a random number choice = random_between(0, 29).
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.