The main difference between these three implementations seems to be the supported Lua version - 5.1, 5.2 and 5.3 respectively. Of course, the reference implementation is now on version 5.4 - these are all considered different major versions of the language (Lua doesn’t use SemVer).
[0] https://github.com/yuin/gopher-lua
Why Lua 5.1 and not 5.2 or 5.3? What does the marshalling story between Lua and the builtin Go modules look like? What would it take to add more builtins or richer marshalling?
I love seeing other Lua implementations.
Each version of Lua since 5.1 is basically equivalent to Python 2 and 3, subtly different enough that you have no clear migration path. (And worse, Lua didn't even have an equivalent to 2to3.) So many applications are stuck at 5.1.
I think that there is a decent chance for other implementations to overtake PUC-Rio Lua if this missing migration path is clearly laid. The starter would be implementing all versions at once and allowing the mix of codes written for different versions.
This is a double-edged sword, it allows unashamed modifications but it does require rewrites.
Hopefully things settle with 5.4. I love how small and comprehensible the language is.
> The starter would be implementing all versions at once and allowing the mix of codes written for different versions.
I don't think this is quite possible, because some formatting and function return minor details that changed that would break interoperability. That said, porting between versions shouldn't be difficult. Just using the latest version would be the easier and safer solution.
GopherLua <-> Go is pretty easy. I was doing LuaJIT FFI to Rust before, moved to GopherLua, it's easier. Check this out to get a feel, it's the json module in LadyLua: https://github.com/layeh/gopher-json
But I guess, as will all things Go, that it will be fast enough for a good amount of use cases, and having a language native dependency rather than messing with C libraries is always a plus.
Before this I was doing C and PUC-Rio Lua. Was obsessing too much with C pitfalls, valgrind, and the sanitizers. Then LuaJIT FFI + Rust, good I like it better but found GopherLua the easiest. I'd stick with LuaJIT+Rust for anything that needs less resources and speed.
It becomes a shallow runtime bug, so it isn't a compiler failure. But I've literally never had a misspelled global stick around for long enough to qualify as a "bug" rather than a mistake. I have polluted the global namespace once or twice by assigning to a new misspelled global in the outermost chunk, which is a little more bugesque, but very seldom.