The last time Hackerfall tried to access this page, it returned a not found error. A cached version of the page is below, or click here to continue anyway

GitHub - nikumu/brain: An esoteric programming language compiler on LLVM based on Brainfuck


A computer language based on Brainfuck.

Table of Contents


Brain wants to improve the performance of the Brainfuck programming language and extend it as well, as Brainfuck itself has a lack of flexibility and does not perform great control over complex computations. Brain is open to new model represetantion and allows programmers to extend its capability by attaching LLVM IR to its code.

One of the main ideas of Brain is saving some operations in machine language, creating an instruction optmizer due to the excess of instructions that Brainfuck would generate. Brain aims to implement it by using current technology (LLVM).

In spite of implementing new commands and features, Brain is completely compatible with Brainfuck (but the opposite is not true).


Arch Linux via AUR

yaourt -S brain


docker pull luizperes/brain:1.0
docker run -it luizperes/brain:1.0


You can check this repository documentation on

Current Status

Brain is stable on its tag version 1.0

Obs.: To use Project Status (the "Kanban" below), please visit: and

Project Name Status Technology Priority Deadline Brain 1.0 C/C++/LLVM Low Brain 1.1 C/C++/LLVM Low


If you want to check the micro TODO list, please see this issue.

How to build LLVM

Brain runs on the top of LLVM, thus, you are required to install the lastest versions of LLVM. You can do that by following this

How to install pre-commit

This project uses pre-commit to help us to check our commits in order to minimize bugs and other problems on the project, therefore is strongly recommended that you use it, if you are intending to contribute to the project. For that, you can install by:

if you have pip installed:


brew install pre-commit


sudo pip install pre-commit

After that, go to where Brain lives:

$ cd /path/to/brain
$ pre-commit install

More information about that here

How to build Brain and run files

To build it, after installing LLVM, execute:

$ cd /path/to/brain/src
$ make

You can also change the compiler (tested on g++ and clang++) on the Makefile inside the src directory.

After running make on it, you can execute:./brain your_brain_file.b. Please check the current status of the project.

How it has been built

Brain is based on previous work and, now trying to make something more serious: Turing Complete, faster, more features/commands and different types.

Technical Information

Brain is now a Turing Complete language. You can now extend the tape size by using the flag --size=<tape size>.



Not Implemented

Example of the instructions above:

Compiler Options

Applications on real life


Feel free to send your pull requests. :)


This project extends GNU GPL v. 3, so be aware of that, regarding copying, modifying and (re)destributing.

Continue reading on