Tuesday, 28 July 2009

Learn you a Haskell for great good: a fantastic tutorial

In the process of trying to learn the Haskell programming language we stumbled upon a really fantastic tutorial called "Learn You a Haskell for Great Good!". This is by far the best tutorial we have ever read on Haskell and, in particular, is infinitely better than any of the books on Haskell including the recent Real World Haskell book.

For anyone wanting to get to grips with the basics of Haskell programming, we highly recommend this resource.

Sunday, 12 April 2009

Reviews: Real World Haskell

The very affordable book Real World Haskell was published at the end of 2008 and initially received universal praise in the Amazon reviews from its home country.

However, far more readers have since written reviews on Amazon in other countries and the impartial site Reddit that were not so positive:

Fortunately, the authors have agreed to write a second edition of the book that will hopefully address all of these issues.

Wednesday, 8 April 2009

Hash table woes

Recent performance studies have shown that Haskell's defacto-standard compiler, GHC, still bundles an extremely inefficient hash table implementation. Specifically, the benchmark showed optimized Haskell compiled to native code running even slower than interpreted Python and 32× slower than F#.

Surprisingly, the poor performance turned out to be due to a design flaw in the implementation of GHC's garbage collector that renders it incapable of handling updates to arrays of boxed types efficiently.

Contrary to a statement in the book "Real World Haskell", trees are incapable of providing comparable performance for the majority of use cases. Therefore, it is extremely important that this deficiency is addressed because, without a decent hash table implementation, almost all dictionary data structures will be over an order of magnitude slower in Haskell than other functional languages such as OCaml and F#. Suffice to say, hash tables are an extremely valuable data structure and failing to provide a decent implementation is a serious shortcoming.

Although Haskell programmers have been complaining about the poor performance of its hash tables for at least three years, Donald Stewart has just promised to address the issue by implementing a new and reasonably-performant hash table for GHC.


Lennart Augustsson releases his embedded BASIC

Lennart Augustsson, author of the world's first Haskell compiler, has released the much-anticipated source code to his BASIC DSL written in Haskell that uses LLVM for JIT compilation.

Lennart has been teasing us with a series of fascinating articles describing the elegant DSL capabilities offered by his latest work and it is great to finally have something to play with!

This project demonstrates how the Haskell programming language combined with FFI bindings to LLVM's C API can be used to construct new language implementations quickly and easily.

Functional languages excel at metaprogramming and there are several similar compilers written in functional languages that are buildinng upon LLVM including our own HLVM project that is written in OCaml and provides a complete high-performance garbage collected virtual machine in under 1,000 lines of OCaml code.


Friday, 27 March 2009

XMonad popularity

Donald Stewart kindly took the time to analyze and document the download statistics for his xmonad package, a tiling window manager written in Haskell. His results prove that xmonad has been downloaded tens of thousands of times even though the project is not yet 3 years old.

Donald also notes that the number of source downloads dropped dramatically when xmonad became available prepackaged for all mainstream Linux distributions. This indicates that the Debian and Ubuntu popularity contest results (distros that cover over 70% of all Linux users) for xmonad should be accurate estimates for the current number of active xmonad users. According to those results, users are currently running around 180 registered copies of xmonad, making it the second most popular program ever written in Haskell!

Following the success of this analysis, Donald has announced his intention to automate this procedure in order to provide accurate download statistics for the thousands of Haskell packages currently available.


Saturday, 22 November 2008

Real World Haskell book out now!

The highly anticipated book Real World Haskell is flying off the printing press and will be available on the shelves of all good bookstores any day now. Congratulations to the authors Bryan O’Sullivan, Don Stewart and John Goerzen!

The functional programming language book market is hotting up now following the release of F# for Scientists and expecting both F# in a Nutshell and Real-world Functional Programming in .NET in the coming months.


Monday, 28 July 2008

Growth of the Haskell job market

Functional programming languages have been around for a long time, of course, but they have only very recently begun to be adopted for more mainstream programming tasks. This is reflected in the job market and the IT Jobs Watch website does an excellent job of trending the job market over time for different programming languages, including Haskell. The results are surprising:

This shows that, at least in the UK, the Haskell-related job market is growing rapidly: demand for programmers familiar with Haskell been rising steadily since mid-2006 and is now 4× higher than it was then.

Moreover, the range of salaries for job adverts that value Haskell experience is substantially higher than all mainstream languages: £50-68k compared to only £38-45k for C# and £42-52k for Java. As we predicted last year, this trend is driven by employers using programming language diversity as a way to identify superior candidates and this trend is driving more and more young developers to better their programming abilities and job prospects by learning advanced languages like Haskell.

However, Haskell is unlike the other major functional languages because job adverts asking for programmers familiar with Haskell rarely pertain to actual Haskell programming in industry. In contrast, many companies are actually using other functional languages, like OCaml, to build working products. The reason for this is not clear.