It's really odd to me Lua is only used for games. It could take the same place Python has and many other things. It's a nice platform for scripting.

> It's really odd to me Lua is only used for games. It could take the same place Python has and many other things. It's a nice platform for scripting.

I’ve written quite a bit of code in Fennel [1], a Lisp language which compiles to Lua, and enjoyed thoroughly the simplicity of Lua. I implemented map, filter and reduce by hand using Lua tables and genuinely experienced joy with how Lua tables are such a unifying concept throughout the language. I even enjoyed 1-based array indexing after a short while.

(Furthermore, I have to say Lua is meant to be a Lisp, insofar as homoiconicity is the simplest language syntax, and being Lua underneath removes all the esoterica from Lisp, making the end result even simpler.)

But Lua was designed from the very beginning with the assumption it would be embedded within a systems programming language like C. Lua lacks basic functionality other, more full-featured scripting languages ship support for out of the box, e.g. Lua doesn’t even have mkdir. Also, once you survey the landscape for argument parsing in Lua, or cross-platform statically linked binary compilation in Lua, you realize the Lua ecosystem itself expects you to be using Lua as an embedded scripting language.

I was able to get really far embedding Fennel in Rust, for example [2]. Rust is miles ahead of Lua in all the areas Lua is lacking. Instead of clumsily tacking on an object system on top of Lua, write Rust structs. Or instead of using ancient libraries for cross-platform filesystem and IO handling, leverage the native Rust ecosystem (see: dirs-next, clap).

My idea was to just embed Fennel in Rust, and write almost no Rust. And while it does certainly work, I’m increasingly of the belief you should use the language best for the task. Lua is best at being an embedded scripting language, good when you want to ship an interpreter on top of a C/Rust application for instance, or when you want something fancier than TOML or INI for config.

(In this department, see also the work being done on Starlark in the Bazel ecosystem [3].)

[1]: https://fennel-lang.org/

[2]: https://git.sr.ht/~ioiojo/include-fnl

[3]: https://github.com/facebookexperimental/starlark-rust

I believe you would like https://janet-lang.org/

It is lisp-like language with Lua like semantic and implementation, but it is separate from them.

Janet is what introduced me to Fennel. Conjure [1] sold me on Fennel over Janet. The Neovim community is rallying around Lua.

(And in fact, what sold me on Rust was its truly excellent Lua FFI support [2].)

[1]: https://github.com/Olical/conjure

[2]: https://github.com/amethyst/rlua