Profile cover photo
Profile photo
Bryan O'Sullivan
Bryan's posts

New York friends, I'm going to be in town from June 17 through 21. If you'd like to meet up, drop me a line.

It's always fun to wrestle with type families in GHC, even though I have yet to escape the mental straitjacket of "although I think I understand the sentences I just read, I can't turn this into insight into my own code".

Current status: hating Subversion with the blinding heat of a thousand fiery suns.

Post has attachment
Ah, the joys of trying to find a bug in an LCA algorithm.

Post has attachment
(Re)announcing statprof, a statistical/sampling profiler for Python:

Sampling profilers are extremely useful: in contrast, Python's default profiler only counts function calls, which leaves you almost blind if you have a hot loop inside a function.

This profiler was originally written years ago by Andy Wingo. I fixed bugs, added a few features, spiffed up the docs a bit, and now you're free to hack!

Post has attachment
Nice interview with my boss at Facebook about how we release software. Oh, and we're hiring :-)

If you want a good example of bad Python, read the pstats module in the standard distribution. Actually, read the logging module first. While you digest them, let's play a game: why are so many of the standard Python libraries crap?

Does there exist a sane profiler for Python?

The lsprof-based profiler in modern Python only counts function calls, which means a hot spot inside a function is typically invisible. This makes lsprof and cProfile almost useless in many common cases.

Post has shared content
This was the best sticker I saw at SXSW, sported by the inimitable +Jason Scott

Just wrote a patch for Mercurial's git importer that uses libgit2/pygit2, if available, to improve performance. The current importer shells out to git a ton, which is of course not very fast.

The result is quite nice so far: import time is improved by about 5x on a small repo (libgit2). Edit: and >8x faster on a larger repo - converting git itself takes 4 hours (!) with stock hg, 28 minutes with my patch. Sweet!
Wait while more posts are being loaded