lua: replace bit operation lib(wip)