Algorithm quickly simulates a roll of loaded dice | Hacker News Reader