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
- Host: GitHub
- URL: https://github.com/masylum/node-brainfuck
- Owner: masylum
- Created: 2010-12-04T16:38:31.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2018-04-03T12:35:08.000Z (over 8 years ago)
- Last Synced: 2025-06-22T07:16:59.099Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
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