3 ms·
Lua is not designed to be used standalone. Many people get frustrated assuming that it's a Python alternative. Or, by trying to make it into one by writing st
by corysama 6y ago
Lua is not designed to be used standalone. Many people get frustrated assuming that it's a Python alternative. Or, by trying to make it into one by writing stuff like socket libraries for it.
Lua is designed specifically to be embedded within a larger program to manipulate only the features of that specific program. It is for scripting your program. Not, for scripting-up a program in Lua.
Trying to do the opposite, embed Python as a scripting language inside of a larger program, is certainly possible. But, it is much, much larger endeavor that almost certainly drags in 100 pieces of functionality that you do not want inside your program for every 1 that you actually want to use.
Sounds like for your situation Python/Ruby/Perl are much better matches.
- throw_m239339 6y agoSo what are the alternatives to Lula in the specific use case you just described, that are not Python? (embeddable languages).
- fanf2 6y agoTcl and Guile are aimed at the same area as Lua.
- Pxtl 6y agoIirc there are JS engines that can fit this bill too.
- corysama 6y agohttp://chaiscript.com/ http://chaiscript.com/ http://www.squirrel-lang.org/ http://www.squirrel-lang.org/ https://micropython.org/ https://micropython.org/ https://docs.racket-lang.org/inside/embedding.html https://docs.racket-lang.org/inside/embedding.html I've heard that some of the new WebAssembly implementations are actually nice to embed. But, that just moves the problem to "What language to compile to WebAssembly?" ;)