Skip to content

Instantly share code, notes, and snippets.

@gfixler

gfixler/tripod.hs

Last active Dec 12, 2016
Embed
What would you like to do?
101 Tripod Hits song lookup
#!/usr/bin/env stack
{- stack --resolver lts-7.13 --install-ghc runghc -}
import Data.Maybe (mapMaybe)
import System.Environment (getArgs)
song :: Int -> Maybe String
song 1 = Just "A Shandy Too Far"
song 2 = Just "Adult Contemporary"
song 3 = Just "Air Guitar"
song 4 = Just "All I Want"
song 5 = Just "Ancestors"
song 6 = Just "Aquaman"
song 7 = Just "Astronaut"
song 8 = Just "Ballad of Ronnie"
song 9 = Just "Bard"
song 10 = Just "The Blueprint"
song 11 = Just "Boggyman"
song 12 = Just "Bubble Helicopter"
song 13 = Just "Building an Enid"
song 14 = Just "Change a Thing"
song 15 = Just "Christ is Born"
song 16 = Just "Climate Change"
song 17 = Just "Cuckold"
song 18 = Just "DILF"
song 19 = Just "Do Go On"
song 20 = Just "Does it Have Guns?"
song 21 = Just "Don't Feel Bad"
song 22 = Just "Drive King"
song 23 = Just "Enid"
song 24 = Just "Fabian"
song 25 = Just "Fear of Shorts"
song 26 = Just "Fly So High"
song 27 = Just "Gay Bar"
song 28 = Just "Ghost Ship"
song 29 = Just "The Gods are People Too"
song 30 = Just "Gonna Make You Happy Tonight"
song 31 = Just "Good Friends"
song 32 = Just "Goodbye Little Alarm Clock"
song 33 = Just "Head of Zombie"
song 34 = Just "Hey Ho"
song 35 = Just "The Hot Dog Man"
song 36 = Just "Hot Girl in the Comic Shop"
song 37 = Just "I Always Get Into Stuff"
song 38 = Just "I Had to Pay My Debt to the Devil"
song 39 = Just "I Hate this Place"
song 40 = Just "I Hate Your Family"
song 41 = Just "I Will Be There"
song 42 = Just "I Will Still Play"
song 43 = Just "If I Had a Tattoo"
song 44 = Just "IKEA"
song 45 = Just "In the Countryside"
song 46 = Just "Is it Okay if I Stalk You?"
song 47 = Just "Ivory Tower"
song 48 = Just "Je Veux te Dire"
song 49 = Just "Jeboticabal"
song 50 = Just "Jokes! Jokes! Jokes!"
song 51 = Just "Kempt"
song 52 = Just "Key Party"
song 53 = Just "King Kong"
song 54 = Just "Krap Karate"
song 55 = Just "Let's Take a Walk"
song 56 = Just "Lingering Dad"
song 57 = Just "The Lonesome/Gregarious Cowboy"
song 58 = Just "The Love of 3 Men"
song 59 = Just "Love Song"
song 60 = Just "Main Theme from Tosswinkle the Pirate"
song 61 = Just "Melbourne Girl"
song 62 = Just "The Messenger's Dream"
song 63 = Just "Mucus"
song 64 = Just "No Daughter of Mine"
song 65 = Just "Old Money"
song 66 = Just "On Behalf of All the Geeks"
song 67 = Just "On Paper"
song 68 = Just "One More Annoying Couple"
song 69 = Just "The Only Shepherd"
song 70 = Just "Overture"
song 71 = Just "Playing Online"
song 72 = Just "Rock Eisteddfod"
song 73 = Just "Santa Fe"
song 74 = Just "Santa's Papers"
song 75 = Just "Science Facts are Useful"
song 76 = Just "Second Drawer Down"
song 77 = Just "Shut Down"
song 78 = Just "Skyrim"
song 79 = Just "Snapshots"
song 80 = Just "Someday the Lord"
song 81 = Just "Squares on the Screen"
song 82 = Just "The Stuffing"
song 83 = Just "Stuntman"
song 84 = Just "Suicide Bomber"
song 85 = Just "Taking the Life"
song 86 = Just "Tall Man"
song 87 = Just "That's Why I'm Sending You"
song 88 = Just "Theme from M*A*S*H Guy"
song 89 = Just "This is My Last Transmission"
song 90 = Just "Three Seconds of Halo"
song 91 = Just "Thursday"
song 92 = Just "The Trees"
song 93 = Just "Triangle of Happiness"
song 94 = Just "Trying to Impress the Bargirl"
song 95 = Just "Ugly Men"
song 96 = Just "Underground"
song 97 = Just "Visor King"
song 98 = Just "Waiting for the Game to Load"
song 99 = Just "The Wheel"
song 100 = Just "With All My Riches"
song 101 = Just "Would You Mind"
song _ = Nothing
readInt :: String -> Int
readInt = read
-- Example usage of built executable
-- (numbers from: https://twitter.com/TripodActual/status/713700907628646400)
--
-- $ ./tripod 26 9 89 82 92 55 12 94 101
-- "Fly So High"
-- "Bard"
-- "This is My Last Transmission"
-- "The Stuffing"
-- "The Trees"
-- "Let's Take a Walk"
-- "Bubble Helicopter"
-- "Trying to Impress the Bargirl"
-- "Would You Mind"
main :: IO ()
main = do
nums <- fmap (map readInt) getArgs
mapM_ putStrLn $ mapMaybe song nums
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment