Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

choosing a random line from a file in haskell

Name: Anonymous 2009-01-20 3:35

is there any way to do it that's not slow as fuck?

Name: Anonymous 2009-01-21 0:59

>>36
it'd be a lot slower than
make a file containing the positions of all the newlines as fixed-size integers, then i can seek to a random position in that file (modulo the length of each integer), read the number, and seek to the right place in the text file...

>>37-39
$ shuf --version
zsh: command not found: shuf

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List