Better HN
topnewbestaskshowjobs
Log inSign up

blep

5 karma · joined Dec 3, 2016 (9y ago) · 2 submissions

Submissions

comment 9y ago · link · parent

There are a couple attempts made by other people to get this implemented:

- https://github.com/fsfod/LuaJIT/commits/gcarena - https://github.com/corsix/LuaJIT/commits/newgc

I'm not sure what the status is on either, though; they're obviously completely different implementations so it's not clear which one of these is preferable (also both authors seem to be busy with other stuff recently).

comment 9y ago · link · parent

I think the main problem here is that there are several semantic differences between 5.3's and LuaJIT's integers which would make this a bit dodgy; eg. rounding behavior and mixed float-integer arithmetic are different.

IMO 5.3 should have done what LuaJIT did and require a suffix for 64-bit integer literals (say `L` to avoid conflict with LuaJIT's `LL`). Given how rarely Lua code needs true integers this large, that probably would have worked better. It also would have avoided the gotchas of porting code to 5.3 where the integral numbers you never add `.0` to are suddenly real integers instead of floats.

I'd love for LuaJIT to get 5.3's bitwise ops but the semantic differences between the integer implementations would make this interesting to say the least.