Skip to content

Instantly share code, notes, and snippets.

View ChristopherKing42's full-sized avatar

Christopher King ChristopherKing42

  • Milky Way Galaxy
View GitHub Profile
--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.
zero
one
two
three
four
five
six
seven
eight
nine
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)
@ChristopherKing42
ChristopherKing42 / monero.svg
Created October 6, 2016 05:05
A cartoony monero logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChristopherKing42
ChristopherKing42 / trollboxMonero.js
Last active August 31, 2016 20:34 — forked from ifandswitch/trollboxMonero.js
Node.JS - Quick & Dirty Poloniex Trollbox IRC Relay. Debian/Ubuntu: apt-get install libicu-dev / NPM Modules: npm install autobahn ent irc irc-colors
// 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',
@ChristopherKing42
ChristopherKing42 / trollboxMonero.js
Last active September 30, 2016 06:00 — forked from xCoreDev/trollbox.js
Node.JS - Quick & Dirty Poloniex Trollbox IRC Relay. Debian/Ubuntu: apt-get install libicu-dev / NPM Modules: npm install autobahn ent irc irc-colors
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({
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.
{-# LANGUAGE Rank2Types #-}
import Control.Exception
class ErrorF a where
fromErrorF :: a -> SomeException
class ErrorG a where
fromErrorG :: a -> SomeException
class ErrorH a where
{-# 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