2. Rediscovering Common Lisp

Kaveh Kardan
3 min readApr 18, 2022

--

How we got here

I had not done any development in some time, concentrating on my writing, photography, and filmmaking. More about that some other post, maybe.

Speaking to an online friend who lives in London, we began chatting about software development in the old days (he had been a Solaris developer) and I mused on how I used to love developing in Common Lisp. He asked what made Lisp special and based on my comments, asked if I could teach him some CL.

So after my usual bouts with self-doubt and over-thinking, I downloaded CCL (Clozure Common Lisp) and Emacs/Slime onto my Mac and began tinkering. Slowly at first, getting a basic OpenGL viewport working, and then more rapidly.

And the ideas started to pour in. Flooded my mind to the point I would catch myself developing the CL lessons until 4am. I had not felt that energized about programming in a long time.

Thinking about what topics I wanted to cover (the REPL, introspection, CLOS, method combinations, macros, etc.), I decided to use 2D graphics as the vehicle to illustrate these features. This both tapped into my experience with CGI and (I hoped) would keep the lessons visual and engaging.

So over the span of a few weeks, we would have Zoom sessions where I would share my screen, evaluate code, show 2D graphics in the OpenGL viewport, and describe features of the code as we went along.

It occurred to me that I didn’t want to stop once the lessons were over.

And so here I find myself, developing a new 3D system.

Design & Coding

I am not planning too far ahead. I have some general notions, but this is going to be an adventure in exploratory programming. I have given a lot of thought to why, how, and what I’m doing, and I will touch on those topics later.

But for now, it’s all about momentum and energy. Developing quickly, as one can in CL, and not fretting that there is no design document, nor well-understood destination in site.

I began with basic scene classes: transform, shapes, and group. Resisting the urge to add lots of features, my goal was to get some 3D graphics up and running as quickly as possible. As the fellow says in “Halt and Catch Fire”, computers aren’t the thing: they’re the thing that gets us to the thing.

And I am eager to get to the thing.

Taking a straight-ahead approach — use CLOS and lists — I am not concerning myself with code efficiency or optimizations or feature-completeness. Performance concerns would slow me down, and momentum is of the essence. Understand — discover — what it is you really are doing, then take the time to decide what may need to be more efficient.

And while I am doing all this, I can’t stop thinking of where this may take me.

Next Episode

--

--

Kaveh Kardan

MIT mathematics degree • wrote animation software used in “Jurassic Park” • software R&D lead on “Final Fantasy” movie • software dev on “The Hobbit” films