FP Complete

Exceptions Best Practices in Haskell

The content below is still correct, but has been absorbed into the more comprehensive safe exception handling tutorial document instead. I recommend reading that, which provides more information and more up-to-date library references. Over the years, I’ve written a number of different documents, tutorials, comments, and libraries on how to do proper exception handling in […]

Static compilation with Stack

In our last blog post we showed you the new docker init executable pid1. What if we wanted to use our shiny new pid1 binary on a CentOS Docker image but we compiled it on Ubuntu? The answer is that it wouldn’t likely work. All Linux flavors package things up a little differently and with […]

Updated Hackage mirroring

As we’ve discussed on this blog before, FP Complete has been running a Hackage mirror for quite a few years now. In addition to a straight S3-based mirror of raw Hackage content, we’ve also been running some Git repos providing the same content in an arguably more accessible format (all-cabal-files, all-cabal-hashes, and all-cabal-metadata). In the […]

Practical Haskell: Simple File Mirror (Part 2)

This is part 2 of a three part series. If you haven’t seen it already, I’d recommend starting with the first part, which covers communication protocols and streaming of data. This second part will cover network communication and some basic concurrency in Haskell. Simple HTTP client We saw previously how to send and receive binary […]

Working with data in Haskell

Working with data in Haskell In data mining or general exploration, it’s common to need to easily access data efficiently and without ceremony. Typically, a programming language will be designed for this case specifically, like R, or a library will be written for it, like Python with the pandas library. Implementing this in Haskell, we […]

Practical Haskell: Simple File Mirror (Part 1)

The other day I threw together a quick program to solve an annoyance some people on our team were expressing. We sometimes do our development on remote machines, but would still like to use local file editors. There are plenty of solutions for this (SSHFS, inotify+rsync), but none of us ever found a prebaked solution […]

Announce: safe-exceptions, for async exception safety

This blog post is an initial announcement of a new package, safe-exceptions (and Github repo). This is a follow up to a number of comments I made in last week’s blog post. To quote the README: Safe, consistent, and easy exception handling Runtime exceptions – as exposed in base by the Control.Exception module – have […]

async exceptions, STM, and deadlocks

For a change of pace, I wanted to cover a simple topic: asynchronous exceptions, and how they interact with Software Transactional Memory and MVars, as well as the GHC runtime system’s deadlock detection. As fate would have it, the topics in question occurred twice in the past month, once in a bug report against the […]

weigh: Measuring allocations in Haskell

Work motivation While working for various clients that needed fast binary serialization, we had discovered that the binary and cereal packages are both inefficient and so we created the store package. In the high-frequency trading sector, we had to decode and encode a binary protocol into Haskell data structures for analysis. During this process it […]

Moving Stackage Nightly to GHC 8.0

As Dan Burton recently announced, the Stackage Curators team has decided to cut an LTS 6 release based on GHC 7.10.3, and to switch Stackage Nightly over to GHC 8.0. I’ve pushed the relevant changes into the necessary repos, and now the most recent Stackage Nightly release is based on GHC 8.0. A GHC upgrade […]