randline: get a random selection of lines in a file using reservoir sampling

from blog alexwlchan, | ↗ original
I wrote a tiny Rust tool to get random samples in a memory-efficient way, and I learnt a lot while doing it.