News for hackers. Stuff that matters.
Re:Let’s Build a Simple Interpreter, Part 18: Executing Proc... by dntbnmpls on Sunday February 23, 2020 @06:17PM (#22400260)
One way to get your feet wet is to write an eval function for a small language like "basic arithmetic language" in your programming language of choice. Allow only an int type, a few operators ( add, sub, mul ), etc. Then have eval parse then run a statement(s) from "basic arithmetic" and you'll get an idea of how interpreters work. From there you can delve into theory and writing interpreters for more complex languages. I believe in doing first and then learning theory after. Also, you can try writing eval in an OO language, functional language and procedural language to get a deeper grasp of the differences between these programming paradigms.
Re:Let’s Build a Simple Interpreter, Part 18: Executing Proc... by codr7 on Sunday February 23, 2020 @08:58PM (#22401010)
Indeed, that's pretty much where I started out; Arithmetic evaluators and template engines.

But it's a giant leap from there to Pascal, which is why I like to recommend Forth as a stepping stone.