Git Product home page Git Product logo

braindead's Introduction

BrainDead

Build Status Issues Status License Contact
Donate-Patreon Donate-Gratipay Donate-Paypal

About

BrainDead is an interpreter for the BrainFuck programming language, written in C, that can be run in interactive or non-interactive mode.

Documentation

Usage

braindead [OPTIONS] [TARGET]

By default, enters the interactive mode and interprets brainfuck code from stdin.
Type x, X, q or Q to exit the interactive mode.

If TARGET is specified, interprets it as a brainfuck code file and displays the result on the standard output.

Code samples

Here's the brainfuck code to use to print "Hello World!":

++++++++++
[>+++>+++++++>++++++++>++++++++++>+++++++++++<<<<<-]
>>++.>>+.+++++++..>+.<<<<++.>>+++++++.>>.+++.<.--------.<<<+.

Here's the brainfuck code to use to create a 'cat' like command:

,[.,],[.,]

Examples

Entering into interactive mode:

braindead

Running a brainfuck script:

braindead path/to/file

Running a brainfuck script by reading characters by characters, allocating only 2 stack cells at a time, and displaying debug informations:

braindead -drm 1 2 path/to/file

Running a brainfuck script with input from a file instead of stdin:

braindead path/to/file < path/to/input/file

Available command line arguments:

-h,    boolean,    --help
Displays help about the command

-v,    boolean,    --version
Displays the version number

-l,    boolean,    --license
Displays the license text

-m,    integer,    --malloc
Allocates <X> stack cells at a time (default is 85)

-r,    integer,    --read
Read <X> bytes from input file at a time (default is 1024)

-d,    boolean,    --debug
Debug mode - Displays every operation

-b,    boolean,    --enable-breakpoints
Enables the use of '@' symbols in the brainfuck code for breakpoints

-s,    boolean,    --enable-stack-debug
Enables the use of '$' symbols in the brainfuck code for stack debugging

-z,    boolean,    --enable-stack-reset
Enables the use of '%' symbols in the brainfuck code for stack reset

License

BrainDead is released under the terms of the Boost Software License - Version 1.0.

Repository Infos

Owner:			Jean-David Gadina - XS-Labs
Web:			www.xs-labs.com
Blog:			www.noxeos.com
Twitter:		@macmade
GitHub:			github.com/macmade
LinkedIn:		ch.linkedin.com/in/macmade/
StackOverflow:	stackoverflow.com/users/182676/macmade

braindead's People

Contributors

macmade avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tuboss

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.