Diary 2019-03-11

By Max Woerner Chase

Working my way through the Amethyst tutorial, and it's mostly fine, but it seems a little weird to me that I've now tried out two unrelated game dev tutorials that want you to hand-apply diffs that are, textually, not diffs.

Like, maybe that's a resolution I should make to myself if I ever make a programming tutorial: whenever I tell people to change a file on their computer, provide a complete working patch they could apply via command-line.

Anyway, other stuff: statted up some enemies for an attempt at an Anima Prime tutorial, and played a bunch of Minecraft. (I don't know if I was supposed to notice that alloying is available as soon as basic Tinker's stuff is unlocked, but it is and I did.)

I was thinking about Rust and applying ideas from Rust to Python, and I just realized that I don't know how Class Namespaces handles variable annotations. My guess is "poorly", but now I kind of want to dust it off and see. For background, Class Namespaces is a Python 3 library I wrote, inspired by a blog post that I assume was about namespaces in Python 2 (based on the date of publication). It does really fiddly stuff with metaclasses and custom dict subclasses to let you define nested namespaces within a class using context managers. Some parts of it are over-complicated, but which specific parts those are, in my opinion, may surprise you! I might try and revisit it, but while I'm thinking of Python libraries, I'll probably also go for my Structured Data library, a library that gives you completely different reasons to put a bunch of weird junk in your class definitions.

Thinking about that makes me think of trying again to write a mypy plugin for Structured Data, and how I'd version such a thing... See, if I add a feature to the base library, that's a minor change, but I think it'd be a breaking change to the plugin, because it needs to be updated, but the updated version would have false negatives if it's used against code written for an earlier version. Does this make any sense? I don't know. It's late.

I think I'd like to come up with a bit more structure for these posts, but that's not happening at this exact moment. Good night.