Interpret brainfuck in node.js.
> var bf = require('bf') > bf('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.', console.log) Hello World! >
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!
You can just copy bf.js if you'd like, or you can use npm:
npm install bf
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <email@example.com> 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.