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 3:53

>>37
cheers. thats why i try not to implement too many ideas that are quite obvious because i know some cunt willve written it

Name: Anonymous 2009-01-21 4:15

>>41
too bad that cunt released it under a non-free license so you'd have to use the whole slow, shitty program instead of taking out and using just the useful parts. also it's a lot slower than building an index and then seeking to a random position in the index like >>34 described.

also, >>40. you'd have to install it pretty much anywhere you want to use it.

Name: Anonymous 2009-01-21 7:50

Have you heard of fortune? It comes with a neat little utility called strfile that reads a file and dumps out a cache of line positions and stuff that's useful for pulling out random lines.

If you have some spare time, I suggest browsing through the source to the program. It's got a handful of nifty gems of code for various kinds of text-mashing that have come in handy at unexpected times.

Name: Anonymous 2009-01-21 8:20

Thank you >>45

Name: Anonymous 2009-01-21 8:27

>>42
lol what?

Name: Anonymous 2009-01-21 10:20

>>46
which part of >>42 are you replying to?

Name: 45 2009-01-21 10:31

>>45
You're welcome

Name: Anonymous 2009-01-21 14:58

>>47
his lies

Name: Anonymous 2009-01-21 18:31

>>49
there are no lies in >>42.

Name: Anonymous 2009-01-21 18:43

>>50
SHUT UP TROLLS

Name: Anonymous 2009-01-21 19:29

>>51
Calling >>50 a troll doesn't make what >>42 said any less true.

Name: Anonymous 2009-01-21 20:22

>>52
ITS A GNU PACKAGE FREAKS

Name: Anonymous 2009-01-21 20:35

>>53
GET OUT TROLL

Name: Anonymous 2009-01-21 20:56

>>54
NO U

Name: Anonymous 2009-01-21 21:02

>>43
Please don't come inside me!

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