Coding 2026-07-16
I've got some stray thoughts on the synthesis stuff (like, it turns out that both volume and root frequency affect the spectra of piano notes in qualitative ways, so I need to spend some pondering time on how the heck do I wire in this additive synthesis code in a useful way), but I'm right now trying to rebuild my fundamentals for working with code. My plan there is to design a simpler system, and work through building it the way that I think is right.
Here's the idea:
I'm interested in whether I can use the cut-up technique to deal with the blank page problem in writing. There are various apps and websites out there, but I thought it would be nice to roll my own. My goal is to work my way up to something like the following set of features:
- Input via text box or file chooser.
- Extract text streams from various file formats.
- Choose between different strategies for chunking text, with different controls for different strategies.
- Choose the number of samples to use in the output.
- Generate aggregate statistics to chunked text.
- Assign different weights to different sources?
I've put together a minimal set of features and defaults to get things rolling, so what I need to do now is focus on writing tests, and to get that working, I need to figure out what kind of data structures I'll be working with. A lot of them are going to be built in, like Sequence[str] and collections.Counter. The main new stuff is going to be attrs classes defining the chunking strategies; chunking should be done using a method, possibly __call__, that takes an iterator that yields "words" and returns an iterator that yields "chunks".
I think this is enough planning for me to get something together. Let's see if there are any really obvious things I've missed thus far.
...
Nothing seems wrong just yet. I don't want to push myself, so I'm going to try to wind down. I can hopefully get this somewhere interesting over the next few days.
Good night.