Let’s Write a PostScript Interpreter

I think the most trustworthy programming languages are those which are human-scale: languages which a single user could reasonably write from scratch on some readily-available computational substrate. Knowing how to make your own tools provides a satisfying feeling of power.

Today I’d like to take you on a brisk journey through the process of implementing an interesting subset of the PostScript programming language. We will ignore or simplify many features of the language, and we will elide most error-handling for simplicity, but every PostScript example we discuss will be a well-formed PostScript program which has the same behavior in our toy subset and a standard PostScript interpreter like Ghostscript.