tobiasholler / brnfck

Brainfuck interpreter written in TypeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brnfck

Brainfuck interpreter and CLI written in TypeScript. It interprets vanilla Brainfuck, no fancy stuff!

How to install:

npm install -g https://github.com/tobiasholler/brnfck.git

How to use it

brnfck file.bf

With input

brnfck file.bf -i "HELLO"

Debug mode for more output

brnfck file.bf -i "HELLO" -d

For everything else, --help is your friend

brnfck --help

Under the hood

This interpreter is compiles the Brainfuck code to JavaScript which will then be run using the eval function. At the beginning of this project the code was run with a old style interpreter, it took ~1430 seconds to run Mandelbrot now with the compiler it only takes ~60 seconds (tested on my machine).

Todo for the next releases

  • Read Files to input
  • Input during execution
  • Update code to make it less confusing and more organized
  • Video Driver, so you can program Games in Brainfuck

About

Brainfuck interpreter written in TypeScript

License:MIT License


Languages

Language:TypeScript 69.1%Language:JavaScript 29.5%Language:Brainfuck 1.4%