LuaJit increase stack/heap size

I keep getting a out of memory error in LuaJit. How do I increase the stack or heap size? Thanks

How link .obj files in Visual Studio?

My problem is: I have compiled LuaJit with VisualStudio and its genereated a .Obj file, a dll and .lib file. i just want to link the .obj file in my win32 application to generate a single EXE...

How create a debugger for self-made language?

I wanna build a language, but I think that to be useful it need at least a REPL and a debugger. How incorporate a debugger is the thing that look like magic to me. I remember how great the old...

Installing luarocks to use both lua5.1 and luajit on Ubuntu

I want to be able to run something like luarocks-jit install X and have the newly installed rock use luajit as it's interpreter. Ultimately, I'm trying to run my busted tests through...

Lua ignore Escape Sequence

Currently Lua has the following Escape Sequences: \a: Bell \b: Backspace \f: Form feed \n: Newline \r: Carriage return \t: Tab \v: Vertical tab \\: Backslash \": Double quote \': Single...

How do I convert a lua string to a C char*?

I've used the luajit ffi library to wrap a C library that contains a function to draw text on a ppm file: void drawText(frameBuffer *fb, int px, int py, char* text, pixel color) When I try to...

Getting all functions in a Lua script

I'm trying to figure out a way to get all functions in a Lua script. This script has been compiled into a function through loadfile. For example, I'd want to get every function defined in the...

Openface Flask Wrapper: Flask seems to be blocking a thread

I am trying to write a small flask REST API wrapper around the openface api so that I can POST image URLs to my flask server and have it run a comparison of the image against a classifier...

How to read large files (>1GB) in lua?

I am a novice at Lua (use it for the Torch7 framework). I have an input feature file which is about 1.4GBs in size (text file). The simple io.open function throws an error 'not enough memory' on...

Torch7 - Logistic Regression using GPU - CUDA/cudnn

I have used the logistic regression from the Torch7 example in their website but the code doesn't use GPUs:...

LuaJIT FFI load dll error

I want to code some functions in C to use in Lua and the easiest way to do this I think I can find is using LuaJIT's FFI. I have a C file "add.c": int add(int a, int b){ return a+b; } I assemble...

Can LuaJIT be faster than C?

Is there a scenario where the LuaJIT might be executing code even faster than C? After searching I found some people talking about the fact that it can at least rival the C-code, but I have never...

error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory

I'm trying to set up the environment of deepmind/dqn, https://github.com/deepmind/dqn, I run ./install_dependencies.sh to install LuaJIT and Torch 7.0 nngraph Xitari AleWrap first.But I...

module 'cudnn' not found

Trying to run https://github.com/rtqichen/style-swap th style-swap.lua --content images/content/bike.jpg --style images/style/starry_night.jpg { gpu : 0 saveOriginal : false style :...

How to install Lua modules (json, uuid, etc...) for wrk2

I've installed wrk2 through homebrew on Mac OS. (https://github.com/giltene/wrk2/wiki/Installing-wrk2-on-Mac) I am able to run the wrk2 command and simple load tests work fine. However I want to...

Is there a way to introspect a function in Lua?

I am creating a game in love2d (LuaJIT) and I am creating a debug window for changing values at runtime. I was able to do that, however, I also now want to be able to call functions. For example,...

Trying to create a discord bot with Discordia and Lua but the kick command keeps crashing it

I'm trying to write a Discord bot with Lua and the Discordia library. I've been trying to implement a way for it to check whether the person running the command has a role to do so. The id for...

NGINX rate limitting by decoded values from JWT token

I have a question regarding NGINX rate limiting. Is it possible to do rate limiting based on the decoded value of JWT token? I cannot find any information like this in the docs. Or even if there...

Modifying a C++ array in main() from Lua without extra allocation

I am sketching a small C++ program that will pass arrays to Lua and have them modified there, where I intend to have a lua script read in the program so I can modify it without needing to...

How to install modules to Luajit using Luarocks

I managed to install luasocket and works fine using lua5.3 but i can't find the way to install them to require from luajit. If i write print(_VERSION) it shows luajit use lua5.1. This is the stuff...

module 'resty.http' not found: while resty is installed

I am facing an issue while testing a sample code using resty cli. Please find the output of related commands: $ which resty /usr/local/bin/resty $ which openresty /usr/local/bin/openresty $ resty...

Snort 3.0 Error: Could not find requested DAQ moduel: pcap

I am trying to install Snort 3.0 on an Ubuntu 20.04 desktop. I'm using the manual as a guide for this install. Everything went well and it seems the install went fine, however, at page 6, to test...

Lua 5.3 is installed, but I can't locate the correct lua.h

I am trying to install some luarocks packages but it seems that although lua5.3 is installed, the relevant headers are not $ which lua /usr/bin/lua $ lua -v Lua 5.3.3 Copyright (C) 1994-2016...

how to add lua-cjson to my nginx lua container?

I am using this docker-compose to create a Lua supported Nginx: version: '3.9' services: nginx: container_name: local_nginx image: fabiocicerchia/nginx-lua environment: -...

nvim and vim not recognized after upgrade to nightly

in the attempt of upgrading nvim NVIM v0.4.4 Build type: Release LuaJIT 2.1.0-beta3 Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-u4YhjF/neovim-0.4.4=. -fstack-protector-strong...

Checking for rbenv shims in PATH: found at wrong position

I try to check my rbenv problem with using its rbenv-doctor command ; curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash I get this; Checking for `rbenv' in...

How to install neovim 0.5.0 with homebrew Brewfile?

How can I install neovim 0.5.0 with Brewfile? I previously used brew install neovim --HEAD to get the latest build of neovim. As I have migrated to use Brewfile, this is the code I use for...

How to combine two shell.nix files?

I have the first shell.nix file: { pkgs ? import ./nix { } , useClang ? false , ae_name ? "ae" }: with pkgs; (if useClang then tvb.aeClangStdenv else tvb.aeGccStdenv).mkDerivation rec { name =...

Lua: '<name>' expected near '('

I've trying to modify some lua files and this particular one shows me an error compiling luajit: .\decoded\resources\scripts\app\clover_bg.lua:496: '<name>' expected near '(' slot1 = { ...

nvim with coc and formatting for python

I've been trying to move to nvim as my code editor, but I've been having issues with using the code formatting. For now I want to set it up for python and every time I tried to perform a format...

Relevant tags