Preparing to get back onto things with #MOTR. As I was working on fixing up my interfaces, I realized that one thing that would really simplify (some aspects of) the code would be to add a few more type parameters to one module, and an additional wrapper class, along with a protocol.

Stand by to learn how this all messily blows up in my face.

Okay, so here's what I'm trying to change around:

I have a module with two concrete classes.

One is called InputAccumulator, and it has two attributes, a "Parametric" (don't worry about it) that produces an "Input[PathStr]" (don't worry about it), and a callable that combines two "PathStr"s together into one. It defines a method that takes an instance of the other class, and combines it with all of that to create an InputAccumulator with an updated "Parametric".

The other class is called ValueAdaptor, and it consists of a "Label[T_co]" (DON'T WORRY ABOUT IT), and a callable that converts a T_co to a "PathStr".

For some of the code I'm writing, it'd be convenient to have the ability to add a map step "after" the InputAccumulator's "Parametric" that doesn't interfere with the ability to stick more ValueAdaptors onto it.

I COULD try to solve this generally and have a bunch of new type variables added in, but I don't currently NEED to use arbitrary types for accumulation. So, if I try to restrain myself...

So far, I've just written the protocol and the new wrapper class, and switched the relevant code to use the new protocol.

Next up, I'm going to update the signature on the code that's going to need the new class, so I can update the callers.

I've updated some of the callers, but at this point, I'm kind of confused about the right way to handle part of it.

After thinking about this for a long time, I concluded that what I want to do is replace some of these calls with a new wrapper class in the flex module...

The code typechecks, but I'm getting an inscrutable error from actually running the tests.

Surprising nobody who is paying attention, it appears to be something in one of the gnarly functions that I wrote and then promptly forgot what it was supposed to do, or how.

Don't worry, I can solve the problems caused by my coding.

I just need to code more.

It pains me when I'm not sure what's CAUSING a problem, but I can see how to make it GO AWAY for now.

I'm going to have to revisit my confused comments later.

It appears to be working now, but I'm not sure I trust any of it until I manage to write proper tests.
And here's a badly-summarized rollup. https://mwchase.neocities.org/coding-2022-07-03.html
Coding 2022-07-03

"I just need to code more."

Three Dollar Quill