All of you Muses readers know that I have a preference for writing extended articles, what my coworkers call “long textual documents.” I’ve learned that said long textual documents don’t often get too far. Likewise, extended articles are not the standard for pages like Cubicle Muses. Therefore, I’ve resolved to publish the Misp Chronicles serially. Each installment will explore one principle of Misp: just enough to whet the appetite. The series will culminate in a Misp meta-interpreter implemented in exactly fifty lines of Misp code. To kick things off, I’ll tell you a little bit about what Misp is.
Semantically, Misp is a trimmed down Scheme. Misp has lexical scope, multiple argument anonymous functions, and allows arbitrary expressions in head position (unlike Common Lisp). Misp differs from Scheme in that nil evaluates to false in an if expression. Scheme uses the special value #f for this purpose, Common Lisp uses nil.
As you would expect from any Lisp, Misp has symbols, first class functions, and builds data structures by pairing things together. Misp is purely functional and has no top-level: function application is the only way to extend the environment. This makes implementing things a bit tricky. However, just tacking on a top-level would besmirch Misp’s elegance with a cantankerous cancer of kludgity.
Tweaking Misp into another Lisp would be of no use. Once you reach the summit, you can climb no higher. What’s that? In the distance, through the haze, a tall dark shadow looms in the North: another peak. Cold, forbidding, the pinnacle is lost in a wisp of cloud, a brushstroke on a twilight canvas. It is the anti-Lisp. Lisp’s polar opposite. It has no functions. It needs no functions. Rather, this coLisp is all environments. It has first class environments: environment after environment, in environment, of environment, through environment.
What a strange far-off place! I wonder what it’s like there. I wonder how to get there. Perhaps we’ll go someday. For now, enjoy Misp’s tree-lined slopes. Eventually, we’ll scale the meta-interpreter heights and one day we may leave the vast kingdom of Lisp for that other, distant, unexplored wilderness.
Commentary