4 ms·
lua (the language and core libraries) is stable and small. many developers are attracted to node.js or rails due to the community ("look, everyone else is doing
by ammmir 15y ago
lua (the language and core libraries) is stable and small. many developers are attracted to node.js or rails due to the community ("look, everyone else is doing it!"), ecosystem (abundance of modules/gems to choose from), and rapid release cycles.
lua seems to have more of a relaxed, niche community among game developers and scripting language embedders.
i've been using lua for about a week so far, for a music player i'm building (http://cloudplay.fm/ http://cloudplay.fm/) and i'm writing the song search/ranking system in lua. it's wonderful to be able to prototype it outside the application and not have to deal with the integration until you need to.
i would consider using lua on the server-side (see http://luvit.io/ http://luvit.io/ for a node.js-style interpretation, although i'd prefer coroutines instead of callbacks) but there needs to be more work on the library front.
to help lua grow, i'd fix these things:
- add unicode support
- bring the CLI up to par with node.js (i use node as a calculator, too)
- build a modern distribution that includes frequently used luarocks
- jacques_chester 15y ago> add unicode support This won't happen soon. Lua targets ANSI C and only ANSI C. C11 includes new character types to support unicode, but I imagine that the Lua implementers will take their time. Plus there's implications for embedded situations. If you need unicode (and most do), there are libraries and patches that do a reasonable job.
- marshray 15y agoI'm fine with C-style strings, but once in a while there are things for which a bit of UTF-8 tagging would be good enough.
- groovy2shoes 15y agoLua strings aren't C-style: they're prefixed with the string length. Lua's strings are suitable enough to store UTF-8 encoded data, but none of Lua's built-in functions are equipped to process it. Unicode libraries don't need to provide a special Unicode string type, they simply need to provide Unicode-aware string processing functions.
- marshray 15y agoRight. I meant "C-style" in the sense of Lua being oriented around the kind of single/multibyte encodings used with ANSI C (as contrasted with kind of the UCS-2 and UTF-16 stuff you get with Win32 and Java).
- justincormack 15y agoThere are several server side Lua options with coroutines.
- peregrine 15y agoCould you name a few, alls I see are kepler based ones..
- sshumaker 15y agoThe previously mentioned luvit (http://luvit.io http://luvit.io) has them (they call them Fibers).
- larubbio 15y agoI work at Zipline Games and we're building out a server side hosted lua system. We're targeting it at game developers, but there is nothing game specific about the lua handlers you can write. You can find out more about it at http://getmoai.com http://getmoai.com If you don't want a hosted solution you can look into mongrel2 and tir http://tir.mongrel2.org/ http://tir.mongrel2.org/
- seclorum 15y agoI just want to say: thank you for MOAI. It is an awesome way to get an app done for Android/iOS platforms simultaneously, and I really look forward to the future of this framework. Without question, it has been a very enjoyable experience - develop on Mac OSX, simultaneously deploy on both Android and iOS, and then ship. Really, a pure joy to use.
- justincormack 15y agoAs well as Mongrel and Tir, there is LuaNode https://github.com/ignacio/LuaNode/ https://github.com/ignacio/LuaNode/ which is modelled on nodejs. I think there is another node variant too. Also, with a slightly different feel is the Lua Nginx module which is also async with coroutines, but using nginx to provide all the IO. https://github.com/chaoslawful/lua-nginx-module https://github.com/chaoslawful/lua-nginx-module