Shelf space for my stray ideas

Welcome!

Immutability: Proof-by-Set-Theory

Definitions Let a software component denote any function or module with a defined input domain. For a component, $f$, define its effective state space, $S_f$, as $$ \begin{equation} S_f = \mathrm{Input}_f \times \prod_{i \in \mathrm{deps}(f)} D_i. \end{equation} $$Here, $\mathrm{deps}(f)$ denotes the set of all mutable bindings $f$ can observe or mutate, and $D_i$ their value domains. For a referentially transparent component, $g$, $\mathrm{deps}(g) = \varnothing$ definitionally, so it follows that $$ \begin{equation} S_g = \mathrm{Input}_g. \end{equation} $$Next, let $\mathbf{P}$ denote the set of all software components, and $\mathbf{Q} \subset \mathbf{P}$ the subset of referentially transparent components. The containment follows dierctly: every referentially transparent component qualifies as a component, but not the converse (i.e. not every component qualifies as referentially transparent). ...

March 4, 2026 Â· 3 min

Things I Hate About MATLAB

Functions Organization One-function-per-file is, quite possibly, the only thing worse than header files for making code available. The overhead of making a new function (create a new file, name it, name the function identically, realize the file is in the wrong spot, move it, …) applies tremendous pressure against making small helper functions. Even if functions are closely related, you still have to open multiple files to engage with them. Touching every file on the path to build a cache is apt to cause slowdowns, especially where latency matters (network filesystems). This also makes for interesting times when you e.g. delete a file. Your choices are: MATLAB periodically rescan everything to refresh the cache (slow), or you trigger a cache update manually (annoying). Evaluation In their infinite wisdom, MathWorks has elected to treat a function’s name as equivalent to a function-evaluated-with-no-arguments. This is a parsing nightmare that makes it impossible to do any sort of meaningful term rewriting, and it results in the following…strange behavior: ...

November 7, 2025 Â· Edited March 7, 2026 Â· 3 min