Thursday, April 28, 2011

Haskell libraries you should use

Since Hackage doesn't help you separate the good libraries from the bad, I wrote down a list of libraries I consider good. I hope this list can serve as a starting point for new Haskell programmers who are lost in the Hackage jungle. The list isn't exhaustive and I intend to flesh it out in the future.

I won't provide a separate motivation for each library in the list. The libraries I've listed have a sensible API, are well document, and well tested. In addition, by using these libraries your Haskell code is likely to perform well without you having to think too much about performance.

Haskell libraries you should use

bytestring: Defines the ByteString type. Use bytestring when you need to represent binary data, such as network packets.

text: Defines the Text type. Use the text package if you need to work with Unicode text data. The text package deals with lots of tricky internationalization issues for you, like how to lowercase/uppercase strings correctly in different languages. The package includes functions that decode/encode Text values from and to ByteString values.

vector: Defines types for immutable and mutable vectors. Use this package whenever you'd use an array in another language. Since the built-in list type is so convenient to use, programmers sometimes use it when it's not appropriate, which makes their programs perform badly. Remember, the built-in list type is implemented as a linked list, which the associated memory bloat and cache issues.

aeson: Lets you work with JSON data easily and efficiently.

binary: Serialization and deserialization of binary data. Use this package when you need to parse some predefined binary protocol. The cereal package is a popular alternative.

attoparsec: Good for parsing protocols that mix binary and ASCII data, like HTTP.

Tuesday, April 26, 2011

This year's haskell.org GSoC projects

Here's the final list of accepted students and projects:

  • Alejandro Serrano : Improve EclipseFP
  • Alexander Göransson: Simplified OpenGL bindings
  • anklesaria: Interpreter Support for the Cabal-Install Build Tool
  • Jasper Van der Jeugt: Convert the text package to use UTF–8 internally
  • Mikhail Glushenkov: Build multiple Cabal packages in parallel
  • Owen Stephens: Darcs Bridge
  • Petr Ročkai: Darcs: primitive patches version 3

There's some more information at the GSoC website.

This is the second year Edward Kmett and I act as GSoC administrators for haskell.org. It's been a lot of fun and also quite a bit of work. If you ever end up participating in GSoC as an administrator here are some of the things you might want/need to do:

  • Promote the organization (to get more proposals) and specific projects (to get proposals for things that matter to the community).
  • Make sure all the good students don't apply for the same project by encouraging them to apply for several different projects.
  • Make the mentors agree on a final list of projects.
  • Make sure every project has a mentor.
  • Resolve conflicts when the same student gets accepted by two different organizations.

Wednesday, April 6, 2011

Last chance to apply for Google Summer of Code

The student application deadline for this year's Google Summer of Code is tomorrow, April 8th, 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.