Haskell’s expressive type system means that type signatures can carry a lot of information. Haskell’s polymorphism means that you sometime write a function that works across an enormous range of types, and are often left wondering “what do I actually call my variables?”. It is often the case that there’s nothing to say beyond “this variable is a...
I have travelled a lot this year, and after yet another trip where I lugged too many things around, I’ve been thinking about ways to cut back. The classic guide for this is onebag.com, which covers a very interesting mix of techniques and some carefully-chosen lightweight gear that will take you to the farthest corners of the map. Perma-nomad...
I’ve been meaning to write this one for a while, but the announcement of the Ladybird Browser Initiative makes now a particularly good time. TL;DR: Chrome is eating the web. I have wanted to help fund a serious alternative browser for quite some time, and while Firefox remains the largest potential alternative, Mozilla has never let me. Since I...
It’s really easy to misuse lazy I/O (e.g., hGetContents) in nontrivial Haskell programs. You can accidentally close a Handle before the computation which reads from it has been forced, and it’s hard to predict exactly when data will be produced or consumed by IO actions. Streaming libraries in Haskell avoid these problems by explicitly...
I have a nascent side project which is intended to participate in a bootstrap chain. This means it shouldn’t depend on too many things, that the transitive closure of its build dependencies must also be small, and at no point in the process should any build depend on an opaque binary blob. Choices on the language side are pretty constrained. Zig...
Last month, Brendan Hay and I released the 2.0 version of Amazonka, the de facto but unofficial AWS SDK for Haskell. Before that, Amazonka had seen intermittent commits and some pretty major improvements, but hadn’t managed an actual release in about four years. Because of the lack of visible progress, more serious industrial users maintained...
I was lucky enough to grow up through the early 2000’s, during the golden age of Half-Life mods. Industry classics like Counter-Strike (CS) had just been invented, every month brought new mods to try, and files were too big to download on a dial-up connection so you’d leech them off a server at a big local LAN party. One of my personal favourites...
The unfortunate meme phrase “a monad is just a monoid in the category of endofunctors, what’s the problem?” comes from two sources: The fact and most of the phrasing comes from Mac Lane’s Categories for the Working Mathematician, but “What’s the problem?” is a cheeky addition from a funny 2009 blog post: A Brief, Incomplete, and Mostly Wrong...
I used to teach Haskell to first-year university students, and many of them struggled to write their first recursive functions. It really isn’t obvious why you can solve a problem using the function you’re in the process of defining, and many students have difficulty making that leap. There is no shame in this. I remember taking a long time to...
While writing code to rewrite some Dhall syntax trees, I noticed a cool connection between the core uniplate operation and optics. This will be old news to advanced lens users, but I think it’s worth pointing out. The uniplate package’s original uniplate :: Uniplate a => a -> ([a], [a] -> a) is an early attempt at a “traversal” optic, properly...