Name: Anonymous 2009-01-20 3:35
is there any way to do it that's not slow as fuck?
import System
import Random
import qualified Data.ByteString.Char8 as Char8
main = do file <- fmap Char8.lines . Char8.readFile . head =<< getArgs
Char8.putStrLn . (file !!) =<< randomRIO (0, length file)