Skip to content

Instantly share code, notes, and snippets.

use vec;
pub trait BitField {
fn get(&self, index: u8) -> bool;
fn set(&mut self, index: u8, value: bool);
fn ensure_size(&mut self, byte: u8);
}
pub struct U8BitField {
u8s: ~[u8],
@ldunn
ldunn / gist:1526376
Created December 28, 2011 04:52
Cards Against Humanity (black)
_? There's an app for that
Why can't I sleep at night? _
What's that smell? _
I got 99 problems but _ ain't one.
Who stole the cookies from the cookie jar? _
What's the next Happy Meal (r) toy? _
Anthropologists have recently discovered a primitive tribe that worships _.
It's a pity that kids these days are all getting involved with _.
During Picasso's often-overlooked Brown Period, he produced hundreds of paintings of _.
Alternative medicine is now embracing the curative powers of _.
@ldunn
ldunn / gist:1526304
Created December 28, 2011 04:38
Cards Against Humanity (white)
Coat hanger abortions
Man meat
Autocannibalism
Vigorous jazz hands
Flightless birds
Pictures of boobs
Doing the right thing
Hunting accidents
A cartoon camel enjoying the smooth, refreshing taste of a cigarette
The violation of our most basic human rights
@ldunn
ldunn / Black cards
Created December 28, 2011 04:06
CAH in progress.
What's that smell? _
For my next trick, I will pull _ out of _!
It's a shame kids these days are getting involved with _.
global loader
extern kmain
; Multiboot!
MODULEALIGN equ 1<<0
MEMINFO equ 1<<1
FLAGS equ MODULEALIGN | MEMINFO
MAGIC equ 0x1BADB002
CHECKSUM equ -(MAGIC + FLAGS)
g++ -I include -g -O2 -c src/player.cpp -o src/player.o
src/player.cpp: In constructor ‘Player::Player()’:
src/player.cpp:6:30: error: class ‘Player’ does not have any field named ‘Rotation’
src/player.cpp:6:56: error: class ‘Player’ does not have any field named ‘Pos’
src/player.cpp:6:159: error: no matching function for call to ‘Entity::Entity()’
include/entity.h:14:5: note: candidates are: Entity::Entity(Vector3, Vector3, Vector3)
include/entity.h:8:1: note: Entity::Entity(const Entity&)
src/player.cpp: In constructor ‘Player::Player(float, Vector3, Vector3, std::string)’:
src/player.cpp:8:105: error: class ‘Player’ does not have any field named ‘Rotation’
src/player.cpp:8:124: error: class ‘Player’ does not have any field named ‘Pos’
#pragma once
#ifndef ENTITY_H
#define ENTITY_H
#include "vector3.h"
class Entity
{
public:
Vector3 Pos;
#pragma once
#ifndef BLOCK_H
#define BLOCK_H
class Block
{
public:
Block() {};
virtual Block *newBlock() {};
package main
import ("fmt"
"time")
func main() {
var t = time.LocalTime()
fmt.Println(t.Year)
}
data Expr = Expr Bool
| Conjunction Expr Expr
| Negation Expr
| Disjunction Expr Expr
| Implication Expr Expr
deriving (Eq, Show)
nnf :: Expr -> Expr
nnf (Expr expr) = Expr expr
nnf (Conjunction expr1 expr2) = Conjunction (nnf expr1) (nnf expr2)