4 ms·
So Lua is faster/simpler/smaller than pretty much every other dynamic language and now has optional typing as well. Why have we not seen an effort to build a s
by aaron-lebo 12y ago
So Lua is faster/simpler/smaller than pretty much every other dynamic language and now has optional typing as well.
Why have we not seen an effort to build a solid ecosystem around it the way node has with JS? Lua with equivalent libraries to Python/Ruby/Javascript/PHP would be superior to any of them.
- srean 12y agoYou may want to take a look at openresty [1] moonscript [2], Lapis [3] and Kepler [4] . There has been some more direct efforts to port the "Node.js way" to Lua, one such is luvit [5] (significant overlap in the developers list) on the otherhand luv [6] exposes the underlying libraries slightly differently. Lua really ought to be considered JS done right and Eich should really have been given enough time to bring scheme to the browser (syntax could have been negotiable). Another interesting project is Typed Racket http://docs.racket-lang.org/ts-guide/index.html?q=typed http://docs.racket-lang.org/ts-guide/index.html?q=typed and Guile http://wingolog.org http://wingolog.org if this sort of things interests you. [1] http://openresty.org/ http://openresty.org/ [2] http://moonscript.org/ http://moonscript.org/ [3] http://leafo.net/lapis/ http://leafo.net/lapis/ [4] http://www.keplerproject.org/ http://www.keplerproject.org/ [5] http://luvit.io/ http://luvit.io/ [6] https://github.com/richardhundt/luv https://github.com/richardhundt/luv
- vbit 12y agoAnother related effort is http://turbolua.org/ http://turbolua.org/
- zorked 12y agoLua is very popular in some niches, like games and embedded stuff. Language adoption is a very social thing though. Maybe if Rails was a Lua framework we would be wondering why Ruby never made it big.
- stevekemp 12y agoAgreed. Lua is embedded in things like Redis, and is often uses as an extension/configuration language for small projects. I based my mail client(http://lumail.org/ http://lumail.org/) around Lua as a configuration language because I kept getting annoyed by the almost-configuration-language used in mutt. Actually writing applications in Lua is also possible, for example the chat/Jabber server Prosody.
- fuzzythinker 12y agoThere is, kind of, with the highly underrated OpenResty [1] and Lapis [2]. The benchmarks [3] for the pair is also way ahead of node, all w/o callbacks. 1. http://openresty.org/ http://openresty.org/ 2. http://leafo.net/lapis/ http://leafo.net/lapis/ 3. http://www.techempower.com/benchmarks/#section=data-r7&hw=i7&test=json&l=eo http://www.techempower.com/benchmarks/#section=data-r7&hw=i7...
- fit2rule 12y agoI think what happens with Lua (which does, incidentally, have many solid ecosystems built with it) is that it just gets quietly used in industrial-strength ways which don't require too much fanfare/promotion in order to propagate it as a tool - which is not the case with node, which aims to be a solution to industry-wide problems which Lua solves in other ways. One thing that I think people get confused about Lua is that its simultaneously a VM, a language, and a very minimal framework, around which many, many things can be glommed. The glomming of those things is so flexible and versatile that - indeed perhaps we see too much diversity in the Lua appliance world, for there to be any common centralized traction around promoting it, as has happened with node. If you want to see how Lua really has a solid ecosystem, then you have to look for projects that have embedded the VM and are using it as the basis for their application run loop. And indeed, there are plenty of projects out there doing this, that it can't really be said Lua doesn't have traction; it just doesn't attract as much hype. Lua has plenty of libraries; its just that the "FFI all the things!" approach means that you can, pretty much, indeed FFI all the things. No standards committee required!
- malkia 12y agoSame with P4 :)
- deleted 12y ago[deleted]
- evv 12y agoNode isn't a web framework either. It is a runtime for JS, outside of the browser. The complete ecosystem being referred to is all of the libraries available in node's package manager (npm). If lua had an awesome built-in package manager like npm, it would be possible for the lua community to develop a library ecosystem that competes with node's.
- nilved 12y agoLua has luarocks (which is eh) and moonrocks (which is pretty good).
- ajacksified 12y agoMoonrocks will be the default server for Luarocks with the next Luarocks release.
- freehunter 12y agoThere is a Lua package manager, just not built-in. http://luarocks.org/ http://luarocks.org/
- bruce_one 12y agoSounds like luvit will :-) https://github.com/luvit/luvit/pull/447 https://github.com/luvit/luvit/pull/447 https://www.npmjs.org/package/luvit-set https://www.npmjs.org/package/luvit-set
- ludamad 12y agoThe thing I love about Lua is that I can integrate it into my existing ecosystem. Note though it does lack some syntactical sugar, and arguments not passed are silently 'nil', so it is not strictly superior.
- StefanKarpinski 12y agoLua is a great language and this is cool research. But cool as it is, saying that Lua "now has optional typing" because a research extension to the language has implemented it isn't really realistic. By that token, you could say that Java has every imaginable language feature because in the 00's, adding features to Java was how most PL research was done. You can have Lua lots of ways: if you use standard Lua, then it comes with a large number of nice C libraries; if you use LuaJIT then it's very fast; if you use this research version, then it has optional types. But you can't have all of these ways at the same time.
- anonymoushn 12y agoFor the most part, you can. You can definitely use Typed Lua + nice C libraries or LuaJIT + nice C libraries. Typed Lua says it only works with Lua >= 5.2. LuaJIT runs a language that is somewhere between Lua 5.1 and Lua 5.2, so it's not clear whether it will work with Typed Lua. The 5.2 requirement may just be to run tlc (and not the code it outputs), in which case you could run LuaJIT + Typed Lua + nice C libraries.