A somewhat-well typed, probably pretty over engineered brainfuck interpreter written in Idris.
brainfeck is built using idris 1.3.2. Installation instructions can be found here.
This project is split into 3 sub projects:
brainfeck-lib
which houses the brainfeck lexer, parser, and interpreterbrainfeck-cli
which just wraps the lib up and handles reading a provided file using the C backendbrainfeck-web
which calls the library from JS using the javascript backend. This is reliant on the index.html found in this repo.
- Install
brainfeck-lib
:idris --install brainfeck-lib.ipkg
Note that this installs the package globally. - Build
brainfeck-cli
:idris --build brainfeck-cli.ipkg
- Build
brainfeck-web
:idris --build brainfeck-web.ipkg
brainfeck PATH/TO/BRAINFUCK/PROGRAM
Or head over to the gh-pages hosted brainfeck-web implementation. This version is using the js backend for idris. The compiled code can be found in the brainfeck releases.