Blog Archives

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

So I’m writing a Haskell book!

I’ve been sitting on this for a while, so I’m very excited to announce that Don Stewart, John Goerzen and I are collaborating on an upcoming book for O’Reilly, the working title of which is “Real-World Haskell”. Better yet, O’Reilly
Posted in haskell, open source

GHC 6.6.1 for Fedora

With Jens Petersen’s blessing, I’ve packaged GHC 6.6.1 for Fedora Extras. If you use FC6, it’s available via yum as of a few days ago. It will be a part of Fedora 7 as soon as that comes out, too.
Posted in haskell, linux

Norvig’s spell checker and idiomatic Haskell

A few weeks ago, I spent a little time porting Peter Norvig’s Python code from his article How to Write a Spelling Corrector to Haskell. It’s a concise vehicle for a few Haskelly topics that don’t get much airing in
Posted in haskell

FileManip, an expressive Haskell library for manipulating files

I just released version 0.1 of FileManip, a Haskell library I put together to make it easier to futz about with files in the filesystem. There are a few different components to the package. The Find module lets you search
Posted in haskell, open source

Efficiently computing a factorial using binary splitting

I don’t intend for this blog to become a dumping ground for code snippets, but sometimes the temptation is too strong. Here’s a simple but fast function for computing a factorial, using the binary splitting algorithm from this page. factorial
Posted in haskell