The following is the first in a series of articles I hope to write as a gentle introduction to Edward Kmett’s excellent lens library. Control.Lens provides a composable way to access and modify sub-parts of data structures (where by modify I mean: return a new copy with that part changed). In this introduction I won’t be talking about the [...]
I have found that arrows in Haskell are far simpler than they might appear based on the literature. They are simply abstractions of functions. To see how this is practically useful, consider that you have a bunch of functions you want to compose, where some of them are pure and some are monadic. For example, f :: a -> [...]
To show just how significant parallelized algorithms can be, today I discovered pxz, a parallelized version of the xz compression utility, which I use constantly. The proof is in the numbers: [...]
Today I finally succeeded at getting a fully local version of Hoogle running on my machine, with filesystem links for all packages that I have installed, and remote links for those I don’t. Since this was definitely a non-trivial exercise, I wanted to capture the knowledge here for anyone else trying to do the same. First, let me mention that [...]
The fix combinator is a higher order function that can turn any function into a potentially recursive one. It can be a bit difficult to wrap your head around, since neither the definition nor the documentation is very clear on what you might use it for. However, I’ve found one handy use case: creating recursive lambdas. Say you have [...]
In an effort to better understand parsing in the Haskell world, I decided to port a hand-crafted parser I’d written for Subversion dump files in C++11 into a Haskell version. It’s not that the old parser didn’t work well, but I wanted to see what Haskell could make of the problem with its laziness and combinator-oriented parsing libraries. If you [...]