brainfuck and insomnia

I couldn’t sleep, so naturally I wrote a brainfuck interpreter.

Actually, if you want to get technical I wrote this a while ago. I spent about 2 days on it, and in the end just could not get the bastard thing to work. No matter what I tried, my brain just fell in a steaming heap when it came to make the loop constructs work when nested.

Imagine my dismay when, sleep deprived and emotionally drained it took me about 45 minutes to completely throw away about 80% of the original codebase and replace it with a workable replacement (Works with stack depths of up to python’s recursion limit) and another 30 to prettify, optimise slightly and document the codebase.

Take a look, and by all means make suggestions, it’s by no means perfect.

Source is a available here

About richo

I enjoy exploring interesting concepts in weird languages. I also like hacking on all of the things.
This entry was posted in Articles and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>