3 ms·
Are you aware that GNU Guile, which is self hosted (written mainly in scheme), can interpret brainfuck? https://www.gnu.org/software/guile/manual/guile.html#Su
by dorfsmay 7y ago
Are you aware that GNU Guile, which is self hosted (written mainly in scheme), can interpret brainfuck?
https://www.gnu.org/software/guile/manual/guile.html#Supporting-Multiple-Languages https://www.gnu.org/software/guile/manual/guile.html#Support...
- whoeverest 7y agoI wasn't aware, no. However, interpreting Brainfuck code is the easy part, as I've learned. The hard part was creating a "runtime" that understands memory locations aka. variables. See this question that I asked (and later answered myself) around that time: https://softwareengineering.stackexchange.com/questions/284758/is-is-possible-to-write-a-brainfuck-with-variables-compiler https://softwareengineering.stackexchange.com/questions/2847... Most of the project was figuring out things similar to that. You get to appreciate how high-level machine code on our processors really is! When things like "set the stack pointer to 1234" are one instruction, instead of 10k.