Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:01
    daurnimator commented #1369
  • 04:17
    XVilka commented #1369
  • Dec 02 01:47
    arichard4 commented #1370
  • Dec 01 14:20
    rboy1 commented #1287
  • Dec 01 11:24
    siffiejoe commented #1287
  • Dec 01 07:12
    Tieske commented #1287
  • Dec 01 06:17
    scls19fr commented #1359
  • Dec 01 00:14
    licktheroom commented #1359
  • Nov 30 17:07
    rboy1 commented #1287
  • Nov 30 17:03
    rboy1 commented #1365
  • Nov 30 07:05
    hishamhm commented #1370
  • Nov 30 07:05

    hishamhm on master

    Improve performance of reading … (compare)

  • Nov 30 07:05
    hishamhm closed #1370
  • Nov 30 07:01
    hishamhm commented #1369
  • Nov 30 06:57
    hishamhm closed #1366
  • Nov 30 06:57
    hishamhm commented #1366
  • Nov 30 06:54
    hishamhm closed #1365
  • Nov 30 06:54
    hishamhm commented #1365
  • Nov 30 06:45
    hishamhm closed #1361
  • Nov 30 06:45
    hishamhm commented #1361
haywhnk
@dauuricus
(lua) xml has done :)
luarocks imstall xml STDCPP_LIBDIR=/system/lib
haywhnk
@dauuricus
uunnh
cqueues case :
i cant get that error message '...unix'
gcc -O2 -std=gnu99 -fPIC -g -Wall -Wextra -Wno-missing-field-initializers -Wno-initializer-overrides -Wno-unused -Wno-dollar-in-identifier-extension -O2 -fPIC -DLUA_COMPAT_APIINTCASTS  -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -I"/data/data/com.termux/files/usr/include" -I"/data/data/com.termux/files/usr/include" -DCOMPAT53_PREFIX=cqueues -DCQUEUES_VENDOR='"quae@daurnimator.com"' -DCQUEUES_VERSION=20200726L  -c -o /data/data/com.termux/files/usr/tmp/luarocks_cqueues-20200726.53-0-6994475/cqueues-rel-20200726/src/5.3/cqueues.o /data/data/com.termux/files/usr/tmp/luarocks_cqueues-20200726.53-0-6994475/cqueues-rel-20200726/src/cqueues.c
/data/data/com.termux/files/usr/tmp/luarocks_cqueues-20200726.53-0-6994475/cqueues-rel-20200726/src/cqueues.c:47:10: fatal error: 'lua.h' file not found
#include <lua.h>
         ^~~~~~~
