4 ms·
What is it that makes the language suitable for being embedded? Actually, what does it mean to be embedded?
by Bromskloss 10y ago
What is it that makes the language suitable for being embedded? Actually, what does it mean to be embedded?
- agumonkey 10y agoLua is extremely small, simpler, and has a jitted version. It's been used extensively as a scripting language in video games so has more mileage in constrained environment. Never used it really, just stating what other people say. And luajit author, Mike Pall, is extremely skilled.
- imtringued 10y agoYou can launch a lua vm with an empty environment table (in other words no standard library). This means only the functions you manually put into the environment table can be used which makes sandboxing extremely easy. I must admit I've only used luaj where interop to java boils down to something like http://stackoverflow.com/a/19629914 http://stackoverflow.com/a/19629914 and you can optionally use reflection for even easier intertop if I recall correctly.
- walkingolof 10y agoLua as mentioned before is very suited to run in an embedded environment because of it small size (both when executing and the actual source code size) and its modules, which makes it trivial to remove everything except the core language (IO support etc). I'm running Lua on a DLX like processor implemented on a fpga, in this context Lua performs the same role as Basic did on many home computers in the 80's, a small IPL is setting up the machine and loading Lua on boot.