I've been having a lot of fun building my own programming language [1]. Getting to the point where you can write programs in your own language was surprisingly easy.
The language, Sapphire, is Ruby inspired, so the most interesting part is digging into the internals of the latter when I'm trying to figure out how something should work.
I was reading the fantastic Crafting Interpreters book, and been wondering what it would be like to design a language from scratch. I really enjoy using Sorbet with Ruby, so wanted to design a small language with Ruby's object model, and a gradual type system.
Despite not knowing much programming language theory, I was able to make a surprising amount of progress over a couple of weekends using Claude Code, including building a simple version manager for the language - https://github.com/sapphire-project/facet
> Four hundred and sixty books is not a scale problem. Knowing when to delete working code is not something an AI can decide for you.
This is such a key thing I remind myself when I build apps like this for myself. I have a similar app that has a page with 900-odd ratings, and another with 550 owned books. I decided that I won't bother with infinite scroll or complex search and filtering until my browser can no longer handle rendering that data. "Find in page" works well enough for me for now.
Sorbet now supports inline RBS signatures, which I find a lot more readable. If you use VS code with Ruby LSP, the syntax highlighting is pretty great for the signatures too.
linguistically speaking, no method means the name isn’t even known, which isn’t the case here. the name exists and is known (after a successful declaration). what’s missing is the actual definition. if we lean heavily into language, perhaps only undefined method will do.
While this was true for a long time, Ruby's built in irb and debug gems have improved dramatically in the past couple of years. To the point that I've switched to them from pry+byebug that I've been using for years.
One advantage of byebug is that if you do a sleep in something with theeads like capybara tests, the browser becomes functional again. Which is not the case with irb/debug. I couldn't find a way to reproduce this behavior in recent debuggers.
The language, Sapphire, is Ruby inspired, so the most interesting part is digging into the internals of the latter when I'm trying to figure out how something should work.
[1] https://github.com/sapphire-project/sapphire