port parts of the ruby binding to go