24: Digging into some programming history
Last weekend I noticed a slew of fascinating papers pop up all over the place. I’d started searching for information on a couple different programming languages as I needed some inspiration for Fancynote, my own little language experiment. Each time I’d set off on my search I’d come across a paper written for something called HOPL4, on the history of the language I was looking into.
This may be due to my self-taught computer science education but I barely ever hear about the histories of the tools I’m using. By and large the things I’m reading about the field are firmly rooted in the now.
That’s why it was so exciting to come across these papers discussing the languages not in terms of features or benchmarks but situated in the history of their developments, products of people and decisions and context. 1
The languages I’ve been looking at are Clojure, Smalltalk, F#, and elisp. I can’t get into all all the history here, so let’s just focus on two interestesting bits from Clojure and Smalltalk.
A hammock drive language
Clojure was created by one person, Rich Hickey, and is stewarded by him to this day. There are a couple striking things about it’s development process. First is the absolute focus on practicality. Clojure was conceived of as a hosted programming language, meaning it would run on top of some other already widely distributed system, initially the Java Virtual Machine (more on this later). This avoids all sorts of issues for a new language, like getting people to understand it’s concepts and bulding a library ecosystem.
Second, Rich Hickey’s process in developing it is fascinating. He talks about it in Hammock Driven Development which I highly recommend (though I need to give it a rewatch). He “considers forming a rationale a significant part of the work of making Clojure”, it was a language created after a lot of careful consideration.
Smalltalk
On the other side of the language creator spectrum lies smalltalk. Instead of one clean lineage stewarded by a benevolent dictator we have countless branches and revisions. One incredibly interesting derivative I’d never heard of til this weekend, and which barely saw the light of day, is Strongtalk. It’s name comes from the fact that it has optional strong static typing, differing from every other small talk I’ve seen. 2.
I really should spend a whole newsletter talking about smalltalk (after doing months of research probably), it’s a fascinating language. It’s underpinned by a notion of objects and messages, and builds up programs entirely from those two concepts. And it has a strong tradition of entire GUI environments for editing smalltalk code, entirely written in smalltalk itself, and naturally extensible by the programmer.
Anways, back to strongtalk. It was being developed by a startup, and before they got to selling it, they were bought out by Sun, and the technology they were working on got repurposed as part of the JVM, one of the most widespread computing platforms in the world (the same that Clojure runs on!). Way later, one of the main developers, Lars Bak, went on to drive the development of V8, the javascript engine behind Google Chrome, another of the most widespread computing platforms in the world! It’s insane to me to see the lineage of this little programming language played out in software that shapes industries today.
So What’s up with fancynote?
Last week I set myself the task of figuring out how to handle new-lines in the code, and well, I did it in the simplest way I could, just filtering out newlines if I am executing code, and keeping them in if just rendering. It works for now, but it 100% will lead to problems down the line.
To be honest I’m kinda stalling on Fancynote. All this research into languages (and my other rabbit-hole, 2D graphics rendering, which connects I promise), has filled my head with so many different ideas and potential research directions. I’m in dire need of some Rich Hickey style hammock thinking.
I’m begining to feel the pain of the lack of cohesion in Fancynote, both in it’s vision and it’s code. Well, the former’s going to take some time, but I can definitely make progress on the latter.
I’ve been digging into Crafting Interpreters a book by Bob Nystrom3. Bob actually works on Dart, another programming language, that’s also designed by Lars Bak! It’s all connected!!
Anyways back to the book. It’s a wonderfully written guide to making a programming language that toes the line between theory and practicality. In short exactly what I need as a reference for hacking on fancynote!
For next week I want to read more of it and clean up the fancynote codebase. I love some good refactoring and it feels great to set time explicitly for it. That’s all y’all, thanks for reading!
-
One of the joys of working on a programming language is it forces you to look at other languages this way. You have to look past what they do to how they do it, and even more critically, why they do it in the way they do. ↩
-
One of my favorite programming languages today is Typescript, which is Javascript but with optional strong static typing. Given Javascript’s Smalltalk heritage (in more ways than one) this makes Typescript and Strongtalk some kind of distant cousins. ↩
-
Bob also has an amazing blog post on the making of the book. ↩