I assume there is no objection to posting it on github?
I got bored and did this:
This version works for both 5.1 and 5.2, and adds __pow.
int64.new can be passed an integer, or a string representing an integer; this may now be a hex literal in the 0x... form.
int64.tohex(n) gives a hex representation of the 64-bit value. int64.num(n) attempts a conversion. It is not very clever.
steve d.