Weeknotes 149
Dopamine drip
-
Another week, another note. That’s how weeknotes work. ✅
-
Only two streams again, a quantity which is starting to feel less like “shamefully few” and more like “a normal, sustainable amount”.
As anticipated, I pulled apart the interpreter to extract an abstract syntax parser so that evaluation doesn’t have to waste effort messing about with concrete syntax.
The job’s not finished even for supported instructions because I haven’t done the work to build up an identifier context and use it to resolve names during parsing rather than looking them up dynamically during execution. But that’s okay for now, because separating & defunctionalising the evaluation code has given me the main benefit I wanted: the evaluator can operate on a nice flat sequence of self-contained instructions and doesn’t need to worry about their nested structure or immediate arguments.
All of this is what I should have done from the start, and it’s what I would have done if I’d followed the language specification instead of making the bloody-minded decision to slog through the automated tests with as little effort & foresight as possible. It’s still nice that I’m able to refactor towards a more sensible design at the point where I actually need it rather than having to front-load all that busywork before I could even evaluate an integer; I don’t think I’d have made it this far without the dopamine drip of red tests turning green.
-
Ruby 3.2.0-preview3 came out and that’s exciting because it’s the first release to contain a couple of features I’ve been waiting for (
Data.define
andMatchData#
) in addition to the preview1 innovation of making find patterns official.deconstruct_ keys I’m keen to take advantage of those features in my WebAssembly interpreter, so I’ll probably just stick
3.2.0
in my.ruby-version
file and pretend it’s already a final release and I’m living in the future. Then I can delete myMatchData
refinement and start usingData.define
instead ofStruct.new
for my floating-point numbers and AST nodes. I suspect I also have a use forInteger#ceildiv
and maybe forString#bytesplice
.I’m a little surprised to discover I care about an upcoming language release to this extent — a new version comes out every year and doesn’t usually change anything for me in the short term — but I suppose that recent-ish work and hobbies have made me more engaged with Ruby itself, versus more generally “web applications”, “software engineering”, “running teams” etc.
-
I really wanted to like The Peripheral, but I can‘t, because it’s bad. I need to stop watching shows like this one (and, erm, Westworld) which rely on keeping the audience in the dark because I find them so tiring and boring. It skates dangerously close to incoherence and the performances & writing don’t do anything to rescue it.
Good London bits.
-
Meanwhile, in opposites world: I wasn’t expecting to like Andor, but hey, it’s excellent! It took its time getting started but I found it easily compelling enough to hold my interest throughout the slow burn. Looks great, sounds great; performances are authentic; story is exciting and thematically relevant; I understand and care about what’s happening.
I’ve already seen lots of people say what I was thinking, i.e. this is what they should be doing with the Star Wars universe instead of endlessly reheating lightsabers and Skywalkers, so there’s no point in me saying it too.
Good London bits.
-
I’ve lost a lot of Twitter followers in the last month. I can’t tell whether that’s because of people leaving Twitter or rightly getting sick of my boring livestreams & weeknotes. Why not both?
-
Speaking of which, I broke my Mastodon stalemate by setting up my own instance, so I’m @tom@tomstu.art now.
I have to confess I’m not hugely invested in decentralisation, “the fediverse” etc; I’m just a lazy, selfish person who wants to continue using some vaguely Twitter-like service without having to care too much about the details. But it does now seem more than 50% likely that Twitter itself is going to simply blink out of existence because nobody knows the AWS root user password or whatever, so I may as well try to warm up an alternative before it’s too late to tell anyone I’ve done that.
I’ve decided to keep @tom@ruby.social rather than migrate it, because in principle I like the idea of being able to participate in the Ruby community there, or at least redirect my boring livestreams to that account so that people don’t have to unfollow my other account to escape them (and I suppose vice versa for the boring weeknotes).
In practice I don’t feel particularly confident that this is going to work well, and I’m already confused about whom to follow from where, because my “Ruby person” and “real-life acquaintance” sets are a long way from being disjoint. So for the moment I’m semi-randomly smashing “follow” when I see names I recognise, sometimes without any real sense of which instance I’m on — the design of the Mastodon iOS app makes this extra mysterious — and I assume it’ll all sort itself out eventually, like gliders, blinkers and beehives slowly emerging from the roiling chaos of a random initial state. Probably.
-
I would describe the Mastodon installation experience as excruciating.