Last November someone I follow on Mastodon posted about taking a week-long Rust programming course that used the Crafting Interpreters book as the project. At the I wished I could join in the fun.
A couple weeks ago she posted that the course was being offered again, for the last time. After thinking about it for a couple days I decided to sign up. It’s a five day course, Monday-Friday, from 9:30 am - 5:30 pm. The bulk of the time is spent crafting a rusty interpreter. The day starts with an overview of the next challenge in the book, and some ideas on how to best use Rust to solve them. Periodically through the day, there are more “lectures”.
I have definitely been immersed. I’m typically up by 6 or 6:30 am, so by the time the course day ends at 5:30 pm, I’ve put in a good 10 hours of work. I end up spending a couple more hours in the evening. I haven’t done this much focused programming in a long time.
Yesterday I spent the day creating the Abstract Syntax Tree (AST) portion of the project. Then in the evening I re-did most of it. My programming roots are procedural. The first dozen or so years of my career were spent writing COBOL. I’ve worked in Forte TOOL (a defunct 4Gl), and a smattering of scripting languages.
Where I am lacking is knowing about the helpers and syntactic sugar Rust provides. Wrapping my head around traits, or enums has taken some effort. My brute-force struct-for-every-statement approach worked, but it had far too much boilerplate code. Forcing my self to make use of enums and iterators made the code far more compact, and ultimately better.
That I have been programming for more then 45 years and I am still learning new tricks, new languages, and new ways to do things, is amazing. I was a mediocre student all through school. If you had told me back then that I would delight in learning new things, even esoteric things that I won’t ever use, for the joy of it, I wouldn’t have believed you.
I have book from the 1990s called “Thinking Body, Dancing Mind” (I think that’s the title). Being able to immerse myself in a week-long course, writing a programming language interpreter, in Rust, for fun is most certainly a case of dancing mind.