Skip to content

Instantly share code, notes, and snippets.

View lambda-fairy's full-sized avatar

Chris Wong lambda-fairy

View GitHub Profile
@lambda-fairy
lambda-fairy / main.c
Last active December 27, 2015 19:49
Test C program
/* This program is not valid C. */
#include <stdio.h>
int main() {
puts("Hello, world!");
return 0;
}
@lambda-fairy
lambda-fairy / pinkie.markdown
Last active December 28, 2015 06:29
Pinkie bikeshedding

Pinkie bikeshedding

Property syntax

Lookup

obj.prop
@lambda-fairy
lambda-fairy / Stuff.agda
Created December 5, 2013 23:52
Random proofs
module Stuff where
-- False is defined as a type with no values.
data ⊥ : Set where -- empty
-- Not-A is defined as A implying false.
¬ : Set → Set
¬ A = A → ⊥
-- Double negation. Some theorems in classical logic are not provable in
@lambda-fairy
lambda-fairy / grammar.peg
Last active December 31, 2015 02:49
Pinkie grammar
# Grammar for the algorithmic language Pinkie
block = (stmt (nl stmt)*)?
stmt
= name space "=" space expr
/ expr
expr = atom (space atom)*
@lambda-fairy
lambda-fairy / main.rs
Last active January 1, 2016 08:29
ICE test case
#[allow(dead_code)];
mod parse;
/*
AAAAAAAAA
AAAAAAAAAAA
AAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@lambda-fairy
lambda-fairy / parse.rs
Last active January 2, 2016 08:49
Prototype shunting-yard regex parser
/// Shunting-yard regex parser
#[derive(Debug)]
pub enum Token {
Empty,
Lit(char),
Op(Op)
}
@lambda-fairy
lambda-fairy / boxing.md
Created January 24, 2014 01:55
The History of Boxing, by Jim Crawford

Boxing has been in the news lately since Uwe Boll, in an attempt to prove that his films are good after all, challenged his critics to take him on in the ring. But did you know that boxing was not always a violent sport?

As conceived in 1632 by Portuguese printing press operator Andre Felipe, boxing was a gentleman's game, in which two men would square off and regale each other with stories monotonous for days on end, until one of them fell to the ground from boredom or exhaustion. Over the next few years the new sport developed a respectable following of a few hundred local socialites.

Ironically, it was Felipe's son, Andre Felipe Felipe, who developed what he called the “Punching” strategy, in 1637, after seeing a schoolboy strike another in anger, causing him to fall down. When Andre Felipe Felipe challenged the then-champion, British expatriate “Sleepless” Bill Bishop, to a match, Bishop was the odds-on favorite. You can imagine his surprise when, while he was describing what he had had for breakfast th

@lambda-fairy
lambda-fairy / maintain-package.md
Last active August 29, 2015 14:01
Custom docs copy

/package/:package/maintain

Maintain bonbon version 1.2.1

Status: build successful (green) / build pending (yellow) / docs uploaded by maintainer (blue) / build failed

@lambda-fairy
lambda-fairy / names.txt
Last active August 29, 2015 14:02
Interesting pony names
Acid Test
Aqua Regia
Branch Cut
Break Even
Cash Flow
Ellie and Ella
Emmentaler
First Mover
Fore Sight
Graham Cracker
package: hello-1.0.1.2
os: linux
arch: x86_64
compiler: ghc-7.6.3
client: cabal-install-1.20.0.2
dependencies: base-4.6.0.1
install-outcome: InstallOk
docs-outcome: Ok
tests-outcome: NotTried