evan_tech

Previous Entry Share Next Entry
11:48 am, 9 Feb 08

googlechart, cont'd

Now a version 0.2 is on Hackage, which covers a lot more of the API.



Hackage is the Haskell analog of CPAN. It really is the translation of CPAN/RubyGems/whatever into the Haskell world, too: much smaller, more centralized, and clean. For example: it's kinda cute that getting an account involves emailing a human, who gave me a personal response, but I'm sure that'll only last until there are more than 200 or so people doing this.

So here are some notes about their release process, which has all been changing pretty rapidly. (Note that I've never released a package on CPAN, and my knowledge of releasing Python/Ruby/O'Caml modules is all out of date. That's why this post is all behind an LJ-cut.)

Haskell projects share a standardized configure/installation system, called Cabal, in which you include a file of metadata and it manages stuff like checking module dependencies, building code and docs, registering with the module system, and releases.

It's interesting to note that since Haskell is compiled and linked, most of the infrastructure to manage versioning and dependencies is outside of the language itself. By that I mean that the cabal file is it, while Ruby Gems and Python Eggs express version dependencies as run-time function calls and CPAN appears to parse the module version out of the source code of the modules(?). The Haskell approach has the disadvantage that you can't express complex interdependencies but it has the advantage that it's guaranteed to be computable -- the Cabal parser will alert you to any invalid fields. I guess that's the same distinction you normally have in static/dynamic languages played out once again.

On top of Cabal is Hackage. Since Hackage can parse the cabal file -- it's data, not code -- releasing a package there is as simple as handing them the tarball that "Setup sdist" outputs, and right on their upload page they even provide a link to do releases from the command line. And they even generate build logs and docs online; check out the links from this random package. (It's unclear why it doesn't have docs for mine yet.)

What's missing: It's not apt yet, nor does it automate fetching dependencies like CPAN does, but I guess people are working on that. And the other piece, I guess, is code hosting. It's not a problem for me, but right now source repositories tend to be scattered across a variety of different sites. It's not clear to me why some things are hosted at haskell.org and others aren't.

(What's also missing is a way for any human to track down what's going wrong here. :P)

In all, I'm impressed it works as well as it does, especially given how few people are using Haskell. It has the feel of the sort of project that's being driven by just one or two talented and devoted hackers, so if that's the case, I'm grateful for your hard work.