Questions tagged [lua]
Lua is a scripting language that gained popularity due to how easy it is to embed and learn.
45
questions
0
votes
0
answers
17
views
How do I add segments to a circle in LÖVE? [closed]
In LÖVE, I am trying to add segments to an ellipse. What code would I need?
0
votes
0
answers
17
views
I installed LuaRocks via Homebrew, and it's not working
I just installed LuaRocks, the standard package manager for Lua, using Homebrew:
brew install luarocks
I'm running Lua 5.4, and every time I try to access the package repository, either to search or ...
1
vote
2
answers
2k
views
undefined global 'vim' in lua-language-server - coc.nvim
This snippet gives a warning:
local api = vim.api #Undefined global 'vim'
my CocConfig:
` "languageserver": {
"lua": {
"command": "/home/manas/.config/...
2
votes
0
answers
185
views
How to delete the fist line in the file using lua script?
I just started learning script lua. I have a .txt file with the format "user | pass". how to get "user" and "pass" on the first line and delete them from that file.
This ...
0
votes
1
answer
90
views
Can Lua support Data URLs?
In LUA, you can load HTTP request using Loadstrings, which grab the data from any link.
Ive noticed these "Loadstrings" are rather annoying to lookup on the internet due to the large community of "...
1
vote
1
answer
3k
views
Error while installing lua-nginx-module
I want to install openrestys lua-nginx-module to my Nginx Installation.
I tried steps from
https://github.com/openresty/lua-nginx-module
and
https://stackoverflow.com/questions/50357732/adding-lua-...
0
votes
0
answers
245
views
lua command won't work in lua.exe
I'm just starting out trying to learn lua, an I'm running into a problem getting it to run my programs. I saved the program as a .lua, and tried:
lua filename.lua
but I get the following error
...
0
votes
1
answer
76
views
MacOS Where can I find what was in /usr/etc?
I recently was trying to reinstall all of the Homebrew libraries and accidentally deleted /usr/etc instead of /usr/local/etc using rm -rf. When trying to reinstall torch-rnn, I got this error:
...
1
vote
1
answer
1k
views
Lua error in package.lua at line 80: module 'Module:No globals' not found
I have installed MediaWiki and am now finally getting to import/export templates from wikipedia to make it shinny like a door knob. However I am running into this road block: Lua error in package.lua ...
0
votes
1
answer
1k
views
Lua script can't find files on new Windows 10 device
I've been trying to set up a co-op emulator experience with some friends (emu-coop and bizhawk-co-op are two different ones that both exhibit the same symptoms). On my old computer, the download and ...
0
votes
0
answers
106
views
Failed installing luarocks in windows 8.1
I want to install Luarocks on my pc windows 8.1.
I run command prompt as administrator without success !
I receive this message :
Any advice ?
0
votes
1
answer
339
views
How to develop awesome WM rc.lua using IDE
I'm aware that awesome includes its own Lua interpreter but developing a large rc.lua file with a "simple" text editor is too troublesome.
Is there a way to develop the rc.lua in an IDE like ...
0
votes
1
answer
279
views
How to handle email duplicates during message copying using Imapfilter
How copy messages between two IMAP servers and skip messages that already exist in the target mailbox?
I am trying to implement copying using imapfilter but the issue is that each run I get a number ...
2
votes
1
answer
2k
views
E: Couldn't find any package by regex 'lua5.3'
I have a new Debian Jessie machine, but when I try to install Lua (5.3) through apt I get this error:
Reading package lists... Done
Building dependency tree
Reading stateinformation... Done
E: Unable ...
0
votes
0
answers
372
views
I need an awful rule (awesome-wm 4.X) to match a web browser javascript dialog
I need help creating a rule to match a javascript dialog window, here is a portion of the output from xprop:
...
WM_CLASS(STRING) = "wb", "Wb"
WM_ICON_NAME(STRING) = "JavaScript - http://localhost/...
2
votes
0
answers
1k
views
Cannot create process: proc_open: failed to open stream: Permission denied
I've seen this question posted around with no solution. And I've seen other posts that are related (one two) but don't help.
Permissions are set, executable, ownership is set, no SELinux, PHP can ...
1
vote
0
answers
451
views
Windows luarocks
I have run out of patience with this problem and have turned to this community for help. I am trying to install luafilesystem and luacheck from luarocks and am only getting errors with anything I try.
...
0
votes
1
answer
65
views
Text burned into mac screen after leaving infinite print loop for 15 minutes! (Pico-8)
I was at school, and I ran a program which would infinitely print a number, each time increasing it by .5. I wrote it in pico-8, a retro computer simulator, where you can write code in Lua. I left it ...
0
votes
1
answer
604
views
How can I add lua support to grub2, or at least file copy functionality?
I am trying to add lua support to grub2 and having a devil of a time finding info on how to do that.
The links provided in the answer to (String manipulation in Grub2) no longer have any lua ...
3
votes
0
answers
2k
views
Is it possible to copy files with grub2 scripting?
I am trying to work out a few details for a dual boot, public use (i.e. public library context) that runs Windows 7 and Linux.
I am using Windows 7 and Linux Mint. Windows 7 runs on a VHD file (...
0
votes
1
answer
109
views
Strange issue with UDL2.0 (notepad++) regarding numbers at the end of strings
I'm currently at the tail end of writing some custom syntax highlighting for a language that is a mixture of lua and xml (don't ask). As it's lua contained within xml nodes, lua code is required to be ...
1
vote
0
answers
78
views
Can I interact with background software?
I am using Unified Remote to run windows commands from my phone. Example start program, close program, fullscreen VLC, pretty much anything you can think of. It runs via a server installed on the PC, ...
0
votes
1
answer
1k
views
Play music on Asterisk without blocking extension
I'm writing an Asterisk dialplan using Lua.
First, I'm reading a sequence of numbers then I send a HTTP Post to a webservice. I would like to play some music to the user while the script performs the ...
0
votes
2
answers
317
views
How to launch a lua server?
I wanted to know how to launch a lua server. I found a game I'd like to play with friends, though we do not know how to start the server that is .lua.
The game is here. Could you help us please?
3
votes
2
answers
3k
views
Awesome WM : How can I write a rule to make a window appear floating under the mouse?
I am using a clipboard manager and I would like to see it appear just under the mouse when I press a shortcut key.
I have written different rules for awesome wm, I see how to focus the good client, ...
1
vote
1
answer
1k
views
Installing luabind on Ubuntu
So I've been looking on the internet for a moment and found nearly no tutorial, or good instructions on how to install luabind. I found that I need to have boost and lua 5.xx installed to install it; ...
6
votes
2
answers
9k
views
How to take screenshot(using selection) in awesome wm via scrot
Tried:
awful.util.spawn("scrot -s")
awful.util.spawn("urxvt -e \"scrot -s\"")
os.execute("scrot -s")
and all possible combinations even with sleep.
Also tried daemonize.
Nothing works =(
P.S. All ...
0
votes
2
answers
343
views
How to install luadoc
I am trying to install luadoc.
Running the command make targeting the Makefile does not make any effect. make: Nothing to be done for '/Users/ernestbofill/.luadoc/Makefile'.
I have lua installed via ...
1
vote
0
answers
38
views
Run a script with Apache2 in a certain directory
I am trying to run WebMCP on an Apache2 server. It's got 2 executable files, which I have in /opt/webmcp/cgi-bin/webmcp.lua and /opt/webmcp/cgi-bin/webmcp-wrapper.lua
If I run the wrapper from a ...
0
votes
1
answer
459
views
How do I write an imapfilter "does not contain" email rule please?
I've recently installed imapfilter. I have some simple copy and pasted rules that I like, such as this in my config lua file:
results = account1.INBOX:contain_from('git@gitosis.mycompany.com')
...
1
vote
1
answer
163
views
Using convert template from Wikipedia throwing Scribunto error
I imported the convert template (Template:convert) from Wikipedia to use on my Wiki; it throws the following error when used:
Internal Eroror [18eba24f] 2013-07-09 15:00:33: Fatal exception of type ...
4
votes
0
answers
752
views
MonoDevelop can't find .so file in LD_LIBRARY_PATH
I'm making a game using MonoGame and a Linux implementation of LuaInterface. However, whenever I try to build the project, MonoDevelop gives an error saying that it is unable to load liblua5.1.so, ...
0
votes
1
answer
67
views
Building and Using Lua for iMac
I successfully built Lua for my iMac and I can run simple controls in terminal, but I have longer programs I want to run. On Windows, I was able to just double click my sample.lua file and it would ...
4
votes
1
answer
6k
views
Macro hotkey for "Save Image As..." in Firefox?
Relevant PC info:
Windows 7 64bit
Firefox (latest)
Logitech g710+ Keyboard with Logitech Gaming software
Right now, I have to:
Hover over an image
right-click
Click "Save Image As.."
Click "Save" ...
3
votes
1
answer
1k
views
Awesome Window Manager - Open Chromium Developer Tools on Different Screen Than Chromium
I have three screens. One is for URxvt and VIM, another is for Chromium, Firefox, and Opera, and the third is for Chromium's Developer Tools. Below are the rules I've created in my rc.lua in an ...
0
votes
2
answers
1k
views
How might a video website be blocking direct access to the flv/mp4 files?
I've been trying to tinker with making VLC support video websites that aren't included in the default distribution. When I view the source of the video webpage, I am able to extract something that ...
5
votes
6
answers
2k
views
Focus on application when changing workspaces in awesome-wm
I am using archlinux in combination with awesome-wm for quite a while now. I still haven't figured out how to automatically grab the focus on an application when changing workspace through Mod+number.
...
0
votes
1
answer
544
views
Awesome WM buttons stop working
This is an excerp from my rc.lua:
testcfg ={}
testcfg.s = 1
testcfg.widget = widget({type = "textbox", name = "testcfg.widget", align = "right"})
testcfg.widget.text = testcfg.s
testcfg.command = ...
17
votes
1
answer
2k
views
Awesome-wm a signal to rise client when focus received
I've got my Emacs running on a tag worker with server-start launched. I have a file manager opened somewhere else (another monitor for example) and when I open a text file with emacsclient it ...
0
votes
2
answers
2k
views
How to setup and use lcurses (curses for Lua)?
I'm not very good at manual installation. I want to use lcurses, a binding of curses for Lua in a program, with require('curses'). When I run make in the lcurses directory, there is an error ...
2
votes
3
answers
9k
views
Awesome Window Manager - Rule assigning programs to tags
I have a set of tags 'main', 'www', and 3:
-- {{{ Tags
tags = {
names = {"main", "www", 3},
for s = 1, screen.count() do
tags[s] = awful.tag(tags.names, s, tags.layout)
end
}
-- }}}...
1
vote
1
answer
726
views
Can't install lua on Mac 10.6.4
I uccessfully installed MacPorts on Mac 10.6.4 but I can't install lua. I know MacPorts is installed because from my Administrator account I can successfully execute 'port selfupdate' and 'port search ...
1
vote
1
answer
968
views
Linking to lua libraries w/ codeblocks on linux
After I downloaded the source for lua, I followed the install instructions, doing...
make linux install
make generic install
I've also done the make test and it passes, printing out Hello World, ...
0
votes
2
answers
1k
views
I want to replace a number with successive numbers, starting at 1 and going up
I'm aware that this is something people can easily program, but I'm not familiar with those things, so I was hoping there was an easier solution.
I've edited a large database of questions, including ...
0
votes
1
answer
1k
views
How match 'other' applications to a tag in awesome-wm?
I use version 3.3.4 of awesome and it is fine. But I miss one thing I could do with an older version of awesome (without configuration via Lua): I could add a matcher with the regular expression .* to ...