• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Official Lua Forum GitHub (1 Viewer)

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
93
Reaction score
32
Location
Victoria BC
Website
winlua.net
I thought a GUI for LuaRocks would be fun?

I have a prototype of a NoSQL database for Lua? That's a cool project I'd like to see go somewhere.

There is an MIT licensed PGP library written in C that has Lua bindings. I sort of got that to build on windows with xmake. I wanted to build PGP into the lua interpreter (lua.c) so you could create Lua executables that would only run scripts signed with a specific key.

MinecraftRunner - In order to run instances of Minecraft server on Linux, you need to run them in `tmux` or `screen`, which is a PIA. I used a ptty shell, a web socket socket server and a loop engine (cqueues) to search the web for a specific minecraft server jar file, download it and start and instance playing. Admins can then manage the game instance through a web page. This could be extended to manage multiple instances of Minecraft and create custom instances of a minecraft server (e.g. download and configure minecraftforge and specific mods). This would be really cool if we used Fengari as well.

I found a game engine that needs Lua extensions? This would require CMake, swig and some custom code to rebuild the API when it changes - rokups/rbfx

Someone on the forum had some custom Lua bindings for low level driver stuff. It would be hecka-neat to create a game?
 

Sorn

Administrator
Staff member
Joined
Jan 6, 2020
Messages
32
Reaction score
11
I thought a GUI for LuaRocks would be fun?

I have a prototype of a NoSQL database for Lua? That's a cool project I'd like to see go somewhere.

There is an MIT licensed PGP library written in C that has Lua bindings. I sort of got that to build on windows with xmake. I wanted to build PGP into the lua interpreter (lua.c) so you could create Lua executables that would only run scripts signed with a specific key.

MinecraftRunner - In order to run instances of Minecraft server on Linux, you need to run them in `tmux` or `screen`, which is a PIA. I used a ptty shell, a web socket socket server and a loop engine (cqueues) to search the web for a specific minecraft server jar file, download it and start and instance playing. Admins can then manage the game instance through a web page. This could be extended to manage multiple instances of Minecraft and create custom instances of a minecraft server (e.g. download and configure minecraftforge and specific mods). This would be really cool if we used Fengari as well.

I found a game engine that needs Lua extensions? This would require CMake, swig and some custom code to rebuild the API when it changes - rokups/rbfx

Someone on the forum had some custom Lua bindings for low level driver stuff. It would be hecka-neat to create a game?
I like the PGP idea. What use cases do you see there? I have some ideas, but I want to hear yours.
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
93
Reaction score
32
Location
Victoria BC
Website
winlua.net
Many moons ago someone on the Lua mailing list had asked about encrypted Lua scripts. PGP fits that bill nicely. You could use it for embedding Lua in an application, or even as a shell interpreter like lua.exe.

For the un-initiated. Pretty Good Protection is an asymmetric hashing method. PGP can be used to either encrypt the message or create a hash that validates the message (signing). The encryption/signing is done with the *private* key. Once the file is hashed, one distributes public keys to whomever they want to read or validate the message. If you are trying to keep secrets (encryption), you keep the public keys safe. If the purpose is to validate that the message is authentic, you leave the file unencrypted but include the hash with your message and give people a secure way to get your public key.

So, the use cases are varied depending on what you want. You could either encrypt the lua files or you could hash the files. One could embed the private key in the application or not. However, embedding the private key is not really all that much better because one could just decompile the application with Ghidra and find the blob. Either way, if you want your system to be really secure you need to protect your application with permissions. BUT, that's for the super paranoid. I can't remember if you can set an expiry on PGP keys.

SO ya, the use cases are many from a strictly Lua stand point. But you could even use a PGP library for a licensing system. Again, the PGP private key would be embedded somewhere. The application would collect entropy from the code. A license key would simply be a value or string that would satisfy some hash with the entropy gleaned from the application.

GNUPGP is pretty much the gold standard for PGP but it's GPL licensed so you can't embed it in anything proprietary. That's where NetPGP comes in because it's MIT licensed. NetPGP it's not cross platform to windows and it uses autotools for configuration, which makes it a pain. NetPGP is totally cross platform on Linux and we might be able to get autotools to generate a Windows configuration.

NetPGP can also generate Lua bindings but I never got that working.

What I would like to see is the build system converted over to xmake. xmake has recently been added to LuaRocks as a build system. That means if we can get it to build using xmake and get the Lua bindings working, then the package can be added to LuaRocks, the xmake repo (build recipes), or can be used independently with any Lua, C/C++ application.

I was able to hack together something with xmake some time ago that builds but it segfaults all over the place. It's not just a straight over conversion. I think if I was to try again, I'd try using the autotools again and generate a Windows configuration (if it's possible) and then patch it, THEN look at xmake.

Anyway, I thought the idea was golden, but I mentioned it on the Lua mailing list a couple of times with no takers.
 

damian

Newcomer
Joined
Jan 10, 2020
Messages
8
Reaction score
7
Location
Illinois
Many moons ago someone on the Lua mailing list had asked about encrypted Lua scripts. PGP fits that bill nicely. You could use it for embedding Lua in an application, or even as a shell interpreter like lua.exe.

For the un-initiated. Pretty Good Protection is an asymmetric hashing method. PGP can be used to either encrypt the message or create a hash that validates the message (signing). The encryption/signing is done with the *private* key. Once the file is hashed, one distributes public keys to whomever they want to read or validate the message. If you are trying to keep secrets (encryption), you keep the public keys safe. If the purpose is to validate that the message is authentic, you leave the file unencrypted but include the hash with your message and give people a secure way to get your public key.

So, the use cases are varied depending on what you want. You could either encrypt the lua files or you could hash the files. One could embed the private key in the application or not. However, embedding the private key is not really all that much better because one could just decompile the application with Ghidra and find the blob. Either way, if you want your system to be really secure you need to protect your application with permissions. BUT, that's for the super paranoid. I can't remember if you can set an expiry on PGP keys.

SO ya, the use cases are many from a strictly Lua stand point. But you could even use a PGP library for a licensing system. Again, the PGP private key would be embedded somewhere. The application would collect entropy from the code. A license key would simply be a value or string that would satisfy some hash with the entropy gleaned from the application.

GNUPGP is pretty much the gold standard for PGP but it's GPL licensed so you can't embed it in anything proprietary. That's where NetPGP comes in because it's MIT licensed. NetPGP it's not cross platform to windows and it uses autotools for configuration, which makes it a pain. NetPGP is totally cross platform on Linux and we might be able to get autotools to generate a Windows configuration.

NetPGP can also generate Lua bindings but I never got that working.

What I would like to see is the build system converted over to xmake. xmake has recently been added to LuaRocks as a build system. That means if we can get it to build using xmake and get the Lua bindings working, then the package can be added to LuaRocks, the xmake repo (build recipes), or can be used independently with any Lua, C/C++ application.

I was able to hack together something with xmake some time ago that builds but it segfaults all over the place. It's not just a straight over conversion. I think if I was to try again, I'd try using the autotools again and generate a Windows configuration (if it's possible) and then patch it, THEN look at xmake.

Anyway, I thought the idea was golden, but I mentioned it on the Lua mailing list a couple of times with no takers.
There's so many things I've never heard about in this post that it might just work
 
Top