For what it’s worth, LuaJIT includes the Lua BitOp module. BitOp is also available as a standard C module for Lua 5.1/5.2, so you can get a consistent API and semantics across both implementations. I have only used it very briefly, but it seems to be working rather well.
I’m on 5.2 (and soon even 5.1) indeed so that i can give LuaJIT a try. If that does not work out or if the speed improvements are not worth it then I will probably just move to 5.3.
Maybe you could just update to Lua 5.3, which has bitwise operators.
I am curious why you went with 5.2 in the first place. Maybe in prevision for LuaJIT?
For what it’s worth, LuaJIT includes the Lua BitOp module. BitOp is also available as a standard C module for Lua 5.1/5.2, so you can get a consistent API and semantics across both implementations. I have only used it very briefly, but it seems to be working rather well.
It is the same kind of API as bit32, unfortunately. The advantage of operators is that instead of this:
you write this:
I’m on 5.2 (and soon even 5.1) indeed so that i can give LuaJIT a try. If that does not work out or if the speed improvements are not worth it then I will probably just move to 5.3.
Pretty cool idea to tie a scripting API in to what is shaping up to be a fairly well-equipped Apple II emulator. Who needs a Game Genie?