6 ms·
I used Lua as a data exchange format for some embedded devices (software defined radios) because it played nicely with the C code and the Lua scripts we would r
by scruple 6y ago
I used Lua as a data exchange format for some embedded devices (software defined radios) because it played nicely with the C code and the Lua scripts we would run on the device (which served as a sort of interface bridge between hardware device drivers). The Lua binary can be compiled down to < 100kB and the language itself is fast enough for a scripting language to have been useful in this context (I don't know if that still holds today, I left embedded in 2014).
It was a really pleasant experience but we were not working with a very large number of tables. I miss Lua all of the time, too, and play around with it whenever the opportunity arises. It holds a really special place in my programmer heart, alongside lisp, C, and Ruby, for having shown me some really interesting things at the right time in my career. It's too bad it doesn't have more widespread adoption, I think a lot of people could benefit from using it for the things it's good at.
- rstupek 6y agoThere are a number of places it's being used today. There's an nginx module with an entire web front end development environment (openresty), Cloudflare uses the nginx lua module heavily, you can develop cross platorm (ios, android, web) games in Solar2D.
- scruple 6y agoI'm aware, but I've never seen a shop I've consulted for or any of my employers use it. I've tried to get it in use a few times and ultimately it went no where because I would be the only programmer in a department with > 100 FTEs who would be able to work on it or maintain it unless some others took the time to learn it. It's been a non-starter as a result. When I ask around, I don't hear about it in use locally (edit: that's actually not entirely true, Blizzard uses it and maybe some of the other local game shops, but I don't see it anywhere else locally). I met someone at a conference a year or two back who was using Kong. That's been it. Maybe I'm just missing it but I don't really see widespread use.
- vvanders 6y agoIt never really saw adoption outside of games from what I've seen. Its such a simple but powerful language, has one of the best interop apis with C and I love how they approached coroutines. It's really a shame it doesn't see wider use. We used it to ship all our game logic on the PSP, 400kb prealloc block and it worked like a charm.
- zwirbl 6y agoIt's used in CHDK, the Canon custom Firmware Project for user definable scripts https://chdk.fandom.com/wiki/CHDK https://chdk.fandom.com/wiki/CHDK Besides this I've rarely encountered Lua in the wild Edit: And of course in Magic Lantern, for Canon EOS DSLRs https://magiclantern.fm/ https://magiclantern.fm/
- dividuum 6y agoI built a digital signage solution for the Raspberry Pi based on Lua (https://info-beamer.com https://info-beamer.com) which turned into a company. API documentation is on https://info-beamer.com/doc/info-beamer https://info-beamer.com/doc/info-beamer, while most source code for what's running on the screens can be found on https://github.com/info-beamer/ https://github.com/info-beamer/. Couldn't have done it without Lua.
- zimpenfish 6y agoKong[1] is basically a bunch of Lua scripts on top of OpenResty. Redis[2] lets you write internal scripts in Lua. Edit: Forgot Torch[3] which is great for generating nonsense with RNNs. I think it's definitely getting more of a foothold in the world outside of games. [1] https://konghq.com https://konghq.com [2] https://redis.io/commands/eval https://redis.io/commands/eval [3] http://torch.ch http://torch.ch
- lactobacillis 6y agoThe are a few lua lapis users out there: https://leafo.net/lapis/ https://leafo.net/lapis/
- duskwuff 6y agoThe NodeMCU[1] environment for ESP8266/ESP32 microcontrollers is pretty neat too -- it targets a $2 microcontroller with wireless network access (and Bluetooth in ESP32), with builtin functions to make HTTP requests and interact with external devices. [1]: https://www.nodemcu.com/ https://www.nodemcu.com/
- jddj 6y agoI'd used lua in my early teens to script some games and ended up receiving money for my efforts, so I put it on my resume coming out of university. It turned out that one of the first companies (embedded, automation) I interviewed with used it for integration between various third party subsystems. I think those conversations helped me feel like less of an imposter at the time. I never use it anymore, but the language is nice. I wonder what web development world we'd live in now if they'd embedded lua instead of creating JavaScript.
- adwn 6y ago> It's too bad it doesn't have more widespread adoption, I think a lot of people could benefit from using it for the things it's good at. I think that's because there aren't many things it's really good at. It excells at a niche – as a light-weight, easily embeddable scripting language – but is mediocre as a general-purpose programming language, because it's standard library is extremely spartan and lacks so many things you need on a day-to-day basis.
- jmiskovic 6y agoI disagree, there are many things it is great at. The language is well designed, with orthogonal features that complement each other. Coroutines and meta-tables are easy to understand and still powerful way to organize and control code base. You can actually learn it in a week, and hold all of the language in your head. A very valuable thing in my opinion. The code is very readable to beginners (unlike Perl, Haskell or APL). The interpreter is incredibly fast. Even non-JIT implementation is surprisingly fast. The LuaJIT FFI is so convenient that the difference between C/C++ libraries and Lua libraries almost disappear. There are cross-platform hosting frameworks that allow you to write and execute dynamic interpreted code on otherwise locked down platforms (Android, Switch, TVs...). I would say Lua lacks tooling and better organization of community. Biggest Lua communities were built around products that embed Lua like WoW, Roblox, Corona (now Solar2D).
- spc476 6y agoI use Lua at work to process incoming SIP messages (using LPEG [1]). It's handling million of calls per day without issue. [1] Lua Parsing Expression Grammar http://www.inf.puc-rio.br/~roberto/lpeg/ http://www.inf.puc-rio.br/~roberto/lpeg/