[wip] convert ruby -> c++