Semantics of semantics in Python with tracing code
Writing software that actually behaves like pure math is harder than it looks. Usually, state changes, loops, and memory quirks get in the way, turning elegant logic into a tangled mess of side effects. A modern tracing library fixes this by acting as a silent observer. It watches your program execute, sweeps away all the temporary memory junk the computer needed to do the work, and leaves behind a perfect, permanent map of how your data actually flows. By completely separating how the code runs from what the math is, you get a flawless, auditable blueprint of your system. It gives you the exact precision needed to stop fighting your language's quirks and start engineering truly smooth, reliable software. And so last year I wrote a first draft of a Python tracing library (see original https://github.com/equational/hltpy ). This code works, but fails to be elegantly re-entrent: it is tricky to trace interpretations of traces. So today, pressured by a needy use case, I am rewriting t...