Linked by Thom Holwerda on Fri 7th Sep 2007 13:34 UTC, submitted by anonymous
General Development "Lua is a powerful, light-weight programming language designed for extending applications. Coupled with it being relatively fast and having a very lenient license, it has gained a following among game developers for providing a viable scripting interface. It has been used in games such as World of Warcraft and Far Cry, and in applications such as Adobe Photoshop Lightroom and Snort."
Thread beginning with comment 269623
To read all comments associated with this story, please click here.
Why shuld I learn Lua?
by bariole on Fri 7th Sep 2007 18:02 UTC
bariole
Member since:
2007-04-17

In last decade there is a rising interest in scripting languages like python, ruby, php or pearl. Basically these four languages are prominent because they successfully solve some real problems and have software stack to support them (apis, frameworks, tools, documentation, etc.)

So why LUA? What makes is more appealing than python for example (which seems similar enough)?

Reply Score: 2

RE: Why shuld I learn Lua?
by axel on Fri 7th Sep 2007 18:12 in reply to "Why shuld I learn Lua?"
axel Member since:
2006-02-04

well 2 reasons
1. despite the fact that no one mentions it Lua is used everywhere. Lua also solves real problems and has the software stack to support it.
2. python, ruby, php, pearl are all big, really big, which makes them less than ideal for embedded scripting.

there aren't a whole lot of apps built on lua sure, but theres a whole lot of apps (big important apps as well as small apps) that use it for various scripting an AI purposes
http://www.lua.org/uses.html for an extremely abbreviated list

Reply Parent Score: 2

RE: Why shuld I learn Lua?
by subterrific on Fri 7th Sep 2007 18:35 in reply to "Why shuld I learn Lua?"
subterrific Member since:
2005-07-10

Lua is designed for embedding and has a much cleaner C API than those other languages. Lua is also orders of magnitude smaller and faster. The core language is very powerful and easy to extend. For example, http://luajit.org/coco.html provides C-based coroutines and a Just In Time compiler.

Reply Parent Score: 2

RE: Why shuld I learn Lua?
by _df_ on Fri 7th Sep 2007 18:52 in reply to "Why shuld I learn Lua?"
_df_ Member since:
2005-07-06

lua isnt designed to compete with python + ruby. Yes lua can be stand alone but its really designed to be embedded into other apps.

it doesnt have the libraries that python and ruby have, because your app is supposed to provide the bridge from some other 3rd party api (like sqlite) into lua.

Reply Parent Score: 2

RE: Why shuld I learn Lua?
by Spellcheck on Sat 8th Sep 2007 02:20 in reply to "Why shuld I learn Lua?"
Spellcheck Member since:
2007-01-20

Perl

Reply Parent Score: 2

RE: Why shuld I learn Lua?
by JohnMG on Sat 8th Sep 2007 03:19 in reply to "Why shuld I learn Lua?"
JohnMG Member since:
2005-07-06

> So why LUA?

That's a very good question. Picture this: you write a fairly large program in C. You like C. Compiled C code is *very* fast. Some friends advised you not to use C. They told you to just use Perl/Python/Ruby/Lisp/whatever. You said no. Now you find that it would actually be quite helpful if you could script your app...

So, you've got your pick of scripting languages you can embed. Really, you only have the most basic of needs. Nothing fancy.

Now, do you go with a tiny and simple scripting language, one that you can pick up quickly (and that you're hoping your users can pick up quickly)? Or do you jam a full-blown general programming language, standard library and all, into your app? If you were a Perler/Pythoneer/Rubyist/Smug-Lisp-weenie, you would've just written your app in that language from the beginning, right? ;)

So, it looks like there's a market for Lua. As long as people keep writing fairly large apps in C and C++. ;)

Edited 2007-09-08 03:19

Reply Parent Score: 5

RE[2]: Why shuld I learn Lua?
by rayiner on Sat 8th Sep 2007 06:32 in reply to "RE: Why shuld I learn Lua?"
rayiner Member since:
2005-07-06

Your point is well-taken, but I found this particular bit funny:

you write a fairly large program in C... They told you to just use Perl/Python/Ruby/Lisp/whatever. You said no. Now you find that it would actually be quite helpful if you could script your app...

It reminds me of the joke "A programmer has a problem. He decides to solve it with a program written in Perl. Now he has two problems."

Reply Parent Score: 3