A brainfuck interpreter and optimizing compiler