CoffeeScript solution to the convex hull problem