Tagged Questions

Lua is a powerful, fast, lightweight, embeddable scripting language. It's dynamically typed, runs by interpreting bytecode and has automatic garbage collection. It is often referred to as an "extensible extension language".

I have been using (or attempting to, most of the modules I have I have borrowed from other Wikis as my understanding of Lua is limited at best) Lua-based modules and their invoking templates (i.e., ...

In the following code i read values from a device, add a timestamp to it and send the string via e-mail. The function "send_email()" needs 3 minutes and stops the rest of the code from working.
So my ...

I'm using Nginx-Lua framework, in log phase, I want to get the current request's upstream ip contains port, In this guide, showed upstream_addr is something similar, but it species the all upstream ...

I have been tasked with converting a batch of videos from MOV to MP4 for an application my company is building. We're converting the videos because a short MOV file has an extremely large file size ...

I'm try to create a new game on corona SDK i'm new in lua language, my goal is had a set of enemies in a kind of action game.
For this i think the best way is have a array to store all my enemeis in ...

I'm starting to learn Torch7 to get into the machine learning/ deep learning field and I'm finding it fascinating (and very complicated haha). My main concern, however, is if I can turn this learning ...

Been researching but no luck. Creating a button on Corona SDK requires several lines. (Corona SDK reference here). If you create 5 buttons the code grows a lot, so I created a function that I can call ...

I'm trying to encode/decode JSON in Lua using CJSON. I downloaded lua-cjson using Luarocks (http://www.kyne.com.au/~mark/software/lua-cjson-manual.html).
In the Lua interpreter, I'm using an example ...

I installed Lua Rocks as instructed here:
https://github.com/keplerproject/luarocks/wiki/Download#Installing
After './configure' I got a message to choose either:
'make build' then 'make install'
OR
...

Working through the Lua exercises in 7 More Languages in 7 Weeks and getting caught on a metatables problem.
The challenge is to overload the + operator in order to be able to concatenate tables (as ...

I had installed nginx and lua in my docker image, but I didn't install them on my physical CentOS system. I installed nginx-debuginfo on both physical CentOS system and docker image. I docker run and ...

I have a string x: x = "{abc}{def}{ghi}"
And I need to print the string between second { and second }, in this case def. How can I do this without knowing the length of the string? For example, the ...

I have a string that contains name of files (including complete fullpath) separated by a "|", at the end is a number who indicated the current file (is for a player).
So I just wanna keep it with the ...

I'm looking for the Lua or C equivalent to the .NET method System.Web.Helpers.Crypto.VerifyHashedPassword. The issue I'm solving for is the password hash being created by a .NET application but need ...

I am sorry if this is a very basic question, but I am a beginner and am having issues with differentiating between local and global variables. For example:
variable=0
local variable=0
function func()
...

I have been trying to send an email using the code described in the post:
lua send mail with gmail account
The code by Michal Kottman is repeated below:
-- Michal Kottman, 2011, public domain
local ...

I am trying to write some code that wraps C++ functions into something that Lua can use. One of the main problems I'm trying to solve is passing values popped from the Lua stack into parameters for ...

I have a lua code where a certain table (lets say 'abc') has 50,000 key value pairs. Now i want to create a long string which will look like "(key1, value1) (key2,value2) (key3, value3) ... ".
This ...

I'm looking for some input or advice on the following problem:
I'm developing, or rather maintaining several Addons for the game called WildStar. They're all written in Lua, and while I can write the ...

I wonder if it's possible to access memory which are used by another program? E.g. given the name(or handle) of program A, can I use Lua to read all memory allocated to A, and then modify the values ...

I want to replace any word, character, digit or symbol (except ; , .) followed by the string "some-word\" in Lua. More like a '*' option in regex. Is there any thing similar to '*' in Lua?
Example:
...

I have the following JS script that is known to work correctly and produces the correct value of 12 for the restrictCount value.
var radius = 4
var gnWide = radius * 2 - 1;
var gnHigh = radius * 2 - ...