Posted 11 October 2014 - 12:59 AM
Well i got bored tonight, and internets have been going up and down so here goes:
As many of you might not know BF is a esoteric programming language, that has only 8 instructions, turing-complete, and is one of the many ways to write "un-maintainable code."
I wrote an interpreter for that language, with 97 lines of code, and just over 2265 characters. speed-wise it isn't that great, however if given long enough it can and will run any standard BF code. It also has some optimizations, including having a table set up for the jumps with "[]" instead of searching.
pastebin get vFkqixs5 <name of prog> to get this absolutely pointless interpreter.
Edits: update 1.1 : fixed the midnight bug, caused by the change of day resulting in a "too long without yield" error.
Update 1.2: fixed bugs with not generating ram tables properly (should fix almost all bugs), adjusted boost processing variables.
(you can find some more info on the language at wikipedia here BF)
As many of you might not know BF is a esoteric programming language, that has only 8 instructions, turing-complete, and is one of the many ways to write "un-maintainable code."
I wrote an interpreter for that language, with 97 lines of code, and just over 2265 characters. speed-wise it isn't that great, however if given long enough it can and will run any standard BF code. It also has some optimizations, including having a table set up for the jumps with "[]" instead of searching.
pastebin get vFkqixs5 <name of prog> to get this absolutely pointless interpreter.
Edits: update 1.1 : fixed the midnight bug, caused by the change of day resulting in a "too long without yield" error.
Update 1.2: fixed bugs with not generating ram tables properly (should fix almost all bugs), adjusted boost processing variables.
(you can find some more info on the language at wikipedia here BF)
Edited on 11 October 2014 - 11:22 PM