Building a Brainfuck DSL in Forth using code generation
venko.blog·9h·
Discuss: Hacker News
🔗Concatenative Programming
Preview
Report Post

This article describes supporting Brainfuck as an embedded language within Forth using meta-programming. I had a lot of fun figuring this out. Like most Forth code, the resulting program is quite compact. My explanation of it is not.

I prefer to assume minimal prior knowledge from the reader and so have erred on the side of over-explanation, but for the sake of brevity I do assume that you’re at least somewhat comfortable with the common programming language concepts and the act of writing programs. If you’re already familiar with Forth and Brainfuck, feel free to skip the Introduction and head straight to The Cool Part. If you’re a Forth enthusiast and have a solid grasp on the internals of the language, you might consider also skipping the Concepts section. If you’re …

Similar Posts

Loading similar posts...