Convert this script to CoffeeScript
Add C just for kicks