op: refactor __tostring
emulation of tvm in lua