Rewrite a tool in Lua.