Darts, dice, and coins: sampling from a discrete distribution | Hacker News Reader