(re)announcing statprof, a statistical profiler for Python

Back in 2005, Andy Wingo wrote a neat little statistical profiler named statprof that promptly disappeared into obscurity. It has since languished almost unknown, with a handful of people writing semi-private forks that themselves seem to be dead. Statistical profiling (also known as sampling profiling) is simple and sweet: the profiler periodically wakes up and samples the stack, then when all is done, it prints a simple report of which lines showed up most often in the profile. ...

9 April 2012 · 2 min · Bryan O'Sullivan

github is making me feel stupid(er)

I’m approaching my fourth anniversary of using github. I should hardly have to state that it’s a wonderful service, and especially so for being kept freely available to the open source community. At the same time, I’ve noticed over the past year or so that in many ways I feel less efficient using it now than I used to, even though the github team continues to roll out new features that make me shout “hooray!” ...

8 April 2012 · 2 min · Bryan O'Sullivan

aeson 0.4: easier, faster, better

After months of work, and a number of great contributions from other developers, I just released version 0.4 of aeson, the de facto standard Haskell JSON library. This is a major release, with a number of improvements. Enjoy! Ease of use The new decode function complements the longstanding encode function, and makes the API simpler. New examples make it easier to learn to use the package. Generics support aeson’s support for data-type generic programming makes it possible to use JSON encodings of most data types without writing any boilerplate instances. ...

1 December 2011 · 2 min · Bryan O'Sullivan

The future of MailRank’s open source technologies

(Cross-posted from the MailRank engineering blog.) You may have seen my exciting news about our upcoming move to Facebook. It’s been a total blast working on our product, and of course as we did so we released a number of open source libraries and tools. It only added to our pleasure to see so much of that code used outside of our own domain. I will continue to develop and maintain the code that we have released. ...

15 November 2011 · 2 min · Bryan O'Sullivan

A major new release of the Haskell statistics library

I’m pleased to announce a major release of of the Haskell statistics library, version 0.10.0.0. I’d particularly like to thank Alexey Khudyakov for his wonderful work on this release. New features: Student-T, Fisher-Snedecor, F-distribution, and Cauchy-Lorentz distributions are added. Histogram computation is added, in Sample.Histogram. Forward and inverse discrete Fourier and cosine transforms are added, in Transform. Root finding is added, in Math.RootFinding. Major changes: The Sample.KernelDensity module has been renamed, and completely rewritten to be much more robust. The older module oversmoothed multi-modal data. (The older module is still available under the name Sample.KernelDensity.Simple). ...

11 November 2011 · 2 min · Bryan O'Sullivan

The Strange Loop conference was a blast

Last week, I flew to St Louis for the excellent Strange Loop conference, where I gave a 3-hour Haskell tutorial and a talk on how we use Haskell at my startup company, MailRank. Strange Loop is a pretty good approximation to my ideal conference, covering a narrow family of topics I’m interested in, mainly leading-edge matters in programming languages and distributed systems. The focus is not at all academic, instead being on open source software that you can download and get to work with. I have to strongly commend the organizers for finding a great venue, excellent speakers, and running a fabulous show at an impressively low price. ...

28 September 2011 · 2 min · Bryan O'Sullivan

Fitter, happier, more productive UTF-8 decoding

The other night, I had a random whim to spend a couple of minutes looking at the performance of UTF-8 decoding in the Haskell Unicode text package. Actually, rather than look at the actual performance, what I did was use Don Stewart’s excellent ghc-core tool to inspect the high-level “Core” code generated by the compiler. Core is the last layer at which Haskell code is still somewhat intelligible, and although it takes quite a bit of practice to interpret, the effort is often worth it. ...

11 July 2011 · 3 min · Bryan O'Sullivan

Here be dragons: advances in problems you didn’t even know you had

Here’s something I bet you never think about, and for good reason: how are floating-point numbers rendered as text strings? This is a surprisingly tough problem, but it’s been regarded as essentially solved since about 1990. Prior to Steele and White’s “How to print floating-point numbers accurately”, implementations of printf and similar rendering functions did their best to render floating point numbers, but there was wide variation in how well they behaved. A number such as 1.3 might be rendered as 1.29999999, for instance, or if a number was put through a feedback loop of being written out and its written representation read back, each successive result could drift further and further away from the original. ...

29 June 2011 · 3 min · Bryan O'Sullivan

attoparsec 0.9, a major (and abortive) release [updated]

Update: I just released attoparsec 0.9.1.0, which undoes all of the changes described below. The problem? While removing backtracking, I accidentally changed the semantics of the <|> operator in an unforeseen and unfortunate way. The bug I introduced was that a parser of the form (char 'a' *> char 'b') <|> char 'c' would now accept as valid the input "ac", which is clearly highly undesirable. Once my error was pointed out (see the comments at the end of this post), I quickly came up with a fix, but the fix itself had a problem: it regressed performance to being slower than when attoparsec performed backtracking! So now attoparsec backtracks in <|> again, until such time as I can come up with an approach that I’m happier with (and who knows when that will be). Whew. ...

3 June 2011 · 4 min · Bryan O'Sullivan

Exciting teaching news

Looks like I’ve got a busy autumn ahead! Read on for two pieces of news that I’m very happy about. In September, I’ll be teaching a Haskell workshop at the Strange Loop Conference in St Louis. Here’s the abstract: Modern programming presents a daunting array of challenges: proliferating technologies, messy inputs, unreliable networks, huge volumes of data, how to verify that results are correct, making it all fast enough. The Haskell programming language is well suited to addressing this broad range of needs, as it uniquely combines conciseness, safety, and high performance. ...

11 May 2011 · 4 min · Bryan O'Sullivan