The Monad Squad

Tired of imperative programmers kicking sand in your face? Send some cut-out lambdas and a postal order for 5 frobs to haskell.org, and we’ll send you a handy-dandy poster of those famous superheroes, the Monad Squad! State helps functional programmers cross the imperative street! Identity can blend in anywhere! Writer never forgets a detail! Cont can travel through time! List can do many things at once! Reader can tell what you’re thinking! ...

18 January 2008 · 1 min · Bryan O'Sullivan

A new (well, to me) spam vector: google.com

This is, I must say, very clever. In my latest round of inbound spam, I’ve noticed that some senders have begun sending valid links to http://google.com/ in their messages. The technique they’re using is to obfuscate a target URL inside a Google “I’m feeling lucky” query: this means that the domain near the left of the URL really is google.com and doesn’t need to be faked, but it immediately reroutes a click to the spammer’s target, which is difficult to read due to some escaping. This is a cute social engineering attack, riding on Google’s brand and domain name to gull the unwary into clicking. ...

11 January 2008 · 1 min · Bryan O'Sullivan

Phil Wadler to talk in San Francisco next week

POPL 08 takes place next week, so San Francisco will be flooded with an army of burly and menacing programming language researchers and type theorists. Kids, don’t say you haven’t been warned. On Wednesday evening, January 9, Phil Wadler will be repeating for the public his talk “Well-typed programs can’t be blamed”, based on joint work with Robby Findler. Here’s the abstract from their eponymous paper. We show how contracts with blame fit naturally with recent work on hybrid types and gradual types. Unlike hybrid types or gradual types, we require casts in the source code, in order to indicate where type errors may occur. Two (perhaps surprising) aspects of our approach are that refined types can provide useful static guarantees even in the absence of a theorem prover, and that type dynamic should not be regarded as a supertype of all other types. We factor the well-known notion of subtyping into new notions of positive and negative subtyping, and use these to characterise where positive and negative blame may arise. Our approach sharpens and clarifies some recent results in the literature. ...

7 January 2008 · 2 min · Bryan O'Sullivan

Why you should not use pyinotify

A while ago, I had a need to monitor filesystem modifications, and I looked around for Python bindings for the Linux kernel’s inotify subsystem. At the time, the only existing library was pyinotify, so being a lazy sort, I naturally tried to use it. On first glance, the documentation seems impressive, and the API looks reasonable. Effective use of inotify is a subtle affair, however, and pyinotify is not, shall we say, the best tool for the job. It’s difficult to tell what those problems might be from external inspection, though, so here are a few notes from my experience. ...

5 January 2008 · 5 min · Bryan O'Sullivan

LLVM bindings for Haskell

I’ve spent a bit of time over the past few days putting together some LLVM bindings for Haskell, based on Gordon Henriksen’s C bindings. (If you don’t know what LLVM is, it’s a wonderful toybox of compiler components, from a complete toolchain supporting multiple architectures through a set of well-defined APIs and intermediate representation file formats that are designed for building interesting software.) The C bindings are almost untyped, but the Haskell bindings re-add type safety to prevent runtime crashes and general badness. ...

3 January 2008 · 3 min · Bryan O'Sullivan

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 at the beginning. This makes it harder to abstract away the details of the API. Instead of remembering “the FILE * always goes at the front”, I have to memorise the order in which each specific function takes its arguments. Of such niggles are programmer annoyance born. ...

26 December 2007 · 4 min · Bryan O'Sullivan

BLDGBLOG interviews Kim Stanley Robinson

Here is an absolute treat: a long, lively interview with Kim Stanley Robinson, conducted on one of my favourite blogs, BLDGBLOG. At its best (the Three Californias trilogy, Antarctica), Robinson’s writing is at once haunting and beautifully evocative of a sense of place.

21 December 2007 · 1 min · Bryan O'Sullivan

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.

26 November 2007 · 1 min · Bryan O'Sullivan

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 in about a week. If you’re feeling impatient, you can download the final RPMs from the koji build page. I’ve got a build of Gtk2Hs pending, too, so I’ll be releasing that at the same time as the bump of GHC itself.

9 November 2007 · 1 min · Bryan O'Sullivan

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.

16 October 2007 · 1 min · Bryan O'Sullivan