7 ms·
Curios how many people here actually use Lua ? What are the applications you are using it for ? I know it is used a bit in the gaming industry for scripting pur
by pavanky 13y ago
Curios how many people here actually use Lua ? What are the applications you are using it for ? I know it is used a bit in the gaming industry for scripting purposes, but I am not aware of anything else.
We use it internally to map some of the functions in our library to OpenGL.
- kolev 13y agoI use it within Nginx.
- OP_JMP 13y agoPlease do not confuse Lua with LuaJIT. Whilst LuaJIT claims to be ABI compatible with Lua 5.1, 5.1 is not the latest release of Lua. There are some in the Lua community that consider these two different languages or at least that JIT is a fork. https://sites.google.com/site/marbux/home/where-lua-is-used https://sites.google.com/site/marbux/home/where-lua-is-used
- malkia 13y agoI'm not following. LuaJIT is 5.1 compatible, with some of the 5.2 features in (compile enabled with LUAJIT_ENABLE_COMPAT52). Just because it's not the latest release of Lua, it does not make it less Lua language. Yes, bytecode generated by lua reference implementation can't be loaded by luajit (or maybe things have changed since), but that's just like saying Microsoft C++ libs can't be used by MINGW.
- OP_JMP 13y agoYou may want to inform Mike Pall that it is 5.1 compatible then. Every time someone on the list says something to the effect that they have just replaced the dll/lib, he informs them that they are doing it wrong and instead they want to do it this way or that way with LuaJIT. The FFI has become such a core feature of LuaJIT now that as soon as you start using it you have already discounted ever using Lua again. So let us be honest, LuaJIT has split from Lua and is now a separate language which Mike says he will not update to support the latest version and keeps adding none compatible features.
- rweichler 13y agohttp://github.com/mpv-player/mpv http://github.com/mpv-player/mpv http://github.com/rweichler/cylinder http://github.com/rweichler/cylinder Both of those aren't games.
- copx 13y ago>Curios how many people here actually use Lua ? I use it, my favorite language by far (after trying about all of them). >What are the applications you are using it for ? Game development. >I know it is used a bit in the gaming industry for scripting purposes Not just scripting anymore. There are multiple production grade game engines where you write all the code in Lua(JIT). This variant is big in the mobile/casual sector of the industry. Corona [1] seems to be the current market leader there. There is also an open source game engine - LÖVE [2] - where you use Lua(JIT) for everything. However it is more of a hobby/enthusiast thing. It is much simpler, and very few commercial games are based on it. In contrast, Corona is widely used for commercial projects. [1] http://coronalabs.com/ http://coronalabs.com/ [2] https://love2d.org/ https://love2d.org/
- deutronium 13y agoIt's also provided within nmap as a way to run scripts
- arh68 13y agoI'm learning Lua. No idea what I would use it for, especially given JavaScript's striking similarities. Probably the most interesting app I've found is Luvit, a descendant of Node. Libuv and http-parser are C, so it's not a crazy idea. I like it. If you know a better way of using async i/o in Lua, I'm all ears.
- kcbanner 13y agoI use it in my game engine to script components and behaviours.
- justinmk 13y agoLua plays a key role in the architecture of neovim[1] - all unit tests going forward are written in lua/moonscript[2] - Lua will be embedded in neovim, and vimscript plugins will be compiled on-the-fly to Lua. Yes, this is really happening[3]. [1] https://github.com/neovim/neovim https://github.com/neovim/neovim [2] http://moonscript.org/ http://moonscript.org/ [3] https://github.com/neovim/neovim/pull/243 https://github.com/neovim/neovim/pull/243
- srean 13y agoIn case you see this could you tell me if moonscript exposes Lua coroutines through its syntax. The docs dont mention it, and I have not been able to get any information from moonscript author. Promise to upvote :)
- nacs 13y agoCloudflare uses it quite a bit with nginx: http://blog.cloudflare.com/pushing-nginx-to-its-limit-with-lua http://blog.cloudflare.com/pushing-nginx-to-its-limit-with-l... https://github.com/cloudflare/ https://github.com/cloudflare/
- dividuum 13y ago> Curios how many people here actually use Lua? I use it in games: http://infon.dividuum.de/ http://infon.dividuum.de/ As a backend language in a geo game service: http://geolua.com/ http://geolua.com/ And as the controlling language for a raspberry PI software: http://info-beamer.org/ http://info-beamer.org/ Lua is pretty awesome. Fast, simple to include and expressive enough for my needs.
- jbeja 13y agoYou can also use it to make fast web apps with OpenResty using this: http://leafo.net/lapis/ http://leafo.net/lapis/
- wbond 13y agoI started using lua(jit) with nginx over the past year, with more work recently. The work by agentzh[1] with the lua nginx module and the openresty stuff was very useful. Being able to tweak the behavior of nginx with a full-featured programming language is very useful. I just finished using it to build realtime stat tracking and a websockets server to display that data to web clients[2][3]. Additionally I've done some work with custom processing in a reverse proxy and handing case-insensitive URLs. Overall I've found it very comfortable to use and fast, but a little more barebones than something like python. In my use cases, the speed and low overhead has been more than worth it. [1] https://github.com/agentzh https://github.com/agentzh [2] https://sublime.wbond.net https://sublime.wbond.net [3] https://github.com/wbond/sublime.wbond.net/tree/master/realtime https://github.com/wbond/sublime.wbond.net/tree/master/realt...
- q3k 13y agoI occasionally did some game development with it, now I'm writing a toy IRC Bot with hot-pluggable plugins, sandboxing and other fun features: https://code.hackerspace.pl/q3k/mun/ https://code.hackerspace.pl/q3k/mun/ (you can talk to it on #hackerspace-pl on freenode, it's called moodspeak).
- groovy2shoes 13y agoI've used Lua extensively. I wrote a tool at work to do packet analysis in Wireshark which has a Lua API. I've written a couple of simple games using the Love2D framework. I once wrote an IRC bot using luasocket. I started to write a debugger which was an amalgam of C and Lua, but I've since abandoned that project (not because of Lua, but because I lacked the free time and the patience to support more than one object file format). I also experimented with using Lua as a target for a Clojure-like Lisp dialect. The compiler is itself written in Lisp and compiles itself to Lua. I've written an Asteroids clone and some toys in Lisp and compiled them into Lua. It's a very fun language to program in. The reference implementation is also small enough that you can reasonably expect to know its ins and outs in about a week. The C API is really nice; it makes embedding in C a breeze. LuaJIT itself has the best FFI I've ever seen: you can practically #include a C header file in your Lua and it just works.
- neomantra 13y agoI've used Lua in the realm of quantitative finance for years. Early on, it was primarily a flexible configuration tool, embedded in a complex event processing system. With the advent of LuaJIT 2, I've used it standalone for analyzing many many millions of messages per day in real-time, then feeding resultant datasets to other more batteries-included environments which aren't near as fast (e.g. Python, Matlab) or to datastores like Redis and Mysql I also use OpenResty for web applications (risk management apps, charting, and other visualizations), often pulling from those same datastores. OpenResty is a joy to work with and is crazy fast. I make heavy use of the FFI both for library bindings (including system calls) and general C structure use. The messages mentioned above are represented as C-structures and are efficiently processed by LuaJIT. I find myself often writing Lua scripts to do networking programs rather than C. Check out `ljsyscall`. Dealing with memory has definitely been a stumbling point, but once I built enough scaffolding to deal with it (including using jemalloc), it has been clear sailing. Now I store millions of objects taking many GB of memory without significant GC pressure using FFI-based HashMaps and Vectors. Also understanding how to keep the code in the JIT (versus the interpreter) has taken some artistry -- e.g. examinging the output of -jv and -jdump. Although this thread is about LuaJIT 2.0.3 release, I use the LuaJIT 2.1 branch which has many enhancements; I especially appreciate the string improvements and trace stitching.
- minikomi 13y agoThat sounds pretty cool! It's mainly as a normalization step before hard crunching?
- neomantra 13y agoDefinitely for normalization, e.g. take a UTDF message, convert it to some representation (either a C-blob, CSV, or JSON, depending on final use), then push it to a Redis list named utdf.MSFT. But beyond normalization, there is building books (be they level-1, 2, or 3), maintaining state, and extracting information from that. Random example (i.e. not a real query I've done): emit all the trade executions on any venue that happen within the first two depth levels of NASDAQ. LuaJIT could do the hard crunching, like regression analysis, quite well, and there are some interesting projects like GSL-shell... but Matlab and numpy/matplotlib are quite expressive and more complete environments.
- lttlrck 13y agoI use it in redis.
- foomanmanfoo 13y agoI've been toying with LuaJIT+Terra for writing extensions to R (see http://people.mozilla.org/~sguha/blog/2013/08/01/rterra_first_post.html http://people.mozilla.org/~sguha/blog/2013/08/01/rterra_firs...)
- shawndumas 13y agoI used it to teach my son programming by creating a text adventure engine[1] ---------- [1]: http://shawndumas.github.io/adventure.lua/ http://shawndumas.github.io/adventure.lua/
- justincormack 13y agoSnabb Switch[1] is a high performance userspace driver for 10Gb ethernet switches, written in LuaJIT. [1] https://github.com/SnabbCo/snabbswitch https://github.com/SnabbCo/snabbswitch
- Fizzadar 13y agoI built a web framework & control panel (early stages) using Lua + Nginx (http://github.com/Fizzadar/Luawa http://github.com/Fizzadar/Luawa & http://github.com/Oxygem/Oxypanel http://github.com/Oxygem/Oxypanel). Although both are pretty basic currently I think Lua has huge potential when it comes to high performance web frameworks.
- apaprocki 13y agoA decent chunk of code in the Bloomberg Terminal client is implemented in Lua and we also use it for stored procedures in a custom database impl.
- bluerobotcat 13y agoOne interesting use of Lua is in LaTeX. Recent distributions of LaTeX come with binaries luatex and lualatex. I'm not familiar with the exact details, but if you'll Google around you'll find many references to LaTeX internals being rewritten in Lua. I've found LuaLaTeX to be quite stable already and used it to compile my PhD thesis.
- ivans__ 13y agoI use it extensively in Polycode.
- tomlu 13y agoI think its niche is performance-sensitive and/or memory constrained applications where seamless use of C + scripting language is important. Games is an obvious one, but I'm sure there are others.
- dottrap 13y agoSome interesting, non-game uses: Adobe is using it for some of their products. Lightroom was the first and its usage is extensive. http://thesoftwarelife.blogspot.com/2008/11/lightroom-and-lua.html http://thesoftwarelife.blogspot.com/2008/11/lightroom-and-lu... http://www.lua.org/wshop05/Hamburg.pdf http://www.lua.org/wshop05/Hamburg.pdf Wikipedia is now using it as their multimedia scripting language. http://www.meetup.com/wikimedia-tech/events/106078042/?action=detail&trax_also_in_algorithm2=combo&eventId=106078042&traxDebug_also_in_algorithm2_picked=combo http://www.meetup.com/wikimedia-tech/events/106078042/?actio... http://www.youtube.com/watch?v=PrhzAtC8fCc http://www.youtube.com/watch?v=PrhzAtC8fCc Verisign uses it for High Availability Databases and also apparently DNS Advanced Traffic Management http://bluedino.net/luapix/LuaWorkshopJuly2008-rev3.ppt http://bluedino.net/luapix/LuaWorkshopJuly2008-rev3.ppt https://www.youtube.com/watch?v=XeP7d_jBPyA https://www.youtube.com/watch?v=XeP7d_jBPyA You can now write NetBSD kernel modules in Lua. https://news.ycombinator.com/item?id=6562611 https://news.ycombinator.com/item?id=6562611
- zimpenfish 13y agoI wrote my (personal) iOS app in Lua via Wax. A bit clunky but a lot quicker than learning Objective C at the time.