Hi all, I though you might apreciate this:
I've been reading the BOFH (Bastard Operator From Hell) serialisation in The Register (www.theregister.co.uk) far to much recently. He (the bastard) often uses his excuse board to confuse his helpless users. http://bofh.ntk.net/ExcuseBoard.html I have made a Haskell version of this essential tool. I'm sure you'll find it useful. Here's a random output selection and the code: Undiagnosable Framing Condition Extraneous Hardware Crash Temporary Streaming Bug Generic Peripheral Crash Dereferenced Swapfile Override Partial Service Anomoly Delayed Bus Invalidation Virtual Array Reclock Generic Paging Incompatibility Permanent Proxy Timeout Non-Specific Precondition Rejection Redundant Firmware Dereferencing Delayed Reception Reclock Unreportable Operation Corruption Insufficient Parameter Condition Non-Specific Bus Dump Serial Comms Corruption Unvalidated Encryption Underflow Delayed Parity Desynchronisation Major Code Incompatibility Immediate Programming Destabilisation Minor Parity Overflow excuse.hs: -------------------- #!runhugs import Random main :: IO () main = do gen <- getStdGen putStr $ excuse gen excuse :: StdGen -> String excuse gen1 = let (rnd1, gen2) = randomR (0, length part1 - 1) gen1 (rnd2, gen3) = randomR (0, length part2 - 1) gen2 (rnd3, _) = randomR (0, length part3 - 1) gen3 in part1 !! rnd1 ++ " " ++ part2 !! rnd2 ++ " " ++ part3 !! rnd3 ++ "\n" part1 = ["Temporary", "Intermittant", "Partial", "Redundant", "Total", "Multiplexed", "Inherent", "Duplicated", "Dual-Homed", "Synchronous", "Bidirectional", "Serial", "Asynchronous", "Multiple", "Replicated", "Non-Replicated", "Unregistered", "Non-Specific", "Generic", "Migrated", "Localised", "Resignalled", "Dereferenced", "Nullified", "Aborted", "Serious", "Minor", "Major", "Extraneous", "Illegal", "Insufficient", "Viral", "Unsupported", "Outmoded", "Legacy", "Permanent", "Invalid", "Deprecated", "Virtual", "Unreportable", "Undetermined", "Undiagnosable", "Unfiltered", "Static", "Dynamic", "Delayed", "Immediate", "Nonfatal", "Fatal", "Non-Valid", "Unvalidated", "Non-Static", "Unreplicatable", "Non-Serious"] part2 = ["Array", "Systems", "Hardware", "Software", "Firmware", "Backplane", "Logic-Subsystem", "Integrity", "Subsystem", "Memory", "Comms", "Integrity", "Checksum", "Protocol", "Parity", "Bus", "Timing", "Synchronisation", "Topology", "Transmission", "Reception", "Stack", "Framing", "Code", "Programming", "Peripheral", "Environmental", "Loading", "Operation", "Parameter", "Syntax", "Initialisation", "Execution", "Resource", "Encryption", "Decryption", "File", "Precondition", "Authentication", "Paging", "Swapfile", "Service", "Gateway", "Request", "Proxy", "Media", "Registry", "Configuration", "Metadata", "Streaming", "Retrieval", "Installation", "Library", "Handler"] part3 = ["Interruption", "Destabilisation", "Destruction", "Desynchronisation", "Failure", "Dereferencing", "Overflow", "Underflow", "NMI", "Interrupt", "Corruption", "Anomoly", "Seizure", "Override", "Reclock", "Rejection", "Invalidation", "Halt", "Exhaustion", "Infection", "Incompatibility", "Timeout", "Expiry", "Unavailability", "Bug", "Condition", "Crash", "Dump", "Crashdump", "Stackdump", "Problem", "Lockout"] ---------- Actually I was having problems with getStdGen on my hugs instalation. It always returns the same number. So I hacked up an alternative that gets passed $RANDOM on the command line: main = do args <- getArgs let gen = read $ head $ args in putStr $ excuse gen Duncan _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell