Copy of gecoder (http://gecoder.rubyforge.org/)