Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


BF implementations in different languages

Subscribe to updates I use Brainfrack

Statistics on Brainfrack

Number of watchers on Github 23
Number of open issues 0
Main language Smalltalk
Open pull requests 0+
Closed pull requests 0+
Last commit almost 3 years ago
Repo Created over 8 years ago
Repo Last Updated almost 3 years ago
Size 128 KB
Organization / Authorwilfred
Page Updated
Do you use Brainfrack? Leave a review!
View Brainfrack activity
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating Brainfrack for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Build Status

A collection of BF interpreters in different languages. GPLv2 or later license.

Implementing BF is a great way of exploring unfamiliar programming languages. There's non-trivial logic, some I/O, and multiple data types. BF is still small enough that you can build a complete implementation in an evening or two.

For a robust, high performance BF implementation with good user feedback, see my 'industrial-grade' BF compiler.

Table of Contents



Apache Maven required.

$ cd java/brainfrack
$ mvn package


The Java implementation reads programs from standard in.

$ cat ../../sample_programs/hello_world.bf | java -cp target/brainfrack-0.1.jar com.github.wilfred.App
Hello world!


The Haskell implementation reads programs from standard in.

$ cd haskell
$ ghc Brainfrack.hs
$ cat ../sample_programs/hello_world.bf | ./Brainfrack


The Clojure implementation reads programs from standard in.

$ cd clojure/brainfrack
$ lein compile
$ cat ../../sample_programs/hello_world.bf | lein trampoline run


The C implementation reads programs from standard in.

$ cd c
$ make
$ cat ../sample_programs/hello_world.bf | ./brainfrack


$ cd racket
$ cat ../sample_programs/hello_world.bf | racket brainfrack.rkt

Test programs

http://www.hevanet.com/cristofd/brainfuck/tests.b is a treasure trove of implementation tests. Most implementations here don't pass all these tests yet.

Other projects in Smalltalk
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark