Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 64 lines (49 sloc) 2.166 kb
c4d5306 @masylum logo
authored
1 @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@ @@@
2 @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@@ @@@ @@@
3 @@! @@@ @@! @@@ @@! @@@ @@! @@!@!@@@ @@! @@! @@@ !@@ @@! !@@
4 !@ @!@ !@! @!@ !@! @!@ !@! !@!!@!@! !@! !@! @!@ !@! !@! @!!
5 @!@!@!@ @!@!!@! @!@!@!@! !!@ @!@ !!@! @!!!:! @!@ !@! !@! @!@@!@!
6 !!!@!!!! !!@!@! !!!@!!!! !!! !@! !!! !!!!!: !@! !!! !!! !!@!!!
7 !!: !!! !!: :!! !!: !!! !!: !!: !!! !!: !!: !!! :!! !!: :!!
8 :!: !:! :!: !:! :!: !:! :!: :!: !:! :!: :!: !:! :!: :!: !:!
9 :: :::: :: ::: :: ::: :: :: :: :: ::::: :: ::: ::: :: :::
10 :: : :: : : : : : : : :: : : : : : :: :: : : :::
24f7994 @masylum 0.0.1 released
authored
11
12 Lightweight, aynchronous, robust, flexible, non-blocking, fleiba, brainfuck interpreter written in javascript.
13 Inspired by [txus](https://github.com/txus/brainfuck)
14
15 ## Contents
16
17 * 1 Amazing Nodejs module. Take advantadge of the event loop with brainfuck.
18 * 1 Splendid Binary. Brainfuck power on your command line.
19 * 1 Awesome brainfuck client for your browser!
20 * 1 Replica from the script above... compressed! Less than 400b! OMG!
21
22 ## Install
23
24 $ npm install node-brainfuck
25
26 ## Usage
27
28 ### Nodejs
29
30 var bf = require('node-brainfuck);
31 bf(stdout);
32
33 ### Binary
34
35 $ node-brainfuck hello_world.bf
36 H
37 e
38 l
39 l
40 ...
41
42 ### Client
43
44 <script src='brainfuck-client-compressed.js' type='text/javascript'></script>
45 <script type='text/javascript'>
46 (function () {
47 var str = '';
48 bf(",>++++++[<-------->-],[<+>-]<.", function(out) {
49 if (out === undefined) {
50 alert('program output => ' + str);
51 } else {
52 str += out;
53 }
54 });
55 }());
56 </script>
59bd92c @masylum added TODO
authored
57
58 ## TODO:
59
60 * Needs testing
61 * Some nested brackets don't work properly
62 * Somehow expose nodejs stdin so it can be used with any stream reader. (for example, building a http brainfucked server)
63 * Have some holidays
Something went wrong with that request. Please try again.