Git Product home page Git Product logo

brainbreak's Introduction

Coverage Status GitHub Workflow Status Haskell version

brainBreak

Simple BrainFuck toolkit written in haskell.

This project covers 3 things:

You can check it by yourself.

Instalation

You need to install Stack before continue. Since you've got the Stack, you can simply install this project by running:

git clone https://github.com/s3rius/brainbreak.git
cd brainbreak
stack install

Additionally for compilation you need to have different compilers installed. For C++ compilation you need to install clang++.

REPL

asciicast You can just call bb to enter REPL. It works as ipython. Every time you hit the Enter button, code evaluates. It's simple as is.

REPL itself inspired by the IPython project and looks similar to it. Addition commands:

In [0]: ++++

# Print current REPL state.
In [1]: :state
Current index: 0
Offset from start: 0
part of curren buffer:
[0,0,0,0,0,4,0,0,0,0,0]

# Print current buffer as list of integers.
In [2]: :buf
[0,0,0,0,0,4,0,0,0,0,0]

# Print current buffer as characters.
In [3]: :bufc
"\NUL\NUL\NUL\NUL\NUL\EOT\NUL\NUL\NUL\NUL\NUL"

Interpreter

asciicast To run brainbreak as interpreter you need to provide a brainFuck file.

bb -i /path/to/file.bf

This command will optimize and evaluate the code from file.

Compiler

asciicast To compile your bf files you need to provide input and output files. The backend option can be omitted.

bb -i /path/to/input.bf -o /path/to/output

# If you want to change compilation backend you can add option
bb -i /path/to/input.bf -o /path/to/output -b Cpp

brainbreak's People

Contributors

s3rius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kolaer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.