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-libwhich houses the brainfeck lexer, parser, and interpreterbrainfeck-cliwhich just wraps the lib up and handles reading a provided file using the C backendbrainfeck-webwhich 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.ipkgNote 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.