Lua is a lightweight multi-paradigm programming language designed as a scripting language with extensible semantics as a primary goal.

learn more… | top users | synonyms

14
votes
7answers
2k views

Function only returns unchanged parameter, useless?

I just found this function in the project I'm working at: -- Just returns the text unchanged. -- Note: <text> may be nil, function must return nil in that case! function Widget:wtr(text) ...
5
votes
1answer
121 views

Creating New Scripts Dynamically in Lua

Right now this is just a crazy idea that I had, but I was able to implement the code and get it working properly. I am not entirely sure of what the use cases would be just yet. What this code does ...
0
votes
1answer
83 views

debugging web applications using debug parameter

A suggestion has been made by a team member to leave all debug code intact in our web pages... and then to create a variable that can be turned on / off to enable / disable debugging. This is a ...
0
votes
0answers
227 views

Embed Python into Lua?

I've found a lot of things about embedding Lua into Python, but I was wondering is is possible to embed Python into Lua? I've searched for a while, and couldn't find anything on it, so maybe some of ...
8
votes
2answers
2k views

How Lua handles both integer and float numbers?

As far as I remember myself programming I was taught not to compare floating point numbers for equality. Now, while reading Programming in Lua about Lua number type, I found following: The number ...
3
votes
1answer
328 views

LuaJit FFI and hiding C implementation details

I would like to extend an application using LuaJit FFI. Having seen http://luajit.org/ext_ffi_tutorial.html this is surprisingly easy when comparing this to the Lua C API. So far so good. However I do ...
9
votes
9answers
7k views

Why do we need “callback functions”?

I am reading the book programming in Lua. It said that Closures provide a valuable tool in many contexts. As we have seen, they are useful as arguments to higher-order functions such as sort. ...
5
votes
2answers
947 views

Alternative Scripting Language to Lua?

I would like to add scripting support to an applications and with plenty scripting languages available I am a bit overwhelmed. At first I thought about Python but I guess Python is a little too big ...
3
votes
1answer
509 views

script engine with no global environment (java)

I am curious about how global variables are handled by script engines. I am looking for a script engine that does not preserve the state of global variables upon invocation. Are there such engines out ...
8
votes
2answers
267 views

Should extension scripts be run in a sandbox?

In particular, this is about game extensions written in lua (luajit-2.0). I was contemplating whether I should restrict what these scripts can do, and arrived at the conclusion that I probably ...
5
votes
2answers
510 views

Lua and multi-paradigm programming: scope and capabilities

Despite having started learning programming with Pascal and C, after the jump to OO (C++, Java) I lost sense of the structured programming paradigm. I have started learning Lua and I have researched ...
2
votes
1answer
479 views

Lua & Javascript documentation generation

I am in the beginning phase of create a mobile MMO with my team. The server software will be written in JavaScript using NodeJS, and the client software in Lua using Corona. We need a tool to ...
6
votes
2answers
1k views

What does (Lua) game scripting mean?

I've read that Lua is often used for embedded scripting and in particular game for scripting. I find it hard to picture how it is used exactly. Can you describe why and for which features and for ...
1
vote
4answers
223 views

best way to do the compile and check cycle

I am trying to learn lua and am experimenting on my linux machine. I am not a programmer, so I am looking for your help to give me some suggestions. What I want to accomplish is making my ...
4
votes
4answers
609 views

What is the equivalent word for “compile” in an interpreted language?

(I was encouraged to ask this question here.) In C, we say: GCC compiles foo.c. For interpreters (such as Lua), what is the equivalent verb? The Lua interpreter ____ foo.lua. When I ...
6
votes
6answers
2k views

Why the sudden rise in popularity of Lua? [closed]

Does anyone know why the Lua progamming language has seen such a rise in popularity recently? I am going by the TIOBE ratings. http://www.tiobe.com/index.php/paperinfo/tpci/Lua.html I've used Lua in ...
2
votes
5answers
871 views

Functional language with C-like syntax [closed]

I've been looking for functional language with C-like syntax and static typing. So far my choice would be Nemerle. Is there anything else/better? EDIT: second choice would be Lua or Go. Any pros ...
12
votes
3answers
19k views

Why Python and not Lua? [closed]

Why has Python been backed by google and become so rapidly popular and Lua has not? Do you know why Lua has stayed in background?