Some time in 1990 (I think it was) an odd conjunction occurred. I visited a family friend and talked about Forth – he wanted to make his own fuel-injection computer. Returning to Seattle, I read everything I could find about Forth. The engineering library at the University of Washington has a lot: the Caltech manual; the FORML (Forth modification lab) proceedings; Forth Dimensions (the now-defunct Forth Interest Group’s now-defunct magazine).
I had known about Forth since I was sixteen; but I hadn’t plumbed its depths until that week. I made up a packet of articles and hand-written notes and sent it off.
Shortly thereafter I ran into Trimpin, a local artist. I had seen a performance of a work of his – Circumference – at Bumbershoot (a big arts festival in Seattle) a year or two before. This performance involved a roomful of percussion – drums, timpani, garbage cans – all played by “robot hands”. Each instrument had a drumstick poised over it, attached to a solenoid, which was attached via a homemade interface to Trimpin’s computer. Using MIDI and MIDI sequencing software (Performer) he controlled this roomful of instruments. It was breathtaking.
His studio was in my neighborhood, and one day I met him on the street, getting an espresso. Oh, Seattle!
We fell into a collaboration and I was able to realize two dreams: to use Forth, and to program the Motorola 6809, a processor I had been fascinated by since reading about it in Byte magazine in the late 1970s. I wrote a Forth development system, based on a terrible “object-oriented” Forth for the Macintosh. In a few days’ time I was able to write an assembler for the 6809, a Forth cross-compiler, and a simple “chat” protocol that allowed me to type commands on the host machine (the Mac) that were executed on the target (a small 6809-based embedded computer). All this was possible because of the simplicity and transparency of Forth.
I enjoyed this process tremendously. I felt empowered. Programming in Forth was ecstatic, liberating. Programming in C had never been this much fun. I went back to the library to figure out why Forth was so much fun, and discovered ... the lambda calculus?!? It seemed to be at the heart of what was compelling about Forth, but I never figured it out. There is some kind of eldritch magic inherent in the interpretation of a bunch of number as commands, that still gives me chills, and Forth keeps the programmer close to that magic. Something like that.
Over the next ten years we collaborated on a series of projects. These were mostly handmade, idiosyncratic – and often musical – kinetic sculptures. Trimpin would collect modern industrial “junk” parts, and piece together a contraption; I would program it, always in Forth. I enjoyed aspects of this collaboration immensely. I worked in his studio – an appealing environment, much more Gepetto’s workshop than high-tech office. I was combining technology and art. I was able to try out new (for me) ideas. I wrote a multitasker. I wrote code to generate and consume MIDI. I wrote an aleatoric music generator.
The largest program I wrote – which sequenced a forty-foot-tall sculpture consisting of four octaves of marimbas, xylophones, and wooden milk bottles, and composed simple musical sequences on the fly – consumed 6k of object code. (This is a permanent installation in the lobby of the Science Museum of Minnesota, in Saint Paul.)
Forth impressed me. It liberated and empowered me. It was a small tool – one that I could understand deeply and entirely. I could make it entirely my own and I have. I have written several Forths – two for the PC (one in 486 assembler, one in C), and a bunch of “target” Forths: 6809, embedded 8086, ARM, RISC-V, MSP430.
I realize, looking back, that Forth is a convivial tool. I didn’t know that going in; I wasn’t sure, at the time, of the source of my sense of joyful liberation; but now I am sure that that is the reason.
Why not read about muforth, my target compiler for microcontrollers?