Live data from Hacker News

Why nobody talks about Lua

goplexian.com

51–60 of 78 posts

Re: Why nobody talks about Lua

#51
We use Lua for embedded scripting in my current project. First I wanted to use Python, but I couldn't figure out how to build our app with MinGW while our Python is Cygwin's.. Lua is very easy to embed, but I think it should be easier to do error handling. We still fail silently on syntax errors in the script..

Re: Why nobody talks about Lua

#52
post #24

I have trouble finding a use for Lua, even though I like it better as a language than most. The problem is that it isn't a good "starting place" for an app. Instead you write something in C/C++ and say "oh, I wish I had a dynamic language for this part" and then you add Lua on top. And this is part of why Lua is such a compelling language now - by being extension-focused it's been able to iterate the entire language…

>Lua still doesn't really satisfy as a "batteries-included" platform. This is exactly the problem, imo. Lua is a niche language because its benefits only apply to a certain niche, i.e., scripting glue on top of an extant system, because that's where the time investment makes sense. Is Lua so much better that using it is worth losing the convenience of something like Rails or Django? Those things come all bundled up n…

Python kicked ass for it's standard library.

Re: Why nobody talks about Lua

#53
post #51

We use Lua for embedded scripting in my current project. First I wanted to use Python, but I couldn't figure out how to build our app with MinGW while our Python is Cygwin's.. Lua is very easy to embed, but I think it should be easier to do error handling. We still fail silently on syntax errors in the script..

Error handling in Lua is really easy. Please ask your question on Lua mailing list or on stackoverflow.com, you'll get help on your problem.

Re: Why nobody talks about Lua

#54

I like Lua as a language. I especially like how easy it is to embed it into another program. I'll be using Lua for scripting my current project. The only thing I really don't like about it is that it treats all numbers as double-precision floats. It can be compiled to use 32-bit ints instead, but I'd really like to have access to both, especially since floating point arithmetic is insanely slow on embedded processors…

Consider using LNUM patch then.

Re: Why nobody talks about Lua

#56
post #42

Earlier quoted context omitted.

>Lua still doesn't really satisfy as a "batteries-included" platform. This is exactly the problem, imo. Lua is a niche language because its benefits only apply to a certain niche, i.e., scripting glue on top of an extant system, because that's where the time investment makes sense. Is Lua so much better that using it is worth losing the convenience of something like Rails or Django? Those things come all bundled up n…

you need to realize lua isnt targeted as a batteries included platform, its design philosophy is minimalist, not junk included but customize for your requirements. where lua absolutely excels is when paired with C (not C++) and not used as "scripting glue" but fully integrated and driving the system. it really appeals to minimalistic / keep it simple philosophy guys which isnt the web community. lua is not a one stop…

I think it's true you need to watch out for this 'gap' between a full blown, batteries-included language, and something really small. Tcl sort of fell into it when they grew the language and libraries to the point where it's less attractive as a small, embedded language, but never really got it together enough to ship it with all the goodies included, either, meaning you have to round up a bunch of external things to do much with it. It's not a 'happy medium'.

Re: Why nobody talks about Lua

#57
post #24

I have trouble finding a use for Lua, even though I like it better as a language than most. The problem is that it isn't a good "starting place" for an app. Instead you write something in C/C++ and say "oh, I wish I had a dynamic language for this part" and then you add Lua on top. And this is part of why Lua is such a compelling language now - by being extension-focused it's been able to iterate the entire language…

If the app you need to script is C++ there are much more appealing options than Lua, which is very C. You get ugly C style code in your C++. QScript, ChaiScript, and projects like boost.python and libperl++, play much better with your C++.

And the slightly Lua derived Squirrel.

I've considered a number of these for my current app, especially QtScript, Lua and Squirrel, but eventually I settled on embedding a JVM, since it gives me access to a bunch of libraries and lets me use any JVM language (I'm personally using Clojure and Yeti, but users of my app could in theory use other languages).

Re: Why nobody talks about Lua

#58
post #2

It seem to me that Lua usage reside primary in the game industry. People who works in the game industry and people who works in web technologies rarely collide with each other.

I don't think it's so much that they rarely collide, it's more that the game industry is NDA-infested. Gaining a public profile as an employee for a developer working on a game for a publisher is a risk. People get fired for lesser things than talking about how Lua helped them in Project X.

Spreading knowledge between game developers is easier, though. People move around between companies a lot, and your publisher's team of lawyers is less likely to be present at a conference talk than finding NDA violations by crawling the web.

Re: Why nobody talks about Lua

#59
post #2

It seem to me that Lua usage reside primary in the game industry. People who works in the game industry and people who works in web technologies rarely collide with each other.

I work for a major worldwide game developer, and our project currently uses Lua for a lot of dynamic scripting and behaviour control (the rest of the game is in C++). I've been pushing for a higher usage of it, as it allows a lot more runtime iterating than with C++, where the compile+link+load times on a project this large are killer, whilst Lua can easily be hot reloaded.

Of course, the same goes for any scripting language (I've worked with a proprietary script language at my last dev shop), but I like the fact that lua is light, minimalist, clear and a standard that others will know, but also very extensible. I'd definitely say the the small core and lack of huge external libraries is a good thing, when you're developing for fixed hardware like game consoles.

Re: Why nobody talks about Lua

#60
post #24

I have trouble finding a use for Lua, even though I like it better as a language than most. The problem is that it isn't a good "starting place" for an app. Instead you write something in C/C++ and say "oh, I wish I had a dynamic language for this part" and then you add Lua on top. And this is part of why Lua is such a compelling language now - by being extension-focused it's been able to iterate the entire language…

If the app you need to script is C++ there are much more appealing options than Lua, which is very C. You get ugly C style code in your C++. QScript, ChaiScript, and projects like boost.python and libperl++, play much better with your C++.

If you like boost::python, have you tried Luabind?
Post reply on HN