3 ms·
What better languages are there which are friendly to embedding? A significant part of Lua's popularity, AIUI, comes from it being easy to embed.
by TazeTSchnitzel 6y ago
What better languages are there which are friendly to embedding? A significant part of Lua's popularity, AIUI, comes from it being easy to embed.
- pansa2 6y agoSquirrel [0] seems to have been used in a few places [1], but not many compared to Lua. There are also embeddable JavaScript implementations such as Duktape [2], and a lightweight Ruby in mruby [3]. [0] http://www.squirrel-lang.org/ http://www.squirrel-lang.org/ [1] https://en.wikipedia.org/wiki/Squirrel_(programming_language)#Applications https://en.wikipedia.org/wiki/Squirrel_(programming_language... [2] https://duktape.org/ https://duktape.org/ [3] https://github.com/mruby/mruby https://github.com/mruby/mruby
- bjoli 6y agoGuile scheme, if you have users that don't have the knee-jerk "ewww parentheses!" reaction. The threading model is vastly different from lua, but compared to regular lua you get a lot faster execution.
- srean 6y agoGuile is great and I enjoy how active it has been. However, it is no more that small embeddable lisp. Its embeddable of course, but not small by any means.
- bjoli 6y agoOne you start wanting to run complex things over multiple interpreters in Lua (say, to use multiple threads) you might as well just use guile. Sure, we are talking 2.5mb of library and about the same amount object code. Quite a bit larger than Lua. But that also gives you object code for working with texinfo (and quite a lot of completely unused, undocumented modules). I wonder how much could be stripped without anyone actually boticing
- brobdingnagians 6y agoI love Angelscript for that purpose (w/ C++). Very similar syntax to C++ (but w/ GC), very easy to expose classes, functions, and variables. All it takes is a quick compile & link. It also has a JIT compilation if you need it and ability to save/load the intermediate binary code for faster loading.
- salamanderman 6y agoWren https://wren.io/ https://wren.io/
- zeveb 6y agoTcl leaps to mind. It is very easy to embed, too.
- rsecora 6y agoChaiScript [1] For c++. Almost trivial to add functions or calls in both directions. - Header only project, with modern c++. Able to compile with and without mutex. Multiple context can run in parallel. - Awesome integration and binding with c++ bars and functions. There are two drawbacks. One is the maintenance and some performance quirks with returns and type conversions. The other drawback, maintenance only [2]. the project accepts pull requests, but no recent activity on lenguaje or performance. [1] http://chaiscript.com/ http://chaiscript.com/ [2] https://github.com/ChaiScript/ChaiScript/commits?author=RobLoach https://github.com/ChaiScript/ChaiScript/commits?author=RobL...