Coder Social home page Coder Social logo

brainfuck's Introduction

Brainfuck

A Brainfuck interpreter that runs on node.js!

Installation

Via npm (node package manager)

npm install brainfuck

Purpose

This was written with the intent of learning the concepts behind Turin-complete programming languages - as well as for some coding fun over the weekend! It was developed using vows (an asynchronous BDD/TDD framework).

Learning Brainfuck

Designed by Urban Müller in 1993, Brainfuck is a Turing-complete programming language made of eight instructions, each a single character in length, and no operands:

> : increments the data pointer
< : decrements the data pointer
+ : increases byte-value at the data pointer by one
- : decreases byte-value at the data pointer by one
. : converts the byte-value at the data pointer into an ASCII character
, : accepts input an stores it's byte-value at the data pointer
[ : if the byte-value at the data pointer is zero, jump forward to the instruction after the matching ']'
] : if the byte-value at the data pointer is non-zero, jump back to the instruction after the matching '['

brainfuck's People

Contributors

rajkissu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

brainfuck's Issues

Add a `brainfuck` binary

E.g.

$ brainfuck -c '.+[.+]' # execute a brainfuck script directly
��������    
�
������������������ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������� ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ

# execute a brainfuck file, passing input to the program
$ brainfuck -f foo.bf 'input'

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.