Skip to content

Brainfuck interpreter written in TypeScript

License

Notifications You must be signed in to change notification settings

hammy1988/brnfck

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brnfck

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

How to install:

npm install 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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 69.1%
  • JavaScript 29.5%
  • Brainfuck 1.4%