-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with Lua 5.2 #1
Comments
Thanks! Do I get it correctly that it's possible to create a runtime which would work with both 5.2 and 5.3? If yes, could you prepare a pull request for these changes?
I believe that it would be not affect the runtime, but also would require some changes in code generation as well? |
Yeah, I think this will require changes to the translator as well (e.g. for bitwise operations). |
Note that the Also the Lua 5.3 Reference Manual states:
Lua 5.3 includes |
There are multiple syntax and module issues, Translator needs to be updated, but i want to ask, before I'll commit myself to the cause. I'm currently motivated, because of Wireshark integration I'd want to pursue, see OK-DMR/Hytera_Homebrew_Bridge#1
Could you please comment on, which of those ways you are more comfortable with? |
Why not make it 5.1 compatible, too? That would enable LuaJIT users, too. |
Shouldn't wireshark just upgrade the lua version? |
@KOLANICH Not as easy as it sounds. There are breaking API changes. |
@KOLANICH it might happen in Wireshark release 3, however when that will happen is unknown, and I'm not sure Wireshark devs have the motivation to do so. And as @Qix- said, could be 5.1 compatible even, however since Lua is not my standard knowledge, i'm not sure if 5.1 code is straight 5.2 compatible |
By the way, to be clear, yes you can write portable Lua. Just requires ponyfilling a few libs (e.g. |
Great, so now the only thing remaining is the decision, do we want a separate translator for Lua and separate Lua 5.1+ compatible runtime, or do we want to update the current translator to directly produce Lua 5.1+ compatible code instead? |
Judging by previous experience, if we can afford doing cross-platform, and it's not terribly bad in terms of performance or having tons of ifs, it's much better user experience and simpler testing if we do cross-platform. |
So I think I've done it all, and this ticket can be closed in favor of #5 |
Just wanted to note some challenges that I had while working with the runtime dependencies working with Lua 5.2 (which is what Wireshark comes with) vs Lua 5.3:
Bitwise operations needed to be modified to not use the standard symbols but instead utilize the bit32 supported ones:
https://www.lua.org/manual/5.2/manual.html#6.7
Also string.unpack is not supported whereas Struct.unpack is and provides the same behavior.
All of these changes were made in the kaitaistruct.lua file.
The text was updated successfully, but these errors were encountered: