Lua and Python
Lua and Python
Posted Feb 13, 2020 4:46 UTC (Thu) by Kamilion (subscriber, #42576)Parent article: Lua and Python
Factorio's lua support for modding exposes a lot of helper functions that will never exist in any other lua interpreter.
Prison Architect's engine blacklists network functions from running. Teleglitch and TOME/Tales of Maj'Eal both expose engine state to the interpreter using structs incompatible with the lua-struct type identifiers.
Fivem's lua injector for Grand Theft Auto 5 allows completely arbitrary network and file I/O and there's been at least three instances of malware being spread.
Heck, I even have a repo stuffing lua5.1 into the .NET process of Terraria and enumerating and exposing all of the internal functions.
https://github.com/kamilion/WraithModRevival/tree/master/...
It even patches the game to create and enable a quake-like console when you press `/~.
NONE of the lua scripts above are compatible with each-other in any way. Every single one of them relies on implementation specific bridge functions that do not exist in the others.
And honestly? Lua's really the only interpreter that does things this way.
S'why I constantly have to tell all the tweenaged gamers on discord utilizing my server hosting, "There's no books to learn lua for this task. All you can do is experiment."
For non-gaming uses, look at OpenRESTY, embedding lua into the nginx service. Quite nice if you don't want to run uwsgi+python for a simple microservice endpoint.
Posted Feb 13, 2020 11:03 UTC (Thu)
by excors (subscriber, #95769)
[Link] (2 responses)
Personally I'd prefer that Lua remain tightly focused on that kind of embedded use, rather than aiming to be a general-purpose language that can compete with Python, because Python already exists and is alright, and it seems inevitable that a widening of scope would result in compromises that make Lua less good in the embedded niche where there is currently no good alternative.
Posted Feb 13, 2020 18:29 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Feb 15, 2020 11:21 UTC (Sat)
by togga (subscriber, #53103)
[Link]
Lua and Python
Lua and Python
Lua and Python