Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pacaro
on March 6, 2015
|
parent
|
context
|
favorite
| on:
Algorithms Every Programmer Should Know: Reservoir...
IIRC this is how fortune[1] selects a message fairly given the crappy database format it uses (possible fortunes are separated by lines containing just '%'
[1]
http://en.wikipedia.org/wiki/Fortune_(Unix)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
[1] http://en.wikipedia.org/wiki/Fortune_(Unix)