Skip to content

Instantly share code, notes, and snippets.

@fis
fis / 99bob.bf
Last active Dec 26, 2015
Very simple brainfuck-to-MarioLANG translation construction. Assumes that walking over "s when there are explicit arrows is safe. Seems to be the case for the single extant MarioLANG interpreter.
View 99bob.bf
##########################
###
### Severely updated version!
### (now says "1 bottle" and
### contains no extra "0" verse)
###
##########################
### 99 Bottles of Beer ###
### coded in Brainfuck ###
### with explanations ###
@fis
fis / ff3.c
Last active Dec 25, 2015
ff3 - an allegedly speedy Befunge-93 interpreter
View ff3.c
/*
* ff3.c - fast befunge-93 interpreter
* (C) 2010 Heikki Kallasjoki <fis@zem.fi>
*
* This is a reasonably fast, reasonably portable (needs GCC, some
* other assumptions) Befunge-93 interpreter. The main crafty trick
* here is that all (well, most) instructions have four
* implementations, specialized to the current delta, leading to a
* single indirect jump per executed instruction.
*
View Makefile
vnckvm: vnckvm.o d3des.o
gcc -Wall -g $^ -o $@ \
`pkg-config --libs gtk+-2.0`
vnckvm.o: vnckvm.c d3des.h
gcc -c -Wall -g vnckvm.c -o vnckvm.o `pkg-config --cflags gtk+-2.0`
d3des.o: d3des.c d3des.h
gcc -c -Wall -g d3des.c -o d3des.o