Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 05 17:56
    awa5114 commented #1423
  • Jul 05 17:43
    awa5114 commented #1423
  • Jul 05 09:03
    awa5114 commented #1423
  • Jul 05 09:02
    awa5114 commented #1423
  • Jul 02 10:16
    alerque commented #1424
  • Jul 02 10:07
    SyntixTheReal closed #1424
  • Jul 02 10:07
    SyntixTheReal commented #1424
  • Jul 02 10:06
    SyntixTheReal commented #1424
  • Jul 02 10:03
    SyntixTheReal commented #1424
  • Jul 02 10:02
    SyntixTheReal commented #1424
  • Jul 02 10:02
    SyntixTheReal commented #1424
  • Jul 02 10:02
    SyntixTheReal commented #1424
  • Jul 02 09:55
    SyntixTheReal opened #1424
  • Jul 01 19:24

    hishamhm on master

    Release 3.9.1 Merge branch '3.9.1' (compare)

  • Jul 01 19:23
    hishamhm closed #1380
  • Jul 01 19:23
    hishamhm commented #1380
  • Jul 01 19:22
    hishamhm unlabeled #1407
  • Jul 01 19:22
    hishamhm closed #1407
  • Jul 01 19:20
    hishamhm commented #1414
  • Jul 01 19:19
    hishamhm commented #1417
Hisham Muhammad
@hishamhm
apt install cqueues shouldn't have been necessary, apt install m4 would have been sufficient
EduardasMeile
@EduardasMeile
@hishamhm Hello. Can you comment on the state of the Keplerproject codebase? I saw you had commits there. Me and my colleagues are using this stuff in production, but have concerns about things like WSAPI being dead projects.
solares
@solares

apt install cqueues shouldn't have been necessary, apt install m4 would have been sufficient

Thanks for the tip.

Hisham Muhammad
@hishamhm
@EduardasMeile some of the projects are indeed abandoned and looking for maintainers. I try to help out merging PRs and the like for projects for which I have commit access and some familiarity, but indeed there is no active development/roadmap for various of these projects.
Some orphaned Lua projects are now finding a new home at https://github.com/lunarmodules where a team of volunteers are helping to give a baseline of maintenance to them. Help is definitely welcome there! Also, if you're wondering about the status of any particular project in the keplerproject repo, I recommend opening an issue asking about it and seeing if you get a response (I don't know the exact status of each single project myself)
EduardasMeile
@EduardasMeile
@hishamhm Thank you for answering. Do you know if there is a reasonable replacement for WSAPI in the lua ecosystem that is actually being maintained? What is the preferred way of integrating a Lua web app with nginx (it does not support CGI natively)? The only way I got some WSAPI-based scripts to work with nginx is by using fcgiwrap and FastCGI. Perhaps you know of a better alternative?
Hisham Muhammad
@hishamhm
@EduardasMeile specifically about WSAPI, not that I'm aware of. I know that cgilua is used in production at PUC-Rio, so it continues to be maintained. As for alternatives, OpenResty is a currently-maintained package for running Lua+nginx (which includes its own nginx distribution), but it uses a different API, so your scripts would probably have to be ported over.
EduardasMeile
@EduardasMeile
@hishamhm Perhaps I am interpreting it wrong, but it really sounds like doing web apps specifically in Lua in 2021 is a bad idea?
We use Lua at my dayjob on embedded systems because of the small interpreter size and that is why WSAPI and such have been used historically.
but Xavante has no SSL support as far as I know
so we have recently started looking into a replacement
Hisham Muhammad
@hishamhm
OpenResty is actively maintained, and it's used in large projects such as Kong ( konghq.com ) — if your embedded system is big enough for nginx, it should be able to handle OpenResty.
EduardasMeile
@EduardasMeile
@hishamhm Isn't OpenResty more about extending nginx and making the webserver itself scriptable rather than writing more general Lua web apps?
Hisham Muhammad
@hishamhm
from what I can tell, it isn't lower level than WSAPI...
looks like there was even a bridge once: https://github.com/ignacio/wsapi-openresty
EduardasMeile
@EduardasMeile
unlike regular nginx that has a bitbake recipe, I'd need to make this cross-compile myself somehow, which might turn out to be a non-trivial task
a lot of projects do not support cross-compilation properly (nginx included) and need to be patched
also, as a sidenote, after porting some Lua libraries to Yocto/Openembedded (writing bitbake recipes for them) I have become convinced that almost all Lua projects do not care about cross-compilation. All of their custom make files need to fixed in one way or another.
Things like the WSAPI configure file wants to run "which lua" that is not appropriate in a cross-compilation context
and so on
much of this could be avoided if projects used GNU Autotools or CMake instead of custom Makefiles
as these encourage to write projects in a manner that suits cross-compilation better
EduardasMeile
@EduardasMeile
though at the end of the day one can always mess up, no matter the build system
@hishamhm just out of curiosity: has cross-compilation ever come up as a topic when developing Luarocks?
Hisham Muhammad
@hishamhm
@EduardasMeile yes, that's one of the reasons why there are dozens of configuration variables in LuaRocks's config file format and virtually every setting is a moving part. The dependencies for the luarocks.exe binary for Windows are built using LuaRocks on a Linux machine, for example. The capability is there, it's just not user-friendly (you have to know what values to set on those configuration variables).
EduardasMeile
@EduardasMeile
@hishamhm What would be your ideal webserver + lua web framework combination for implementing a web app on an embedded Linux device these days?
Excluding LuCI + uhttpd on OpenWrt as that is too OS-specific
I am kind of thinking now that perhaps nginx might not have been a good choice for a Xavante replacement if one wants to still use lua
Hisham Muhammad
@hishamhm
asking the wrong person, sorry. I haven't done web apps in a long long time
EduardasMeile
@EduardasMeile
@hishamhm perhaps you know a lua web app guru who is an authority in this field and I could actually ask?
Hisham Muhammad
@hishamhm
try the Lua mailing list, perhaps?
EduardasMeile
@EduardasMeile
@hishamhm as a sidenote, I have spent some time on the #lua channel on freenode and as far as I can tell no one is really working with lua web apps or WSAPI these days
or the people working with this stuff maintain legacy applications and don't really participate in community discussions
HarryC145
@HarryC145

