5 ms·
I tried this on 1 or 2 small projects, years ago. It was okay. It's cool that you can import data directly into Lua scripts, since Lua usually has poor library
by ReactiveJelly 6y ago
I tried this on 1 or 2 small projects, years ago.
It was okay. It's cool that you can import data directly into Lua scripts, since Lua usually has poor library support for any other data format.
But I hit a wall with a limit on the number of tables in a file or something, that was specific to the Lua impl I was using. (Probably LuaJIT)
Sometimes I miss Lua. I think with only a few big breaking changes it could be a much better language.
- ejflick 6y agoWould you mind iterating on how it could be improved and how these changes relate to the context in which you've worked? I've used it a bit for simple game development(Love2D). It's an okay language but it seems only suitable for building anything beyond small systems. No good IDE support and needing to emulate OOP was a bit annoying to me.
- legends2k 6y agoTry ZeroBrane, a pretty good IDE for Lua with debugger. As for object-orientation it takes Go or Rust-like approach where there isn't an explicit class construct but conventions; you can build your own or use libraries to get there. In fact Rust or Go are younger so Lua should be appreciated for doing this a lot earlier. Having rigid object-oriented-ness will generally make the language less usable with other paradigms like functional, imperative, generic, etc.
- corysama 6y agoOO in Lua is the same as OO in classic JavaScript, just slightly more manual. In fact, in lots of ways Lua can be viewed as a cleaned up, simplified JS.
- shakna 6y agoI often use a mix of moonscript [0] and Lua, because the Lua that moonscript generates for classes takes away a heap of the overhead when dealing with a whole heap of stateful things that you expect to run across for game dev. [0] https://moonscript.org/ https://moonscript.org/
- scruple 6y agoI 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.
- anonymoushn 6y agoWhat breaking changes would you like? I have a big collection of desired breaking changes that I plan to actually implement sometime, but I'll try not to bias your reply by listing them :)
- ufo 6y agoYou might have run into the problem of LuaJIT only allowing 2^16 constants per function. http://lua-users.org/lists/lua-l/2010-03/msg00238.html http://lua-users.org/lists/lua-l/2010-03/msg00238.html
- sillysaurusx 6y agoAh, I know exactly what limit you're talking about. I ran into it too. You can't have more than N local variables, I believe. The problem goes away if you put them into a top-level table.