Hi, I’m Rohit. I write occasionally about software engineering — distributed systems, reliability, and whatever I’ve been debugging lately.
Recent posts
- Data Types à la Carte, Part 4: Free Monads, and the Library You Already Use The same trick applied to monads gives programs whose types say which effects they use. Then you look inside cats and find the whole paper sitting there, under different names.
- Data Types à la Carte, Part 3: Adding Cases Without Touching Code Multiplication, a pretty-printer, and a rewrite rule — each added to the language without editing a single existing line. The Expression Problem, actually solved.
- Data Types à la Carte, Part 2: Modular Algebras, and Where Scala Gets Harder Folding over a signature assembled from pieces needs an interpreter assembled from pieces. Haskell does it with one recursive instance. Scala's untagged coproduct starts charging rent.
- Data Types à la Carte, Part 1: The Expression Problem and Fixed Points Adding a constructor to a Haskell data type breaks every function over it. The fix is to stop fixing the constructors — and in Scala 3, half of the resulting machinery turns out to be unnecessary.
- The Countdown Problem, Part 3: Nineteen Twentieths of the Search Space Was Duplicates Arithmetic isn't a free algebra. Strengthening one predicate cuts the search space by 95% — and, because of how the proofs were structured, not a single one of them needs redoing.