tl;dr The scope of backtracking try should be minimized, usually by placing it inside the definition of a parser. Have you ever written a Parsec parser and gotten a really uninformative error message? "test.txt" (line 15, column 7): unexpected 'A' expecting end of input The line and the column are randomly somewhere in your document, […]
So you may have heard about this popular new programming language called Haskell. What's Haskell? Haskell is a non-dependently typed programming language, sporting general recursion, type inference and built-in side-effects. It is true that dependent types are considered an essential component of modern, expressive type systems. However, giving up dependence can result in certain benefits […]
David Darais asked me to make this public service announcement: If you're using lift, you're doing it wrong. This request was prompted by several talks at ICFP about alternatives to monad transformers in Haskell, which all began their talk with the motivation, "Everyone hates lifting their operations up the monad stack; therefore, we need another […]
Last week, I made my very first submission to ICFP! The topic? An old flame of mine: how to bound space usage of Haskell programs. We describe the first iteration of a resource limits system for Haskell, taking advantage of the key observation that resource limits share semantics and implementation strategy with profiling. We pay […]
You can. Imagine a version of Haskell where every constructor was strict, e.g. every field had a ! prefix. The semantics of this language are well defined; and in fact, the fine folks at CMU have known about this for some time: Up to this point we have frequently encountered arbitrary choices in the dynamics […]
I'm taking a Data Visualization course this fall, and one of our assignments was to create an interactive visualization. So I thought about the problem for a little bit, and realized, “Hey, wouldn’t it be nice if we had a version of hp2ps that was both interactive and accessible from your browser?” (hp2any fulfills this […]
This post is the spiritual predecessor to Flipping Burgers in coBurger King. What does it mean for something to be dual? A category theorist would say, “It’s the same thing, but with all the arrows flipped around.” This answer seems frustratingly vague, but actually it’s quite precise. The only thing missing is knowing what arrows […]
This post is adapted from the talk which Deian Stefan gave for Hails at OSDI 2012. It is a truth universally acknowledged that any website (e.g. Facebook) is in want of a web platform (e.g. the Facebook API). Web platforms are awesome, because they allow third-party developers to build apps which operate on our personal […]
Safe Haskell is a new language pragma for GHC which allows you to run untrusted code on top of a trusted code base. There are some common misconceptions about how Safe Haskell works in practice. In this post, I’d like to help correct some of these misunderstandings. [system 'rm -Rf /' :: IO ExitCode] is […]
After a long delay and a lot of editing, Issue 20 of The Monad Reader is finally out. Check it out!