I linked through ycombinator because the discussion there adds to the solution pool