My first dashboard widget

These days I find myself converting between “coalescence units” (a time unit of 2Ne generations) and “substitution units” (time measured in expected number of substitutions) several times a day.   It is not really much of a problem to do, but my brain is simply not wired to do arithmetic in my head, so I usually fire up R or Python for this.

I am learning Objective-C and Cocoa these days, more for fun than anything else, but I figured that I could write a small unit conversion application to get some use out of it.  I mentioned this to Kasper, but he suggested that I write a dashboard widget instead.

I have never used Dashcode before, but I fired it up this morning before I headed for the office, to get a feeling for how it works, with the intention of writing a widget during the week.  It turns out it is extremely easy to work with, though, and within half an hour I had a complete conversion widget coded up.

The only thing I don’t quite like about it yet is that when I do the conversions it doesn’t present the results in the text field in scientific notation, so I get stuff like 1000000 instead of 1e6 or 0.0001 instead of 1e-4, which makes the conversions somewhat harder to read.

I’m sure there is a way to format the numbers, but my Javascript-fu is not up to it.  This widget is the first Javascript I have ever written.

Off to Cold Spring Harbor

I’m packing now, getting ready for the Biology of Genomes conference in CSH.  I’ve never attended this conference before, but I am quite excited to be going this year.

I probably wont have much time for blogging while there, so it might be quiet here for the next week.

I’ll go and finish my packing now.  I need to check in at two but the bus connection to the airport is pretty crappy on a Sunday so I need to leave relatively early.

Boost and Xcode, united through CMake

A while back I complained about my problems with developing applications using Boost in Xcode.  Between then and now I had a long period where I couldn’t even get Boost compiled on my Mac.

Now, however, I’ve found that there is a CMake based distribution of Boost.  This is great since CMake can Xcode projects directly, which makes it easy to make sure the libraries build will work with projects I make directly in Xcode.  Which incidentally is also why I was happy to see Bio++ move to CMake.

My only problem now is that I have a bunch of old software based on Automake that uses Boost.  They don’t seem to play well together on my Mac.  I should port those to CMake, but first I need to learn how to use CMake, and time is not something I have plenty of at the moment.  Maybe this should be a project for the summer holiday.

Does anyone know of any scripts that can assist me in converting Autoconf/Automake configurations to CMake?