An open API service indexing awesome lists of open source software.

https://github.com/masylum/node-brainfuck

Brainfuck interpreter for nodejs
https://github.com/masylum/node-brainfuck

Last synced: about 1 year ago
JSON representation

Brainfuck interpreter for nodejs

Awesome Lists containing this project

README

          

@@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@ @@@
@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@@ @@@ @@@
@@! @@@ @@! @@@ @@! @@@ @@! @@!@!@@@ @@! @@! @@@ !@@ @@! !@@
!@ @!@ !@! @!@ !@! @!@ !@! !@!!@!@! !@! !@! @!@ !@! !@! @!!
@!@!@!@ @!@!!@! @!@!@!@! !!@ @!@ !!@! @!!!:! @!@ !@! !@! @!@@!@!
!!!@!!!! !!@!@! !!!@!!!! !!! !@! !!! !!!!!: !@! !!! !!! !!@!!!
!!: !!! !!: :!! !!: !!! !!: !!: !!! !!: !!: !!! :!! !!: :!!
:!: !:! :!: !:! :!: !:! :!: :!: !:! :!: :!: !:! :!: :!: !:!
:: :::: :: ::: :: ::: :: :: :: :: ::::: :: ::: ::: :: :::
:: : :: : : : : : : : :: : : : : : :: :: : : :::

Lightweight, aynchronous, robust, flexible, non-blocking, fleiba, brainfuck interpreter written in javascript.
Inspired by [txus](https://github.com/txus/brainfuck)

## Contents

* 1 Amazing Nodejs module. Take advantadge of the event loop with brainfuck.
* 1 Splendid Binary. Brainfuck power on your command line.
* 1 Awesome brainfuck client for your browser!
* 1 Replica from the script above... compressed! Less than 400b! OMG!

## Install

$ npm install node-brainfuck

## Nodejs

var bf = require('node-brainfuck');
bf(stdout);

## Binary

$ node-brainfuck hello_world.bf

## Client



(function () {
var str = '';
bf(",>++++++[<-------->-],[<+>-]<.", function(out) {
if (out === undefined) {
alert('program output => ' + str);
} else {
str += out;
}
});
}());

## TODO:

* Needs testing
* Some nested brackets don't work properly
* Somehow expose nodejs stdin so it can be used with any stream reader. (for example, building a http brainfucked server)
* Have some holidays