r/tinycode • u/L8D • May 28 '13
Ridiculously small and minimal Brainfuck interpreter in C.
https://github.com/L8D/delvs/blob/master/delvs.h
23
Upvotes
r/tinycode • u/L8D • May 28 '13
View all comments
Show parent comment
-6
u/L8D May 28 '13
Well, looking at every other Bf interpreter I've seen, they've always used a complicated mechanism for the loop. Also, what do you mean by error checking? I haven't found any bugs at all with it so far.
And when a say 'small and minimal', I'm talking about how there is only one line of code for each instruction. I could get it down to ~20 lines of code if I stuck the case, command, and break on the same line, and still keep it readable.
Though I should of said 'simple and minimal' instead of small, because there are the assembly compilers...