Hacker News new | ask | show | jobs
by dorfsmay 2440 days 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#Support...

1 comments

I 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/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.