Share your repls and programming experiences

← Back to all posts
BrainF Implementation in C++

A BrainF implementation written in C++. I'm bad with names, so it doesn't have one (Suggestions in the comments if you feel like it).


  • Compiles BrainF to C
  • Specify amount of cells at compile-time
  • System calls (kinda)
  • Works 100% correctly (In compiler mode)

WIP Features

  • Optional interpreter instead of compiler


  • Command-line REPL (Similar to the Python shell)
  • Specify size of cells at compile-time


Same as the original BrainF:

  • 30,000 memory cells
  • Each cell is 1 (unsigned) byte

The compiler source code is in the attached repl. If you want to run it, fork the repl and change (idk what's in there, I keep changing it).
Thanks for reading, and please give feedback in the comments! :)

dashgeometry (0)

Thanks for the sharing. This is my first time visiting your blog. Really I like your Blog. Keep doing more like this.

DynamicSquid (4916)

There's a bunch of errors when I run it



nF#inlcude <iostream>

looks like I had a minor stroke while typing the title of the repl. It should work now lol.


@DynamicSquid Thanks! Once I get the interpreter done, the REPL should be a piece of cake (and then this project will actually be done). I saw a bunch of BrainF implementations on Esolang, but they were all interpreters, so I decided to make a compiler and an interpreter.


@DynamicSquid And then I came up with the idea for a REPL at 11:00 PM last night when I was trying to sleep

DynamicSquid (4916)

@ANDREWVOSS lol, that always happens to me