RSSAmplifier

Blog

Johan Tibell

Haskell and other things that interest me

blog.johantibell.comRSS feed ↗25 posts

Latest posts

The design of the Strict Haskell pragma

Since the Strict Haskell pragma just landed in HEAD , thanks to the hard work of my GSoC student Adam Sandberg Ericsson, I thought I'd share my thoughts behind the design. First, is this making Haskell a strict language? No . This pragma lets you reverse the default on a per-module basis. Since the pragma will never be used in every module (most notably those in base) this doesn't make Haskell a…

Video of my Haskell eXchange 2015 talk

Thanks to the fast people at Skill Matter, my Haskell eXchange 2015 talk is now available online ( slides ).

Video of my performance optimization talk at ZuriHac 2015

This blog post is a couple of months late, but I thought I should mention that a talk on performance optimization I gave a while ago at ZuriHac 2015 is now on YouTube ( slides ). Unfortunately the first minutes got cut off and the sound quality isn't the best, but hopefully it's something. P.S. I will be giving a rewritten and expanded version of this talk at Haskell eXchange 2015.

Google Summer of Code 2015 Project Ideas

Every year I try to list some Google Summer of Code projects that I think are worthwhile. Here's this year's list. The focus is, as usual, on infrastructure projects. I think they are the most likely to succeed and give the community the highest long-term value. Generalize cabal to work with collections of packages instead of having a single package focus Today most cabal commands assume that…

Ekg 0.4 Released

It's been over two years since the last major release of ekg. Ever since the first release I knew that there were a number of features I wanted to have in ekg that I didn't implement back then. This release adds most of them. Integration with other monitoring systems When I first wrote ekg I knew it only solved half of the program monitoring problem. Good monitoring requires two things a way to…

Announcing cabal 1.20

On behalf of all cabal contributors, I'm proud to announce cabal 1.20. This is quite a big release, with 404 commits since 1.18. To install: cabal update cabal install Cabal-1.20.0.0 cabal-install-1.20.0.0 New features Since there are 404 commits since cabal 1.18, there are too many changes to give all of them a just treatment here. I've cherry-picked some that I thought you would find…

Google Summer of Code Projects

Every year I put together a list of Google Summer of Code projects I'd like see students work on. Here's my list for this year. As normal the focus is on existing infrastructure. I believe, and I think our experience in the past bears out, that such projects are more successful. Improved Hackage login The Hackage login/user system could use several improvements. From a security perspective, we…

More haskell.org GSoC ideas

Here are another two haskell.org GSoC ideas. Faster ghc -c building The main obstacle to implementing completely parallel builds in Cabal is that calling ghc --make on a bunch of modules is much faster than calling ghc -c on each module. Today, Cabal builds modules by passing them to ghc --make , but we'd like to create the module dependency graph ourselves and then call ghc -c on each module, in…

Haskell.org GSoC ideas

This year's Google Summer of Code is upon us. Every year I try to come up with a list of projects that I'd like see done. Here's this year's list, in no particular order: Better formatting support for Haddock While adequate for basic API docs, Haddock leaves something to be desired when you want to write more than a paragraph or two. For example, you can't use bold text for empahsis or have links…

Streaming and incremental CSV parsing using cassava

Today I released the next major version of cassava , my CSV parsing and encoding library. New in this version is streaming and incremental parsing, exposed through Data.Csv.Streaming and Data.Csv.Incremental respectively. Both approaches allow for O(1)-space parsing and more flexible error handling. The latter also allows for interleaving parsing and I/O. The API now exposes three ways to parse…

You can soon play in the cabal sandbox

I just merged the last large set of patches, written by Mikhail Glushenkov, that are needed to implement the new cabal sandbox feature (a generalization of cabal-dev, cab, etc) into the cabal master branch. This work will alleviate the dependency problems that crop up too often when working with cabal. It doesn't solve all problems, but it should prevent package breakages due to reinstalls (just…

A new fast and easy to use CSV library

I'm proud to present the cassava library, an efficient, easy to use CSV library for Haskell. The library is designed in the style of aeson , Bryan O'Sullivan's excellent JSON library. The library implements RFC 4180 with a few extensions, such as Unicode support. It is also fast. I compared it to the Python csv module, which is written in C , and cassava outperformed it in all my benchmarks . I've…

