Coding 2025-10-15

Tags:
By Max Woerner Chase

I'm on a bit of a time crunch because I took a melatonin ten minutes ago, so let's see if I can get some thoughts down really quickly.

If you're converting an integer to a natural number base, you can either start generating digits from the least significant digit (modular arithmetic and division), or the most significant digit (divide it until it is less than the base, then determine the current digit, then multiply). For algebraic bases, the most-significant-digit method seems easier to implement, because you're usually not going to know which digit is the least significant. For complex bases, the least-significant-digit method seems easier to implement, because it seems that complex bases have fractal boundaries between digits, instead of, like, points. I think using least-significant-digit for real integer bases seems somewhat more elegant, just because it's all remainder-less division, rather than dividing to create a fraction, then multiplying it back out.

I've worked out a few bits of information to account for:

And I'm also trying to hammer out some ideas for dealing with stuff like "a bunch of these bases have the same digits, but the vector representations are completely different, but in some way related to the specific digits".

I don't know exactly when I'll have time to really thoroughly work on this, but at least I managed to rewrite my code to patch attrs class magic methods so they can be used as an enum base class, to use aspectlib instead of unittest.mock. Like, that's probably better, right?

Anyway, I'm loopy now, so let's wrap this up and get to bed.

Good night.