Blog Archives

Design your functions for partial application

Every language’s standard library has its weak spots. In C, for example, the stdio functions don’t have a consistent notion of where the FILE * belongs in the argument list. For fwrite, it goes at the end; for fseek, it’s

Posted in haskell

GHC 6.8.1, gtk2hs 0.9.12.1 now available for Fedora 8

If you use Fedora 8, GHC 6.8.1 will be in the stable repository within 24 hours or so. I’ve also pushed a compatible build of gtk2hs 0.9.12.1 to the stable repository.
Posted in haskell

GHC 6.8.1 pushed to Fedora 8 testing

Upgrading my laptop from F-7 to F-8 yesterday was painless, so I’ve been able to verify that the latest version of GHC works smoothly. I’ve pushed the built packages to the F-8 testing repository, and will bump them to release

Posted in haskell, linux

See me speak at Ignite SF tonight

This evening, I’ll be speaking at the peculiar but fun Ignite SF. My talk is notionally about functional programming, but it’s really about imposing constraints on yourself, and what you can get out of it.

Posted in haskell, open source

Using Emacs to insert SCC annotations in Haskell code

When debugging or profiling Haskell code, it’s common practice to pepper it with cost centre annotations, often called SCC (for strongly connected component set cost centre) annotations. If you compile a program using ghc -prof -auto-all, this causes all of

Posted in haskell

What the heck is a Wide Finder, anyway?

Tim Bray has recently been writing about a simple log file processing task, giving his efforts the (decidedly peculiar) name of Wide Finder. The task at hand is to count popular links in an Apache log file. Here’s my two
Posted in haskell

Pure Haskell MySQL bindings in the works

I’ve spent a few spare hours here and there working on a pure Haskell interface to MySQL recently. On the principle that perhaps someone else might want to join in the fun, I’ve published a darcs repository already (see the

Posted in haskell, open source

Weighted Slope One in Haskell: collaborative filtering in 29 lines of code

Some months ago, I wrote a Python implementation of Daniel Lemire‘s Weighted Slope One collaborative filtering algorithm. Steve Jenson sent me a pointer to his Scala implementation last week, but his code is a straight port of the Python version,
Posted in haskell

Announcing Data.SuffixTree, a lazy, efficient Haskell suffix tree

A few days ago, I wrote a Haskell library for building and working with suffix trees. It builds a suffix tree lazily, so even though its performance is O(n log n) on large input strings, it often has linear performance

Posted in haskell

On the value of strong static typing

Here’s a great quote from Yaron Minsky about the use of types in functional programs. […] most of the advantage of types in a language like ML comes from completely vanilla uses of the type system. One of our programming

Posted in haskell