This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Roughly based on https://github.com/Gabriel439/Haskell-Morte-Library/blob/master/src/Morte/Core.hs by Gabriel Gonzalez et al. | |
data Expr = Star | Box | Var Int | Lam Int Expr Expr | Pi Int Expr Expr | App Expr Expr deriving (Show, Eq) | |
subst v e (Var v') | v == v' = e | |
subst v e (Lam v' ta b ) | v == v' = Lam v' (subst v e ta) b | |
subst v e (Lam v' ta b ) = Lam v' (subst v e ta) (subst v e b ) | |
subst v e (Pi v' ta tb) | v == v' = Pi v' (subst v e ta) tb | |
subst v e (Pi v' ta tb) = Pi v' (subst v e ta) (subst v e tb) | |
subst v e (App f a ) = App (subst v e f ) (subst v e a ) |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zero | |
one | |
two | |
three | |
four | |
five | |
six | |
seven | |
eight | |
nine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def defineInts(): | |
for i in xrange (9+4+2): | |
print "const int = ;" | |
def caseStatements(): | |
for i in xrange (9): | |
print """case %s: | |
cout << P%s; | |
break;""" % (i,i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Chris wins!" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Poloniex Trollbox IRC Relay with filter | |
var autobahn = require('autobahn'); | |
var ent = require('ent'); | |
var irc = require('irc'); | |
var c = require('irc-colors'); | |
// set it up | |
var config = { | |
network: 'irc.freenode.net', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var autobahn = require('autobahn'); | |
var ent = require('ent'); | |
var irc = require('irc'); | |
var c = require('irc-colors'); | |
var channelName = '##trollboxtest'; | |
var captureDuration = 60 * 1000; // 60 seconds in milis | |
var wsuri = "wss://api.poloniex.com"; | |
var connection = new autobahn.Connection({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Bitcoin1 shall fork away from Bitcoin core. | |
2. Bitcoin1 shall have blocks larger than 1 MB. | |
3. This constitution is neither final nor official, being only a template. Fork it to propose changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE Rank2Types #-} | |
import Control.Exception | |
class ErrorF a where | |
fromErrorF :: a -> SomeException | |
class ErrorG a where | |
fromErrorG :: a -> SomeException | |
class ErrorH a where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE Rank2Types, GADTs, LambdaCase #-} | |
data Stream a res where | |
Head :: Stream a a | |
Tail :: Stream a (CoData (Stream a)) | |
newtype CoData con = CoD {unCoD :: forall r. con r -> r} | |
appendList :: [a] -> CoData (Stream a) -> CoData (Stream a) | |
appendList [] s = s |