Skip to content

Instantly share code, notes, and snippets.

View chrisyco's full-sized avatar

Chris Wong chrisyco

View GitHub Profile
@danielwaterworth
danielwaterworth / main.hs
Created February 26, 2012 10:21
Error conscious, pure iteratee library (based on pipes)
{-# LANGUAGE FlexibleInstances, DeriveDataTypeable #-}
import Data.Char
import Data.Typeable
import Control.Monad
import Control.Exception
import Control.Monad.Trans
import System.IO
@danielwaterworth
danielwaterworth / StateMachine.hs
Created December 21, 2011 18:30
State Machine Library
{-# LANGUAGE GADTs #-}
module StateMachine where
-- A library for managing complexity of state machines by making them composable, feel free to contribute/steal
data StateMachine state where
Simple :: (state -> state -> Bool) -> StateMachine state
OrMachine :: StateMachine a -> StateMachine b -> (a -> b -> Bool) -> (b -> a -> Bool) -> StateMachine (Either a b)
AndMachine :: StateMachine a -> StateMachine b -> StateMachine (a, b)
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.