Bryan O’Sullivan’s website. Recent blog posts below.
Like a coding challenge? Check out Code Quarterly
Peter Seibel (the man behind Practical Common Lisp) is launching a new publication, Code Quarterly, which looks intriguing to me. He’s hoping to run a coding challenge in each issue, and I know this is the sort of fun dear to many a coder’s heart. The first coding challenge has been up for a couple of weeks, and it involves implementing a parser for Markup, a lightweight markup language similar to Markdown and reStructuredText. ...
Dual bitbucket/github citizenship
One of the particularly nice things about working with a distributed revision control tool these days is that I can sidestep the choice of winning tool. Thanks to Scott Chacon and Augie Fackler’s excellent hg-git extension, I can use Mercurial and collaborate almost seamlessly with git users. This is exactly what I did when working with Johan on the new I/O manager subsystem in GHC 7, and the experience was generally very smooth. ...
Why I don’t use darcs any more (much)
Over the past couple of years, since David Roundy handed over control of the darcs revision control system to a talented team of developers, it has come a long way in stability and performance. I began using darcs essentially out of necessity, simply because it was the revision control system of choice for much of the Haskell community. I have always found my use of it to be somewhat clunky, and lately I’ve been migrating most of my remaining Haskell projects away from it. ...
A tiny example of clean Unicode handling in Haskell
Ersin Er wrote a brief blog post about handling the Turkish language in Haskell. Because Turkish uses a character set that mostly looks familiar to Westerners, it is notorious for its ability to trip up the unwary programmer (see examples in PHP and PostgreSQL). import Data.Text (pack, unpack) import Data.Text.ICU (LocaleName(Locale), toLower) main = do let trLocale = Locale "tr-TR" let upStr = "ÇIİĞÖŞÜ" let lowStr = unpack $ toLower trLocale $ pack upStr putStrLn ("toLower " ++ upStr ++ " gives " ++ lowStr) His example is quite nice, but we can write more compact version of his code using a few handy features of the text and text-icu packages: ...
Haskell-related job opening at Stanford University
Updated ICU bindings for Haskell: 0.4.0.0
Dealing with fragile C libraries (e.g. MySQL) from Haskell
I spent some time today trying to talk to a MySQL database server from a piece of middleware I’m writing in Haskell. You might think that talking to a database server would be easy, but it turned out to be quite a bother. Both of the major MySQL bindings, HDBC-mysql and HDBC-odbc, use the libmysqlclient C library behind the scenes. With GHC’s unthreaded runtime, which is still the default, an application using either will work fine. However, my middleware app is highly concurrent and uses software transactional memory (STM) to manage some shared state, and I have to use the threaded runtime. This is where my troubles began. ...