When running Lua, always consider running it on the LuaJIT (http://luajit.org/). It's extremely fast, portable and lightweight JIT compiler for Lua, although it only supports Lua 5.1.
Why do you say Lua is better designed? And are you comparing classic JS or ES6 JS? I like Lua but there are some things that just annoy me like indexing an array with 1, smaller standard library, etc. I find JS implementation of inheritance, objects, and prototyping better than Lua due to its simplicity.
1. Indexing an array with 1 is unfortunate but not a bad design decision in a vacuum, eg for i=1,#size is a very easy to understand loop over valid array indexes. I'll agree that it causes cognitive load in practice.
2. JS has a somewhat broken notion of objects and Lua's implementation is far cleaner while being as powerful. How do you use a JavaScript object as a hashmap? The default try is a potential security hole.
I've been developing game scripts with Lua and I've professional Javascript experience so I'm familiar with both. I actually find Javascript way more readable and easier to work with in general, especially with the new additions. I mean, it's yet another anecdote but just wanted to share.
I agree. Both JS and Lua have a pretty limited standard library, but Lua is a dead simple language with a few simple mechanics that can be used to achieve complicated concepts.
I haven't got major experience in either language, but I find it much easier to read/understand/modify a moderately sized Lua project vs real world JavaScript code.
What's an example of a "not real language" then? I'm feeling a little hard pressed to find an academic language that is not used in industry. I always thought of Lua as academic because I associated it with Torch, but Facebook and Google are both heavy users of Torch, besides Lua has been heavily used in gaming as an embedded scripting language outside of machine learning applications.
Neovim is also working on replacing VimL with Lua (by translating VimL to Lua). I think that'll be pretty cool (you will be able to match the emacs people on having all of your configuration in a full programming language).
The performance improvements are incredible, and it allows you to write inline C code thanks to the FFI library (declaring it like this https://github.com/Mashape/kong/blob/master/kong/plugins/fil..., and invoking it like this https://github.com/Mashape/kong/blob/master/kong/plugins/fil...)