RC Week 12: What's Next, and Speedrunning Crafting Interpreters
Saturday, December 10, 2022
And that's it. My batch at RC ended yesterday. I have so many thoughts and feelings from this time, but it's going to take time to coalesce them all. I'll write up my Return Statement1 in a week or two, but for now, here's what I was up to the last week!
Mostly, this last week was an attempt to speedrun Crafting Interpreters. This book has been on my shelf for a while, and I got started on it after I decided to stop learning Idris. A friend from this batch has done really cool work going through Crafting Interpreters, so I wanted to see how much I could get through while we can still easily pair program on it.
Turns out, a lot! In the last 1.5 weeks or so, I read through the first 11 chapters and implemented everything from the first 10. All that's left is doing chapter 11 (which should fix a hole in the semantics and improve performance) and then read two chapters focused on classes! It'll be really cool to see how object-oriented programming can be implemented at the language level.
Overall this book has been a great experience so far. So far the benefits have been:
- Greater mechanical sympathy for parsers. It's easier to understand errors coming out of a parser having written a basic one! Now when parsers leak some details out in errors, it's less confusing. This alone is a great reason to read the book.
- Got over my fear of parsers/interpreters. Before this, parsing was very intimidating. I wrote a little parser for my chess projects to load in PGN files, but that was hard and confusing and didn't work well. Now that I've seen a reasonably-structured parser and written it myself, I'm a lot more confident that I can and will write more parsers in the future! I'm currently planning on implementing a query language for my chess database.
- Gaining a better appreciation for the nice things we have. After writing this much of a language, honestly, I'm extremely impressed and grateful that other languages work well at all. This stuff is hard.
I'm going to keep running through Crafting Interpreters over the next few weeks, but with less intensity since I'm going back to work on Monday. I think part 2 will be just as fruitful as part 1, since I'll get to see how a (bytecode) compiler works! Maybe my chess database query language will compile down to bytecode for the query engine 😎.
This week also contained a one-day build of a useful tool for my own use. Since I wrote about that earlier this week, I won't say much here except that I think the reports of Rust being bad for prototyping are are greatly exaggerated.
This week has also led to me leaning into doing type-driven development with Rust, and leveraging tooling to generate a lot more of my code for me. (Not AI generation, but automatic generation of some boilerplate.) I'll write more about that soon, too.
The rest of this week was coffee chats with folks and reflections on our batches and what is next for us. I'm really excited to see what all my new friends end up doing next. And I hope they stay in touch and stay active on Zulip.
As for me, I spent some time this week making sure that my life is structured in a way that means I can keep doing some of the most rewarding things from RC. Specifically, that means I've let go of some projects (Advent of Code, learning theorem provers with friends) to be able to focus on the things that are most important to me. Here's what I'm going to keep on with:
- Consistent writing. This has been tremendously rewarding, and I'm going to keep up with it post-batch as well as I can. I've setup a dedicated chunk of writing focus time each week, with some folks joining in. I'm optimistic.
- Crafting Interpreters and other technical books. This book is such a joy, and it's inspirational for me. This is the sort of writing I aspire to eventually. I'm going to keep up with it and then work some other technical books, like CPython Internals (we have a reading group starting in January!).
- The chess database. This project has taught me so much, and is useful to boot. I'm going to keep going with it as a slow burn so that it's sustainable and keeps going.
- Coffee chats. Everyone at RC has been so great, so I'm going to keep in touch with folks. A lower intensity and lower frequency, but still there.
In the next two weeks, I should have a Return Statement posted. I have a few other blog posts in the works, too. If you made it this far, thanks for reading!
Return Statements are a tradition where Recursers write a post about what they did there and some reflections. I'm waiting a few weeks for everything to gel before writing mine, because right now I'm a maelstrom of feelings.