Skip to main content

Questions tagged [lua]

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

1 vote
0 answers
202 views

As far as I know Lua uses closures to encapsulate local variables, well I've got a function call in a worker thread which passes reference to a callback function, and the async call will be handled by ...
Alireza Mohamadi's user avatar
4 votes
2 answers
455 views

For example, a language that I was looking at recently- Terra. You can address the question in the context of any language, I'm just most comfortable with Lua so I'm starting from there. The Terra ...
Zachary Johnson's user avatar
8 votes
2 answers
10k views

I heard that Lua is great for configuration files, so long as you are secure about it. Lua has been used as config files by programs such as awesome and (recently) conky. However, I also heard that ...
Nolan Akash's user avatar
  • 1,324
1 vote
1 answer
326 views

During code review, a minor suggestion was presented that some implicit behavior be made explicit. The reviewer had skimmed over the code in question, became confused after mistakenly interpreting the ...
Drew's user avatar
  • 191
4 votes
1 answer
346 views

In Lua, I can create an object like so: local foo = Foo.new({10, 10}, 3, right) or like so: local foo = Foo.new({ pos = {10, 10}, len = 3, direction = "right" }) The former is more ...
Nolan Akash's user avatar
  • 1,324
0 votes
1 answer
165 views

I know in lua you can do something along the lines of print=System.out.println print("Hello") But is there something similar in java?
ericsfinck's user avatar
1 vote
2 answers
380 views

I am currently developing my own programming language (written in Lua). The text analyzer is composed of two functions: lexer and parser. lexer takes as input a string, cycles over each character of ...
user6245072's user avatar
4 votes
2 answers
383 views

I've got a fairly substantial code base that I'm trying to simplify. One section in particular deals with probabilistically creating objects. It currently uses hundreds of random number generator ...
Christopher Sheaf's user avatar
4 votes
2 answers
1k views

I am a newbie of Lua. After studying some Lua C APIs examples, I am a little confused. I can see the Lua C API is used for processing Lua scripts: ...... lua_State *L = luaL_newstate(); ...
Nan Xiao's user avatar
  • 143
1 vote
1 answer
143 views

I have a web app that uses ajax to filter db results. So if you have a list of 1000 widgets, that have IDs ranging from 1-1000, by typing numbers into the ID field, you can narrow your search. ...
dot's user avatar
  • 581
2 votes
2 answers
6k views

I'm a noob at nginx and lua. But I'm trying to design a REST interface. The plan is to create a location entry that will match URIs like this: curl -i -X GET 'http://localhost/widgets/widget?name=...
Happydevdays's user avatar
3 votes
1 answer
297 views

I'm currently developing a plugin for World of Warcraft in LUA to help optimize a recently introduced part of the game, namely Garrison missions. A Warcraft Garrison (basically a player fortress) has ...
Nzall's user avatar
  • 1,416
15 votes
7 answers
4k views

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) ...
jawo's user avatar
  • 270
7 votes
1 answer
2k views

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 ...
bazola's user avatar
  • 255
0 votes
1 answer
125 views

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 ...
dot's user avatar
  • 581

15 30 50 per page