A ruby port of python clac