Hi all, trying to get LuaRocks working on MacOS
`sh-3.2# luarocks --lua-dir /usr/local/bin --lua-version 5.1 config variables.LUA_LIBDIR /usr/local/lib/
Wrote
variables.LUA_LIBDIR = "/usr/local/lib/"
to
/var/root/.luarocks/config-5.1.lua
sh-3.2# luarocks --lua-dir /usr/local/bin --lua-version 5.1 config variables.LUA_INCDIR /usr/local/include/
Wrote
variables.LUA_INCDIR = "/usr/local/include/"
to
/var/root/.luarocks/config-5.1.lua
sh-3.2# luarocks --lua-dir /usr/local/bin --lua-version 5.1 install luasocket
Installing https://luarocks.org/luasocket-3.0rc1-2.src.rock

Error: Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.`

I'm setting the variables, it's successfully writing them but then doesn't appear to be reading from them. Any ideas please?
Pierre Chapuis
@catwell

What would be your ideal webserver + lua web framework combination for implementing a web app on an embedded Linux device these days?

I don't have an ideal reco but look if you can find something you like in my bookmarks -> https://pinboard.in/u:catwell/t:lua/t:web

Hisham Muhammad
@hishamhm
@HarryC145 the issue is setting --lua-dir /usr/local/bin: --lua-dir expects a "prefix dir", not a "bin dir". By setting a new prefix, this overrides the entire configuration of Lua paths (including bin, lib and include). You can check the results by running luarocks --lua-dir /usr/local/bin config vs. luarocks --lua-dir /usr/local config and seeing how the variables are affected.
in short, --lua-dir /usr/local should do the trick for you, and if you're setting the proper paths using luarocks config, then you shouldn't need to explicitly pass --lua-dir anymore
nepta
@Nepta
hello there
anyone know how to manage multiple version of lua with luarocks ? (in particular having lua5.3 and luajit)
nepta
@Nepta
i am using luaver already to manage my version, but it's weird, i think it want reinstall luarocks when you change your lua version ?
nepta
@Nepta
ok, i think i managed something
by having a config-5.1.lua in etc/config/ with correct variable to point to luajit binary / lib i can use luarocks --lua-version 5.1 to make it manage my luajit config
now i only need to make a wrapper to set the correct LUA_PATH / LUA_CPATH when using luajit
lol main function has more than 120 local variables
hisham_hm
@hisham_hm:matrix.org
[m]
@Nepta you can use the flag --lua-version 5.x, or luarocks --local config lua_version 5.x to set the default permanently
nepta
@Nepta
yes, it's what i use currently
but, to be honnest i did have some issue because i use luavela instead of the standard luajit
and it seem that luarocks have the names hardcoded when looking for the binary (either lua5.1 or luajit)
for now, i adding table.insert(names, "luavela) in util.lua work for me, but i am not familiar enough with luarocks config file, is there a way to add it in config-5.1.lua in some way ? it seem to have a field for it (lua_interpreter)