Haskell Implementors' Workshop, Call for Talks

Gregory Collins' and I are organizing this year's Haskell Implementors' Workshop in Copenhagen. If you like to give a talk, see the instructions in the Call-for-Talks email . The acceptable range of topics is quite wide. If you've been hacking on some cool project lately, please do apply.

New major release of the containers package

I'm proud to announce a new major release of the containers package . There has been a whopping 160 commits since the last release. The major improvements are: a clearer distinction between value-lazy and value-strict containers, performance improvements across the board, a big internal clean-up, and new functions for e.g. merging, updating, and searching containers. The first item is perhaps the…

The ekg package can now export string labels

I'm happy to announce a new minor release of the ekg package . The ekg package lets you monitor running executables using your web browser, or any monitoring tool that can speak HTTP. New in this release is support for exporting labels. A label is an arbitrary text string, set dynamically by the running executable. Labels are more flexible than counters and gauges (which can only represent…

cabal bench

With the release of cabal-install 0.14, you can use Cabal to build and run your benchmarks. No more Makefiles that try to replicate things Cabal already does. Just like cabal test allows us to automatically find and run tests using e.g. a buildbot, this feature should let us track performance of libraries over time and catch performance regressions earlier. There's some future work needed to make…

Time to apply for Google Summer of Code

The student application deadline for this year's Google Summer of Code is this Friday, April 6th, at 19:00 UTC. Have a look at our ideas page and write an application for e.g. your top three picks. Applying for more than one project increases your chance to get accepted in the case where several students apply for the same project.

The Cabal of my dreams

This post outlines changes I think we should make to the Cabal build infrastructure, in order for it to stay relevant to Haskell developers. This post is intentionally high level and uses strong statements; I'm trying to establish a direction to go in, not discuss implementation details. I have a huge amount of respect and appreciation for the Cabal developers; this post is in no way intended as a…

Improvements to HashMap and HashSet creation

I mentioned in my last post that I'd like to improve the performance of fromList for all types exported by the unordered-containers package. Twan van Laarhoven beat me to it and his changes, together with some additional optimizations by me, made for quite a nice speed-up: ( fromListWith should also see similar improvements.) The improvements are in the unordered-containers-0.2.0.1 release. I also…

Announcing unordered-containers 0.2

I'm proud to announce a new major release of the unordered-containers package. This release is the result of over a year's work on completely replacing the underlying data structure used in the implementation of HashMap and HashSet . The old Patricia trie based implementation has been replaced by a new implementation based on hash array mapped tries (HAMT.) A HAMT is a trie implemented as a n-ary…

Designing a serialization API

Haskell has been around long enough now that some design patterns have emerged. Today I'd like to talk about how to design a serialization API. In this post I'll use the word serialization in a wider sense and let it include converting data to and from e.g. database rows, in addition to more common meanings, such as converting values to binary or textual formats (e.g. JSON.) The pattern has been…

Wanted: an efficient union algorithm for hash-array mapped tries

There's really only one thing that's holding me back from releasing the new hash-array mapped trie (HAMT) based implementation of unordered-containers , a fast implementation of union . The current released version is implemented in terms of a patricia trie (also known as a radix tree) and it uses a linear time union algorithm. The new version uses a naive implementation that simply calls insert…

Slides from Haskell Performance Patterns talk

I gave a talk at the Bay Area Haskell Users Group today. As per usual, it was on the topic of performance. However, inspired by my new series on reliable techniques for writing fast Haskell code, the talk was structured around a set of rules-of-thumb and looks quite different from previous talks on the subject. The slides are quite terse, but hopefully you'll get something out of them without me…

Forcing values returned from monadic computations

This is the start of my series on reliable techniques for writing fast Haskell code. In each installment we'll look at a specific situation and explore some simple guidelines you can use in your everyday programming. Today's topic is forcing values returned from monadic computations. After reading this article you'll hopefully be able to tell when it's appropriate to force values passed to return…

Dynamic graphs for counters and gauges

I've been busy implementing some of the feature requests I've gotten the last few days. Today I'm releasing the result as ekg v0.3. Here's what's new: Counters and gauges The old counter concept has been split up into two concepts: counters and gauges. Counters are monotonically increasing while gauges are not. An example of a counter would be requests served since program start and an example of…