node package manager

bf

Interpret brainfuck in node.js.

bf.js

What does it do?

bf.js is a brainfuck interpreter written in javascript/node.js. For example,

> var bf = require('bf')
> bf('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.', console.log)
Hello World!

> 

Cool, right?

Why?

Tane Piper made a joke about a brainfuck module for node.js, and I thought it'd be a quick project--after all, brainfuck was designed to be easy to compile (though not particularly easy to write)!

No, I have little interest in Actually Writing Brainfuck. :)

This is actually a second rewrite, which abandons the idea of a bf2js compiler and simply interprets brainfuck strings. Hopefully, its more elegant and easier to understand. Plus, it uses a newer, better prompt module!

How do I install it?

You can just copy bf.js if you'd like, or you can use npm:

npm install bf

Authors:

Licensing:

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.