Your last problem is likely because you didn't append /?.lua to your LUA_PATH.
I compiled lua53-socket and I can confirm that there is a problem with it:
return require'socket'
error loading module 'socket.core' from file '/usr/pkg/lib/lua/5.3/socket/core.so':
/usr/pkg/lib/lua/5.3/socket/core.so: Undefined symbol "luaL_checkint" (symnum = 50)
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/pkg/share/lua/5.3/socket.lua:12: in main chunk
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?
It's because lua-socket isn't 5.3 ready:
$ make
...
luasocket.c: In function 'global_skip':
luasocket.c:67:18: warning: implicit declaration of function 'luaL_checkint' [-Wimplicit-function-declaration]
int amount = luaL_checkint(L, 1);
^
...
$ lynx /usr/pkg/share/doc/lua-5.3/manual.html
...
* Macros to project non-default integer types (luaL_checkint, luaL_optint, luaL_checklong, luaL_optlong) were deprecated. Use their equivalent over lua_Integer with a type cast
(or, when possible, use lua_Integer in your code).
It should be trivial to fix.
Alex