Skip to content
Advertisement

Tag: lua

Cheking day of the month in lua

So I’ve been configuring my AwesomeWM theme on Linux and I came across this issue. Now I’m not an expert programmer of course so I thought I’d come here to ask for help. I’ve been trying to check if the day of the month is a number from 1 to 9, which will then change the padding of the focused

VLC – Get played file path

I would like to get the path of the file currently played by vlc. It seems that information can be obtained using the http server of vlc. Since I don’t know much about http, I was not able to do it even with the help of the previous link or the vlc documentation. To start an http server, I am

Linker can’t find Lua library definition

So, I’m relatively new to C++ and I’ve been trying to run Lua files in my C++ project. To start off things, I ran this simple code: And the terminal command looks like this: Edit: Corrected to this Lua libraries are installed on my system (Linux), but the linker can’t find the definition for luaL_newstate(), despite the fact that I

Detect if presence of a character in a string with Lua

I can have two types of string: nxs_flo_dev.nexus orfpdesk. I want to test if there is a . in the string. If there is a . I divide the string otherwise I do not do anything. Is there a function to do that? Because .contains() doesn’t work. Answer Use match again. Remember to escape the dot with %.: If you

How to execute lua bytecode genrated by luac on linux

I have a simple lua source code called hello.lua I complied this file to bytecode on a RedHat Linux machine , using Lua5.3.4 as follows: The architecture should be fine I guess. I cant figure what is wrong. Answer Precompiled Lua programs are run exactly the same way as source:

Error while compiling lsnes emulator on ubuntu

I’m currently trying to get the Mario project from https://github.com/aleju/mario-ai to work on my ubuntu (16.04) system. I followed the tutorial and already solved some errors, but now I get something that looks like a compile error on the lsnes emulator and that doesn’t make sense to me. My command is LDFLAGS=”-L/usr/lib -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu” CFLAGS=”-I/usr/include -I/usr/local/include -I/usr/include/lua5.1″ make. I added

Advertisement