Aggam Rahamim's Site

Home Contact Random RSS

📅 21-04-2021 👀 200

I wrote a brainfuck interpreter.

What is brainfuck?

Brainfuck is a joke language, that is meant to be like a turing machine (something which I don’t know much about). It has 8 commands: * -: decrease the value stored at the current place in memory pointed to by the memory pointer. * +: increases the value stored at the current place in memory pointed to by the memory pointer. * >: increases the memory pointer. * <: decreases the memory pointer * ,: gets a character to the current place in memory pointed to by the memory pointer. * .: outputs character of ASCII code at the current place in memory pointed to by the memory pointer. * [ = like while(cur_block_value != 0) loop. * ] = if block currently pointed to’s value is not zero, jump back to [

Why use brainfuck

don’t

Why write an interpreter for brainfuck?

Because it’s fun. I had a great time developing it, and since I haven’t really made anything useful (not that this is useful lul) in C, or anything impressive, really. It also teaches you how to write a basic programing language, which is pretty cool. I recommend this as a project for anyone, especially, if like me, you want to really learn a specific programing language, or at least the basics.

Can I use it?

Use thing! Its on my github!