Coding 2023-12-14

Tags:
By Max Woerner Chase

Oof, partied too hard today, in a way that was imperceptible at the time. Let's see how much I'm up for.

I dusted off some of my old hobby code today, copying it from a Jupyter notebook into marimo. Along the way, I made some changes. See, the original version had a bunch of type-level stuff going on, and I ended up replacing what I was trying to do there with runtime validation. This was mostly fine in my opinion, but I think I swung the pendulum slightly too far, and I need to find some way to recover the marker-y nonsense I had going on, to a limited extent.

Anyway, the code itself. I can't explain why, but I wanted to have a minimal toolkit for expressing arbitrary decks of cards. Currently, I've got code that can generate a normal 52-card deck plus any number of jokers, and both Japanese and Korean hanafuda/hwatu decks. My assumption is that that's enough flexibility to handle most traditional decks; I'm not intending to handle anything that has a regular release schedule, for example.

So, what's left to do before I ponder trying to library-ize this code?

Anyway, I'll think about that, and other things, and try to make it to the weekend.

Good night.