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

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

Brain

A computer language based on Brainfuck.

Table of Contents

About

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).

Install

Arch Linux via AUR

yaourt -S brain

Docker

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

Documentation

You can check this repository documentation on https://brain-labs.github.io/brain/docs/html/index.html

Current Status

Brain is stable on its tag version 1.0

Obs.: To use Project Status (the "Kanban" below), please visit:https://github.com/luizperes/status-projects/blob/master/README.md and http://luizperes.github.io/status-projects/

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

TODO List

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 http://llvm.org/releases/download.html

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:

Mac

brew install pre-commit

Linux

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 https://github.com/luizperes/BrainfuckInterpreter and https://github.com/Lisapple/BF-Compiler-Tutorial-with-LLVM, 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>.

Commands

Implemented

Not Implemented

Example of the instructions above:

Compiler Options

Applications on real life

Help

Feel free to send your pull requests. :)

LICENSE

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

Continue reading on github.com