1 error generated.
18 replies
haywhnk
@dauuricus
but http has other problem.i tried few days before on chromebook armcore on contenair linux.
'http' problem is 'sa' file.
same as Nim on termux case.
nim-lang/Nim#18520
haywhnk
@dauuricus
i wrote http simple request code but erorr was same as Nim on termux. sa <-- X ,ca
EduardasMeile
@EduardasMeile
hello. Can anyone explain to me why lua-cjson .so file as packaged by Debian and Ubuntu does not need to link to liblua.so ?
```
eduardas@eduardas-Battlestation:/usr/lib/x86_64-linux-gnu$ ldd liblua5.1-cjson.so.0
        linux-vdso.so.1 (0x00007fff7f3cd000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3435d4c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3436167000)
Am I wrong for using the -llua flag when building my own Lua binding .so files?
EduardasMeile
@EduardasMeile
Same for the binaries provided by Luarocks like luaposix.
eduardas@eduardas-Battlestation:~/.luarocks/lib/lua/5.3/posix$ ldd stdio.so
        linux-vdso.so.1 (0x00007ffec7cbf000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f09df2a0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f09df4b8000)
EduardasMeile
@EduardasMeile
eduardas@eduardas-Battlestation:~/.luarocks/lib/lua/5.3/posix$ nm -gD stdio.so
                 U ctermid
                 w __cxa_finalize
                 U __errno_location
                 U fclose
                 U fdopen
                 U fileno
                 w __gmon_start__
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
                 U lua_createtable
                 U lua_getfield
                 U lua_gettop
                 U lua_isinteger
                 U luaL_argerror
                 U luaL_checklstring
                 U luaL_checkudata
                 U luaL_checkversion_
                 U luaL_fileresult
                 U luaL_setfuncs
                 U lua_newuserdata
0000000000001860 T luaopen_posix_stdio
                 U lua_pushfstring
                 U lua_pushinteger
                 U lua_pushnil
                 U lua_pushstring
                 U lua_setfield
                 U lua_setmetatable
                 U lua_settop
                 U lua_tointegerx
                 U lua_tolstring
                 U lua_type
                 U lua_typename
                 U rename
                 U __stack_chk_fail
                 U strerror
hisham_hm
@hisham_hm:matrix.org
[m]
Lua modules packaged by Debian are not built with LuaRocks, and I believe they do not contain LuaRocks metadata, so they are not compatible with LuaRocks either
EduardasMeile
@EduardasMeile
@hisham_hm:matrix.org That was not my point. My point was that neither the Luarocks .so files nor the Debian .so files for Lua modules would link to liblua.so
But after asking around on the lua channel at libera.chat people pointed out that Lua modules that get loaded by a lua script do not really need to be linked to liblua.so to work
Though most distros have a liblua.so
hisham_hm
@hisham_hm:matrix.org
[m]
The runtime linker resolves the symbols once the Lua VM loads the module
liblua.so serves another purpose, it is to link the Lua VM into applications
EduardasMeile
@EduardasMeile
Supposedly the distro liblua.so is intended for applications that want to execute Lua scripts themselves, i.e. have an embedded interpreter.
@hisham_hm:matrix.org yes, that is what I was told, but that was not obvious to a Lua novice such as I
hisham_hm
@hisham_hm:matrix.org
[m]
That's correct!
EduardasMeile
@EduardasMeile
I think there are quite a few tutorials around for Lua bindings where people do an -llua flag for a custom module even though they don't need to
@hisham_hm:matrix.org Just out of curiosity: does Luarocks ship its own liblua.so for apps or libraries that need an embedded Lua VM?
hisham_hm
@hisham_hm:matrix.org
[m]
No, LuaRocks is just the package manager, not a distribution of the Lua VM itself
EduardasMeile
@EduardasMeile
@hisham_hm:matrix.org thank you for answering. this is useful to know
Matthieu Coudron
@teto
I am trying to install https://luarocks.org/modules/openresty/lua-cjson/2.1.0.6-1 with as luarocks config lua_modules_path = ".". At the end I move the copy_directories back at the root of the tree to mimic a vim plugin (I am working on using luarocks to install neovim plugins). The copy fails because the installed copy_directories contains a bin folder but https://luarocks.org/manifests/openresty/lua-cjson-2.1.0.6-1.rockspec doesn't list a bin folder ? the bin folder is listed in a rock_manifest file though. (using luarocks 3.7). Any idea as to why ?
build.install.lua and copy_directories folders are installed in the same folder then ? Is there a configuration entry to change that path ?
➜ ls /nix/store/87fb1fncnbnm105rbc8ndapy5qwpjxmi-lua5.2-lua-cjson-2.1.0.6-1/lua-cjson/2.1.0.6-1/
files
bin/                          lua-cjson-2.1.0.6-1.rockspec  rock_manifest                 tests/
Matthieu Coudron
@teto
luarocks make --help exposes a --no-manifest option but it doesn't used afterwards. src/luarocks/cmd.lua has if args.no_manifest then cfg.no_manifest = true end but I can't find a way to turn the flag off, it always says Error: unknown option '--no-manifest' in luarocks --no-manifest make ... (3.7)
Hisham Muhammad
@hishamhm
@teto this sounds like a bug! could you file an issue? thank you!
william behrens
@WilliamBehrens_gitlab
Is there an enviroment variable I can change so that luarocks install installs modules in a different directory
like how gem has GEM_HOME
Pierre Chapuis
@catwell
@WilliamBehrens_gitlab An env var I don't think so, but you can pass the flags --lua-dir and --tree (or at build time --with-lua to configure).
Thore Strassburg
@weilbith
Hey :wave:
I just started to setup my first project using Luarocks (v3.7.0). I set the rockspec_format to version 3.0 (though this should not matter, as this appears to be the same since 1.0). My problem is now that I'm not able to set version to a version that uses the semantic version scheme. According to the sources of Luarock, a version scheme matching [%w.]+-[%d]+ is expected. I don't know the naming of this version scheme and I fail to find it so I could read up how this scheme works. So I started to browse the registry at luarocks.org to see how version strings look in practice. But I only see semantic versioning everywhere. Also if I check the rocks their sources rockspec, they just have plain semantic version strings. I thought they might just ignore the errors of luarocks lint <rockspec_file>. But also if I run other commands like luarocks test I get always this error that my version is not correctly formatted.
It seems like all theses projects have in common that they don't specify rockspec_format. But then the default is 1.0 and it doesn't change anything. So is it about the the luarock version itself and this was a breaking change in a more recent version?
hisham_hm
@hisham_hm:matrix.org
[m]
Hi! The version key really means your project's version, dash, your rockspec's revision. So if you're using SemVer and your project is version 2.5.1, use version = "2.5.1-1". The revision suffix is for when you need to make changes to the rockspec itself but not to your project.
The rockspec_format entry is at "3.0" because there were additions to the format in LuaRocks version 3; for example test_dependencies. So, if you write a rockspec without a rockspec_format key you can't use some newer features, but your rockspec will work on older LuaRocks installations.
Thore Strassburg
@weilbith
Nice. Thank you very much for the help! It works now. :pray:
Thore Strassburg
@weilbith
Stupid question, but am I supposed too add dependencies by hand in the rockspec file or is there a command similar to cargo add or yarn add. Just that I don't start do stupid things... :laughing:
hisham_hm
@hisham_hm:matrix.org
[m]
yes, you can write them directly in the file
Thore Strassburg
@weilbith
Sorry to continue asking question so fast here. But is there any tooling to execute binaries of installed rocks depending on your evironment? Means if the rock is installed in your local project, it uses the binary from ./lua_modules/bin/<binary>, else it checks the user its module tree etc. Like for example npm exec. I'm trying to figure out how to tell my IDE which busted executable to use to run my tests. I would like to avoid custom functionality around it to check if this path exist or this or this, if luarocks knows all the trees and their order.
Thanks for helping me out so quick!
ben.txt
@bentxt
Hi, also sorry for asking questions without much introduction. But as I wanted to create an issue on github.com/luarocks there is a reference to this gitter chat, so I want to give it a shot. I want to install UTF-8 with luarocks this way luarocks install --check-lua-versions lua-utf8. The installation fails due to a missing lua5.4 installation: "Error: No results matching query were found for Lua 5.4.”. But the thing is: I have Lua5.4 installed. lua -v Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio
Thijs Schreijer
@Tieske
my guess would be that the utf8 rockspec doesn't list 5.4 as a compatible version
ben.txt
@bentxt
thanks for the suggestion, I think the problem was actually simpler, I just wrote the rock name wrongfully as ‘lua-utf8’ instead of the correct name ‘luautf8'
Wangmd1994
@Wangmd1994
IMG_0017(20211101-134455).PNG
the alpine output Illegal instruction when run ./luarocks init
hisham_hm
@hisham_hm:matrix.org
[m]
@weilbith There is a luarocks path command which outputs the environment variables needed to set the path, but no direct equivalent to npm exec
Wangmd1994, according to the screenshot you're building luarocks from sources, so that's pure Lua code. this means that the illegal instruction is coming not from luarocks but from something it is calling, such as the lua interpreter or some other command. You probably have an incompatible binary in your PATH.
Wangmd1994
@Wangmd1994
Yes,My lua interpreter is LuaJit,contains Lua.h。This was downloaded automatically by building Neovim,if I have an incompatible binary in my PATH,Do I need to download Lua?if Idownload lua,an error occured with the missing header file。
Mengyao Bie
@DrAugus
image.png