Coding 2023-12-29

By Max Woerner Chase

Okay. Okay. Okay.

I've finished up the current round of code reorganization, and this has successfully excised that one branch I didn't want to write tests for. Good.

Unfortunately, this has left the code in a state of... chaos would be a strong word. Basically, I've been isolating the code into logical units based on how different pieces of data relate to each other, and I've basically ended up with more of these logical units than I have concepts.

:)

Believe it. One of the new classes is literally just named Foo.

So, obviously, I would like to address that. But I've got plenty of experience from while I was doing the recent rewrites, of trying to do just that, and bouncing off. Now, hopefully this will be easier following the rewrites, but I think for sure I need to take a break and look at this with fresh eyes.

I've also got some out-there ideas that might not work, which could simplify things a little, potentially. (Initial simplified tests indicate that it could help. The idea is to try to cut down on the absurd proliferation of type variables, by, um, creating more type variables.) Here's the playground code I wrote so I hopefully remember what I was thinking of doing:

from typing import Any, Generic, TypeVar

L = TypeVar("L", bound=list[Any])
T = TypeVar("T")

class Hello(Generic[L]):

    def fst(self: Hello[list[T]]) -> T:
        raise NotImplementedError

Anyway. I can try to get into other coding projects, or I can get back to some writing that I kind of left myself hanging on. We'll see.

For now, though, it's not worth trying to do any more tonight.

Good night.