Skip to content

Instantly share code, notes, and snippets.

Failed to load resource http://localhost:8000/socket.io/1/?t=1392064293074
Firing ready event poker.js:340
Firing bet event poker.js:367
Firing bet event poker.js:350
Firing bet event poker.js:367
10
Firing ready event poker.js:340
23
Firing ready event poker.js:340
{-# LANGUAGE OverloadedStrings #-}
import Data.Attoparsec.Char8
import Data.Word
import Control.Applicative
data IP = IP Int Int Int Int deriving (Show)
data Command = PrivMsg String String
{-# LANGUAGE OverloadedStrings #-}
import Data.Attoparsec.Char8
import Data.Word
import Control.Applicative
data IP = IP Int Int Int Int deriving (Show)
parseIP :: Parser IP
parseIP = do
{-# LANGUAGE OverloadedStrings #-}
import Data.Attoparsec.Char8
import Data.Attoparsec.ByteString.Char8
import Data.Word
import Control.Applicative
data IP = IP Int Int Int Int deriving (Show)
parseIP :: Parser IP
@JacobLeach
JacobLeach / SimpleExpressionParsing.hs
Last active August 29, 2015 13:57
Simple Expression Parser
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative ((<|>))
import Data.Attoparsec.Text
import System.Environment
import Data.Text
data Expression = Expression Int Op Expression |
Value Int
deriving (Show)
Finished frequencies
Char: Null, Frequency: 22
Char: Null, Frequency: 10
Char: a, Frequency: 5
Char: b, Frequency: 5
Char: Null, Frequency: 12
Char: z, Frequency: 5
public class Test
{
public static void main(String[] args)
{
Parent a = new Parent();
Child b = new Child();
a.hello();
b.hello();
bmiTell :: (RealFloat a) => a -> a -> String
bmiTell weight height
| bmi <= 18.5 = "You're underweight, you emo, you!"
| bmi <= 25.0 = "You're supposedly normal. Pffft, I bet you're ugly!"
| bmi <= 30.0 = "You're fat! Lose some weight, fatty!"
| otherwise = "You're a whale, congratulations!"
where bmi = weight / height ^ 2
import Map
import Player
import System.Random
main = do
putStrLn "Welcome to Hunt the Wumpus"
gameloop (generateMap 10)
gameloop m = do
putStrLn ("You are in room: " ++ (show (location (_player m))))
### Keybase proof
I hereby claim:
* I am jacobleach on github.
* I am jacobleach (https://keybase.io/jacobleach) on keybase.
* I have a public key whose fingerprint is 1571 1D0A A0FC EE06 5AC0 9222 4FD9 301A B6E5 3381
To claim this, I am signing this object: