Awesome
Brainfuck interpreter written in jq
This is the proof that jq is turing-complete!
description
Brainfuck is an esoteric programming language having only eight commands, which is turing-complete. And, jq has a potential to write Brainfuck interpreter, so jq is turing-complete.
note
This interpreter dosen't support ,
command, because jq is not able to get a character from stdin.
usage
$ jq -s -R -M -r -f bf.jq
example
$ cat bf/a.bf
++++[>+<++++]>++.
$ jq -s -R -M -r -f bf.jq < bf/a.bf
A
$ jq -s -R -M -r -f bf.jq < bf/quine.bf | diff bf/quine.bf - # Warning! It is tooooo slowly and heavy process.
license
MIT-License. See http://makenowjust.mit-license.org/2014.
contributing
If you find bug or make it better, please send Issue or Pull Request :laughing: