Show HN: Simple Brainfuck Interpreter in Python

1 points by jventura ↗ HN
Yesterday I had some free time and decided to have fun with the brainfuck language [0]. Its concepts seemed simple enough that I thought I could make an interpreter in 30 minutes.

It took a little bit more because of loops, but I had a lot of fun building it. I even woke up earlier today just to make it work with nested loops. Here's the link if someone wants to check it out [1]. The "magic" is mostly on the eval loop [2].

There was this thread yesterday on how to rediscover the joy of programming [3]. I think that implementing simple interpreters in your language of choice may be a way to have some fun!

[0] https://repl.it/languages/brainfuck

[1] https://github.com/joaoventura/brainfuckvm

[2] https://github.com/joaoventura/brainfuckvm/blob/master/brainfuck.py#L27

[3] https://news.ycombinator.com/item?id=22860682

0 comments

[ 2.9 ms ] story [ 7.3 ms ] thread

No comments yet.