Building Languages to Solve Problems
When a problem is complex enough, the right move is to build a language for that problem. SICP's most powerful idea.
Posts influenced by Structure and Interpretation of Computer Programs, on abstraction, composition, and computation as a medium for expressing ideas
Structure and Interpretation of Computer Programs shaped how I think about programming more than any other book. It is not really about Scheme. It is about computation as a medium for expressing ideas: the closure property (combining things yields the same kind of thing), abstraction barriers, procedures as first-class citizens, and the insight that good abstractions come from understanding the algebraic structure of what you are computing.
These posts carry that influence. The R packages in particular (algebraic.dist, algebraic.mle, compositional.mle) are direct applications of the SICP closure property to statistical computing.
The book: Full text (free) | MIT lectures
A pattern matching and term rewriting library for Python. Define rewrite rules with intuitive DSL syntax and apply them to transform symbolic expressions.
Explore project →When a problem is complex enough, the right move is to build a language for that problem. SICP's most powerful idea.
27 image commands, one constraint: read JSON, write JSON. The closure property as a generative design principle.
Iterators reduce the NxM algorithm-container problem to N+M by interposing an abstraction layer, following Stepanov's generic programming approach.
An R package that treats probability distributions as algebraic objects. They compose through standard operations. The algebra preserves distributional structure.
A C++20 library for composing online statistical accumulators with numerically stable algorithms and algebraic composition.
A command-line implementation of relational algebra for JSONL data with full support for nested structures, schema inference, and composable pipelines.
An R package where optimization solvers are first-class functions that compose through chaining, racing, and restarts.
A Python library for symbolic computation with a readable DSL, pattern matching, and a security model that separates rules from computation.