===================================
como identificar a versão do bytecode lua
===================================
se for pra identificar a versão do bytecode lua (binário) uma forma seria essa...
$ echo "print('hello world')" > hello.lua
$ luac51.exe -o hello.51 hello.lua
$ luac52.exe -o hello.52 hello.lua
$ luac54.exe -o hello.54 hello.lua
apesar de termos a definição lua.h:#define LUA_SIGNATURE "\x1bLua"
$ xxd hello.51
00000000: 1b4c 7561 5100 0104 0804 0800 0b00 0000 .LuaQ...........
00000010: 0000 0000 4068 656c 6c6f 2e6c 7561 0000 ....@ hello.lua..
00000020: 0000 0000 0000 0000 0002 0204 0000 0005 ................
00000030: 0000 0041 4000 001c 4000 011e 0080 0002 ...A@...@.......
00000040: 0000 0004 0600 0000 0000 0000 7072 696e ............prin
00000050: 7400 040c 0000 0000 0000 0068 656c 6c6f t..........hello
00000060: 2077 6f72 6c64 0000 0000 0004 0000 0001 world..........
00000070: 0000 0001 0000 0001 0000 0001 0000 0000 ................
00000080: 0000 0000 0000 00 .......
$ xxd hello.52
00000000: 1b4c 7561 5200 0104 0804 0800 1993 0d0a .LuaR...........
00000010: 1a0a 0000 0000 0000 0000 0001 0204 0000 ................
00000020: 0006 0040 0041 4000 001d 4000 011f 0080 ...@.A@...@.....
00000030: 0002 0000 0004 0600 0000 0000 0000 7072 ..............pr
00000040: 696e 7400 040c 0000 0000 0000 0068 656c int..........hel
00000050: 6c6f 2077 6f72 6c64 0000 0000 0001 0000 lo world........
00000060: 0001 000b 0000 0000 0000 0040 6865 6c6c ...........@ hell
00000070: 6f2e 6c75 6100 0400 0000 0100 0000 0100 o.lua...........
00000080: 0000 0100 0000 0100 0000 0000 0000 0100 ................
00000090: 0000 0500 0000 0000 0000 5f45 4e56 00 .........._ENV.
$ xxd hello.54
00000000: 1b4c 7561 5400 1993 0d0a 1a0a 0408 0878 .LuaT..........x
00000010: 5600 0000 0000 0000 0000 0000 2877 4001 V...........(w@.
00000020: 8b40 6865 6c6c 6f2e 6c75 6180 8000 0102 .@ hello.lua.....
00000030: 8551 0000 000b 0000 0083 8000 0044 0002 .Q...........D..
00000040: 0146 0001 0182 0486 7072 696e 7404 8c68 .F......print..h
00000050: 656c 6c6f 2077 6f72 6c64 8101 0000 8085 ello world......
00000060: 0100 0000 0080 8081 855f 454e 56 ........._ENV