Weeknotes 2022 W51: Xmas avocado

December 19​–​25, 2022
800 words

The end is near! Of the year, that is. The office is closed, and I’ve already settled into a relaxed rhythm. I’ve got quite some time off (back in the office on January 4th).

Merry Xmas, to those who celebrate!


I ate my first avocado of the year. It was deliciously ripe. I would like to eat avocados more often.


Gremlins time! For reasons that are not clear to me at all, I can no longer empty the macOS trash. It’s stuck:

I let it run overnight, and it was still attempting to empty the trash.

Luckily, rm -rf ~/.Trash/* still works. That’s… good, I guess?


Dave Copeland tooted something I relate to a lot:

This is what “digital natives” know: not how to use computers but how to navigate poorly designed and poorly implemented systems on every level from appliances to cars to phones.


I’ve been doing some more work on Gex, the programming language I’m creating for fun.

I’ve been modifying the semantic analysis to use proper symbol management. This is a large change with a big impact.

I’m still struggling to figure out the overarching architecture of the compiler. Most books explain the individual components of a compiler, but then fail to explain how those components work together. I’ve been browsing through some compiler codebases and their associated documentation, which is illuminating. The overview of the rustc compiler was the most helpful.

I’v also pretty much given up on Crystal as an implementation language. Crystal is too buggy. I’ve been struggling with one error in particular: an error that says that one type is expected, but the exact same type is given. Adding explicit types everywhere does not solve the problem, nor does type-casting. I’ve stumbled on this issue a few times now, and had to re-structure the affected part of the codebase to make it work. (I unfortunately have also failed at creating a slimmed-down test case to report it on the Crystal issue tracker.)

So this is why I now have a half-baked lexer, parser, and type checker written in Go instead. Writing Go has been a breath of fresh air. The Go tooling and integration into VS Code works just so well. I really missed the refactoring tools and real-time IDE feedback. (I considered Rust for a moment, but I think I need a language whose learning curve isn’t super steep.)

The Go version doesn’t do much yet, but it does have nice error reporting in place already:

% ./gex examples/functions.gex
Parsing failed!

(input):4:15: Expected ‘)’, but got identifier
fn oneParam(a plonk) {
              ^^^^^

(input):10:18: Expected identifier, but got ‘!’
fn alsoDoNothing(!??!?) {
                 ^

(input):17:18: Expected ‘{’, but got identifier
fn lastFunction()abc {
                 ^^^

Good error reporting is vital.


I’ve got two short stories just… laying around. I gave myself a deadline of finishing them earlier this week, which I missed. Both stories are too difficult to continue writing at the moment, as they both deal with the subject of death, and after Chris’ passing (see Week­notes 2022 W49: Chris) I just can’t bring to even look at them anymore.

I considered rewriting them to change the subject, but I’ve not (yet) managed to come up with alternate versions that are any good.


I’ve using Stage Manager on macOS Ventura as of this week. I dismissed Stage Manager as a gimmick earlier, but now I’m rather liking it.

It’s not free from bugs, however. Firefox does not work well with it, as it ignores Stage Manager entirely. Maybe the way it manages windows is nonstandard? I’ve switched back to Safari for now, which is also just fine.


Entertainment:


Links:

Links, less serious:

You can reply to this weeknotes entry by email. I’d love to hear your thoughts!
If you like what I write, stick your email address below and subscribe. I send out my weeknotes every Sunday morning. Alternatively, subscribe to the web feed.