There are a hell of a lot of Haskell libraries now. What are we going to do about it?

The Haskell community has reached a bit of a milestone: there are now more than 2000 open source libraries for Haskell on Hackage! However, with this also comes a problem: how do you work out which library to use? (Without learning one Haskell library a day for the next 6 years?) Which ones are robust, and supported, and which ones aren’t? This isn’t a new problem in open source: the Perl community has faced it with CPAN for a decade or more. Now Haskell is in the same situation.

In fact, it’s kind of startling to look back: in 2006, there were only a handful of open source Haskell libraries for developers to use in their projects (just HDBC, zlib, libxml, Crypto…). Today, there are 2121 (more by the time you read this) libraries for Haskell, available as source on http://hackage.haskell.org (only a “cabal install” away), and often 100s of Haskell libraries in binary form on your favorite distro. You can even follow the package flood on Twitter.

Here’s what the growth in available Haskell libraries over the last 4 years looks like:

We passed 1000 libraries in early 2009, and doubled that a year later.

So this is great for the Haskell dev community. In some areas, like database interfacing, we’ve gone from a single option (HDBC) to a full range, including new stuff like, uh, well, Cassandra, CouchDB, Amazon SimpleDB, MongoDB, Tokyo Cabinet, and pure Haskell libs like TCache, or safe, high level libs like HaskellDB.

We’re rapidly running into CPAN-like problems of just managing the weight of so much Haskell code. How do you know which one to use? Should you use, say, Galois’ xml library, or Lemmih’s xml library? . Someone recently said “It is bewildering trying to figure out which ones are actively supported and which ones are zombie projects that stopped working years ago.”

So what are we doing about it?

There are four efforts underway to help Haskellers manage this work, and you can contribute!

  1. The Haskell Platform – a easy, one-click installer for the core system, including a blessed set of libraries, with a commercially friendly BSD license (like most of Hackage). At the moment, this means just these libraries, and we need developers to propose new additions to the blessed set.
  2. Google Summer of Code: Hackage 2.0 – we have Matt Gruen working this summer to finish the implementation of Hackage 2.0 – an improved Hackage that will allow for many new features to help sort out the wheat from the chaff in Haskell packages: build reports, wiki commenting, and social voting.
  3. Google Summer of Code: Cabal Test: we also have Thomas Tuegel working on “cabal test”  — to allow automated testing and reporting of cabalized (and thus, all of Hackage). This is the second plank in the solidifying the quality assurance story for Hackage.
  4. Regular regression testing of Hackage: having all that code is great – it means we can do regular regression testing of compilers and tools on a multi-million line Haskell codebase. For the 6.10 GHC release, for example, we were able to narrow breakages of all known open source Haskell to just 5% of Hackage, and post detailed instructions on how to address those changes. This gives us significant stability.

So, the HP to make it simpler to install Haskell and get started with a good set of libraries (several hundred thousand downloads of the installers so far!), a better Hackage to help us rate and rank packages, regression testing against Hackage to keep things stable, and in particular, test reporting support to make it easier to do quality assurance estimates.

How would you like to see changed in the Haskell library world? What libraries do you love? What do you hate? How do you find the packages you need?

And you don’t have to wait for others to solve this. Write tools to pick the best libs. Do your own quality ratings and share them. Write reviews of packages, and compare them, then let everyone know.

This is open source – it is up to you to help make things happen.

Popular Haskell Packages: Q1 2010 report

Here is some data on downloads of Haskell libraries and apps on Hackage, for the first quarter of 2010.

The Hackage dependency graph

Hackage is the central repository of open source Haskell libraries and tools. Once they install the Haskell Platform, users get more libraries from Hackage, via “cabal install”.

Headlines

March was the most popular month for Hackage ever. And we’re closing in on 2000 packages, and 2 million “cabal installs” in the next month or so.

Totals

Total cabal packages: 1976. (+ 256 in Q1).

Total contributing developers: 533

90 day moving average: 11.5 packages per day uploaded (up from 10.5).

Total downloads from Hackage 2007-present: 1.88 million (up 350k in Q1)

Downloads in March 2010: 145,752 (new monthly record)

Top of the Pops

The top 15 most popular libraries in the first quarter were:

  1. HTTP
  2. zlib
  3. parsec
  4. utf8-string
  5. binary
  6. QuickCheck
  7. network
  8. Cabal
  9. haskell-src-exts
  10. mtl
  11. regex-base
  12. uniplate
  13. regex-posix
  14. X11
  15. ghc-paths

Top 15 most popular applications in Q1:

  1. cabal-install
  2. xmonad
  3. cpphs
  4. haddock
  5. happy
  6. hscolour
  7. darcs
  8. alex
  9. pandoc
  10. hlint
  11. leksah
  12. yi
  13. agda
  14. texmath
  15. gitit

Honorable Mentions

  • The deepseq is in the top 20 packages of the year.
  • HaXml and HDBC remain the most popular xml and database libraries (though xml-light is closing in)
  • wxHaskell is rising up, as the only cabal-installable major gui library
  • vector and text are quickly rising as the preferred arrays and unicode libraries

You can read all the Q1 data for your favorite packages, and ranked by Q1 popularity.

And for non-Haskellers, how does your favourite open source community compare?