The effort spent in mastering some weird ass abstraction out of some “I’ll never...

@mnl@hachyderm.io

The effort spent in mastering some weird ass abstraction out of some “I’ll never use this in real life” book is worth it 100-fold, especially in this age of #LLMs .

Recognizing abstractions allows you to turn complex constructions and notate them concisely, yet so that they are formally sound.

leveraging abstractions allows you to turn something that would take 1000s of lines to implement and many more at each iteration, to build something that is increasingly formally unsound into a couple of composable APIs. Programming languages are reasonably powerful at turning what ends up being a long list of cpu instructions into something structurally much more powerful. SQL grounded in relational algebra allows one to express data queries concisely (and… more or less composably).

This is however far behind where we need to be with the size of the systems we have now. The monad construction is still reserved to rare people when it really should be at the core of pretty much every “programming in the small”. And even the understanding of monads is the “watered down” (or diluted up? I find the “monoid in the category of endofunctors” approach simpler to wield and more generative.

So why do I ramble about this in the age of #llms / #llm : being able to recognize a monad allows you to turn “do this thjng, then that thing, then another thing” not into a smorgasbord of constructs and programming verbiage, but into “compose(thisThing, thatThing, anotherThing)”, which not only any small llm can do in a couple 1000 tokens, but even the definitions of compose and *Thing are very straightforward. Added benefit: they are much easier to validate, verify, prove statements about, log, mock, all attributes that improve not just quality but significantly reduce inference effort and attention window stress.

1/