Diary 2020-09-02

By Max Woerner Chase

We moved. This post is brought to you in part by, my phone, which had a seriously glitchy hotspot at first, but now it's fine, I think.

We're just barely unpacked right now, since I spent the whole day crashing until my wife crashed, at which point we switched, and then I got about as keyed up as I could, under the circumstances.

Anyway, I ended up thinking some more about that minimal literate programming code I wrote/rewrote, and what I want my style to be. It turns out one thing that bothers me is when the origin of variables is concealed by the weave. I rewrote a block of code as a function, moved the chunk to the top level, and replaced the original substitution with a function invocation. I much prefer the result, because it allows for more local reasoning.

Trying to apply this principle in other ways suggests some possible features. In particular, "run a chunk through a filter, such as lexically sorting and deduplication".

And I just realized that the practical effect of how I want to use that feature is to define a bunch of little modules in a file, specifically to tangle them into a single file. This has given me feature envy for Lua's require system all over again.

Although, if I set the file up to tangle into different files, then I wouldn't need the deduplication feature because I could use small modules.

It just occurred to me that I'm having all of these thoughts in the context of a sub-100-line script. It would behoove me to look into using this with one of the large codebases I have lying around.

Not happening right now, though. We are both exhausted.

Good night.