Skip to content

Instantly share code, notes, and snippets.

View JohnEarnest's full-sized avatar

John Earnest JohnEarnest

View GitHub Profile
@pikhq
pikhq / chip8-disas.c
Created April 20, 2013 04:51
A quick Chip8 disassembler using Octo mnemonics.
#include <stdint.h>
#include <stdio.h>
int main()
{
int addr = 0x200;
while(!feof(stdin)) {
uint16_t opcode = (unsigned char)getchar() << 8;
opcode |= (unsigned char)getchar();
if(feof(stdin)) { break; }

fml

The function manipulation language

"I just implemented Conway's Game of Life in two lines of code. #fml"

pad = x flip[stitch] 0, stitch 0, flip[cat] 0, cat 0
life = pad, neighborhoods[3 3], [ravel, [sum in?: [x @ 4, + 3; 3]]]/2