I've been having fun messing around in Roc the past week-ish, so I decided to try making a small implementation of brainfuck in it.
It's technically not a complete implementation since I didn't implement the "read byte from input" instruction , as it would require reading from StdIn and I haven't bothered to interact with any platforms yet, but the rest of it should work fine. There's a whole host of optimizations I'd like to make as well, but I'm pretty happy with it as a first draft.
Hope y'all enjoy
https://gist.github.com/Pax-Newman/2d6b278e20fca167fed3b93cc5284db3
Nice! I made this a few years ago, would be interesting to see how the new compiler compares to be old one! https://github.com/Hasnep/brainroc
Last updated: Jul 23 2026 at 13:15 UTC