how to get used to the lack of data types
I'm coming from python primarily, although I've dabbled in c/c++ and have taken a look at rust. (didn't get very far though lol)
but the lack of built in data types and containers is throwing me for a loop, especial containers, I'm used to having some sort of generic "constructor" may that be through structs or classes or the like, and using those as my primary organization for data.
for example a tile structure that takes a X and a Y and a color, i know this sort of thing is possible but from what i've seen its kind of difficult
https://redd.it/1eoebdl
@r_lua
I'm coming from python primarily, although I've dabbled in c/c++ and have taken a look at rust. (didn't get very far though lol)
but the lack of built in data types and containers is throwing me for a loop, especial containers, I'm used to having some sort of generic "constructor" may that be through structs or classes or the like, and using those as my primary organization for data.
for example a tile structure that takes a X and a Y and a color, i know this sort of thing is possible but from what i've seen its kind of difficult
https://redd.it/1eoebdl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
New mailing list subnoscription
With the old lua-l mailing list closed down and moved to Google Groups, I followed the subnoscription instructions to subscribe to the new one. I send the subnoscription email, and get a confirmation email back, but when I reply to that one to confirm the subnoscription, I get a "Delivery Status Notification (Failure)" reply back with this error:
The response was:
Unexpected DFS AddMemberships membership status
I've tried this a few times with the same response each time. Has anyone else run into problems trying to subscribe to the mailing list?
https://redd.it/1eolujn
@r_lua
With the old lua-l mailing list closed down and moved to Google Groups, I followed the subnoscription instructions to subscribe to the new one. I send the subnoscription email, and get a confirmation email back, but when I reply to that one to confirm the subnoscription, I get a "Delivery Status Notification (Failure)" reply back with this error:
The response was:
Unexpected DFS AddMemberships membership status
I've tried this a few times with the same response each time. Has anyone else run into problems trying to subscribe to the mailing list?
https://redd.it/1eolujn
@r_lua
Working on Lua code for a CYF project. I was making different text appear every time you did something. I did this for a Lie command and Threaten command and wrote this statement |elseif command == "LIE" then| and did the same for Threaten. |elseif command == "THREATEN"| But Lie showed me an error
So I need help with this. Also, the lines after each line of code are borders, not the code itself. I'm new to Lua btw so I may have made a few mistakes or two. FYI it's on line 51
The Code
https://redd.it/1eoyqgl
@r_lua
So I need help with this. Also, the lines after each line of code are borders, not the code itself. I'm new to Lua btw so I may have made a few mistakes or two. FYI it's on line 51
The Code
https://redd.it/1eoyqgl
@r_lua
coding Multiplayer with steam API
i like playing a game, i have its source and want to mod it, I want to add multiplayer to it using steams API, but it doesnt support modding, would be be possible?
https://redd.it/1ep3bsu
@r_lua
i like playing a game, i have its source and want to mod it, I want to add multiplayer to it using steams API, but it doesnt support modding, would be be possible?
https://redd.it/1ep3bsu
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
keep information when replacing using string.gsub()?
I'm trying to find all instance of a non-digit character followed by a period followed by any number of digit characters and essentially put a zero infront of the period.
i currently have :
string.gsub(str, '%D%.%d+', '0.') but it replaces the entire section with '0.' (obviously), how could i retain information when replacing; i essentially want to turn the: '%D%.%d+' into '%D0%.%d+' instead of replacing it entirely.I have thought about using string.gmatch to get the information in a for loop but i cant find a way to also return the index of the character at the start of the match.
because of the current structure of my code though i would definitely preffer if the solution is just a slightly longer line of code or at least short but if its not possible then whatever works.
https://redd.it/1ep5kep
@r_lua
I'm trying to find all instance of a non-digit character followed by a period followed by any number of digit characters and essentially put a zero infront of the period.
i currently have :
string.gsub(str, '%D%.%d+', '0.') but it replaces the entire section with '0.' (obviously), how could i retain information when replacing; i essentially want to turn the: '%D%.%d+' into '%D0%.%d+' instead of replacing it entirely.I have thought about using string.gmatch to get the information in a for loop but i cant find a way to also return the index of the character at the start of the match.
because of the current structure of my code though i would definitely preffer if the solution is just a slightly longer line of code or at least short but if its not possible then whatever works.
https://redd.it/1ep5kep
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
OOP in lua with lua-classic
The project repository: https://github.com/Rizwanelansyah/lua-classic/
this library is used for my next project, if you have a feedback please tell me.
an simple usage:
local class = require 'classic.class'
local MyClass = {}
class(MyClass, function(C)
MyClass.foo = 10
C.public()
MyClass.bar = 0
function MyClass:init(foo)
self.foo = foo
end
function MyClass:print()
print('Foo: ' .. self.foo .. ', Bar: ' .. self.bar)
end
end)
local obj = MyClass.new(14)
obj:print() --> Foo: 14, Bar: 0
-- obj.foo = 60 --> this line will error because field foo is private
obj.bar = 10
MyClass.print(obj) --> Foo: 14, Bar: 10
https://redd.it/1epdhym
@r_lua
The project repository: https://github.com/Rizwanelansyah/lua-classic/
this library is used for my next project, if you have a feedback please tell me.
an simple usage:
local class = require 'classic.class'
local MyClass = {}
class(MyClass, function(C)
MyClass.foo = 10
C.public()
MyClass.bar = 0
function MyClass:init(foo)
self.foo = foo
end
function MyClass:print()
print('Foo: ' .. self.foo .. ', Bar: ' .. self.bar)
end
end)
local obj = MyClass.new(14)
obj:print() --> Foo: 14, Bar: 0
-- obj.foo = 60 --> this line will error because field foo is private
obj.bar = 10
MyClass.print(obj) --> Foo: 14, Bar: 10
https://redd.it/1epdhym
@r_lua
GitHub
GitHub - Rizwanelansyah/lua-classic: lua OOP
lua OOP. Contribute to Rizwanelansyah/lua-classic development by creating an account on GitHub.
Beginner issue
So I have been trying to get into coding for a while and since I have a lot of time on my hands just sort of went for it, I installed everything needed (Vsc, Lua) I was also sure to put lua in the program files folder ( For reference the directory is C:\\Program Files\\Lua ) I was also sure to put everything needed on the environmental variable settings, I know this installed lua properly to a degree since I can run it on cmd. atm I haven't tried anything more than hello world text but I'm not sure how relevant that is. But now when I tried to run it on vsc it showed up with this error.
https://preview.redd.it/u99tbjsmv4id1.png?width=1857&format=png&auto=webp&s=73965f6275dabed28c0a8d1af1f8bdddd70b3415
Now the tutorial I followed was this one https://www.youtube.com/watch?v=rol8n3FYtuU&t=218s I pretty much copied everything the guy did including the names of all my files and stuff. If it helps in anyway I am also using windows 11 and the specific version of lua I installed is lua 5.3.6 any and all help is very much appreciated.
https://redd.it/1eq15r4
@r_lua
So I have been trying to get into coding for a while and since I have a lot of time on my hands just sort of went for it, I installed everything needed (Vsc, Lua) I was also sure to put lua in the program files folder ( For reference the directory is C:\\Program Files\\Lua ) I was also sure to put everything needed on the environmental variable settings, I know this installed lua properly to a degree since I can run it on cmd. atm I haven't tried anything more than hello world text but I'm not sure how relevant that is. But now when I tried to run it on vsc it showed up with this error.
https://preview.redd.it/u99tbjsmv4id1.png?width=1857&format=png&auto=webp&s=73965f6275dabed28c0a8d1af1f8bdddd70b3415
Now the tutorial I followed was this one https://www.youtube.com/watch?v=rol8n3FYtuU&t=218s I pretty much copied everything the guy did including the names of all my files and stuff. If it helps in anyway I am also using windows 11 and the specific version of lua I installed is lua 5.3.6 any and all help is very much appreciated.
https://redd.it/1eq15r4
@r_lua
Lua = AWESOME * 1000 for Game Development.
I know you're saying Duh.......
I saw a video about the Playdate SDK and I thought that would be cool to make a game for my Son. Learned some basics of Lua, and then I see LÖVE 2D and I'm like get outta here with how easy it is to make a game with Lua.
Lua rocks man!!!!
https://redd.it/1eqpcb6
@r_lua
I know you're saying Duh.......
I saw a video about the Playdate SDK and I thought that would be cool to make a game for my Son. Learned some basics of Lua, and then I see LÖVE 2D and I'm like get outta here with how easy it is to make a game with Lua.
Lua rocks man!!!!
https://redd.it/1eqpcb6
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Need help with the line draw feature of .lua
Hello all,
I am on Linux Mint, working with an application named Conky that has the ability to run .lua noscripts.
One of my conky widgets runs a .lua noscript that has a section that draws lines. This section draws a long horizontal line with a diagonal line attached at the top of diagonal and left end of horizontal lines:
The "pozycja_x" and "poxycia-y" variable are defined at the beginning of the .lua and have a value of 400 each.
I have been to chatgpt3.5 and 2-3 dedicated .lua code generating websites and nothing can edit the above code or replicate it to create a 120 pixel horizontal line with a shorter, 40 pixel diagonal line coming off it.
Here is the conky I am working with:
https://i.imgur.com/OfsLSWc.png
and the right red arrow on image points to the lines created by the above code for the cpu4 section. This is the configuration of lines I am trying to get code for, just with a diagonal line 1/3 the length of the one being currently generated.
Can anyone help please?
Thank you for reading,
Logan
https://redd.it/1eqweum
@r_lua
Hello all,
I am on Linux Mint, working with an application named Conky that has the ability to run .lua noscripts.
One of my conky widgets runs a .lua noscript that has a section that draws lines. This section draws a long horizontal line with a diagonal line attached at the top of diagonal and left end of horizontal lines:
--cpu4cairo_move_to(cr, pozycja_x + 26 + math.cos(nwsk * -9.202 / 2000) * (promien_cpu0 + width_cpu0) + 8 * 4, pozycja_y - math.sin(nwsk * -9.202 / 2000) * (promien_cpu0 + width_cpu0) + 12 * 2)cairo_line_to(cr, pozycja_x + math.cos(nwsk * 3.202 / 1200) * ramie_cpu0, pozycja_y - math.sin(nwsk * 3.202 / 1200) * ramie_cpu0)cairo_line_to(cr, pozycja_x + math.cos(nwsk * 3.202 / 1200) * ramie_cpu0 + 124, pozycja_y - math.sin(nwsk * 3.202 / 1200) * ramie_cpu0)cairo_stroke(cr)cairo_move_to(cr, pozycja_x + math.cos(nwsk * 3.202 / 1200) * ramie_cpu0 + txtxoffset, pozycja_y - math.sin(nwsk * 3.202 / 1200) * ramie_cpu0 - txtyoffset)cairo_show_text(cr, "cpu4: " .. conky_parse("${cpu cpu4}") .. "%, " .. conky_parse("${freq_g cpu4}") .. "Ghz, " .. conky_parse("${acpitemp}") .. "°C")cairo_stroke(cr)The "pozycja_x" and "poxycia-y" variable are defined at the beginning of the .lua and have a value of 400 each.
I have been to chatgpt3.5 and 2-3 dedicated .lua code generating websites and nothing can edit the above code or replicate it to create a 120 pixel horizontal line with a shorter, 40 pixel diagonal line coming off it.
Here is the conky I am working with:
https://i.imgur.com/OfsLSWc.png
and the right red arrow on image points to the lines created by the above code for the cpu4 section. This is the configuration of lines I am trying to get code for, just with a diagonal line 1/3 the length of the one being currently generated.
Can anyone help please?
Thank you for reading,
Logan
https://redd.it/1eqweum
@r_lua
Imgur
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.
Plume : A logicfull text template langage, written in lua, extensible via lua
https://preview.redd.it/yfopz0uo8fid1.png?width=1957&format=png&auto=webp&s=fc2d67901b7bfbbdee78c29328303fe847c8c0fe
Hello everyone,
I've been using template systems for a long time to generate documents for my courses, so I decided to make a "clean and presentable" version.
(I'm a total self-taught programmer, and this is a passion project I'm doing in my spare time.)
Copy of the beginning of the readme :
Programming languages like Python and Lua enable the implementation of complex logic with relative ease. However, working with text input can often be tedious due to cumbersome syntax.
While there are formats that facilitate enriched text writing, such as Markdown or Jinja, they tend to have limited logical capabilities.
Plume's philosophy is to combine the best of both worlds: text input is at the core of its design, yet the integration of logic is seamless, thanks to its close relationship with the Lua noscripting language.
To illustrate, consider the task of generating ten files, each containing a multiplication table for a specific number. This can certainly be achieved in Python or Lua, but of Plume offers a more intuitive approach:
\for {i=1,10} {
\file {table-#i.txt} {
\for {j=1,10}{
#i #j = #{ij}
}
}
}
https://github.com/ErwanBarbedor/Plume\_-\_TextEngine
https://redd.it/1er66z9
@r_lua
https://preview.redd.it/yfopz0uo8fid1.png?width=1957&format=png&auto=webp&s=fc2d67901b7bfbbdee78c29328303fe847c8c0fe
Hello everyone,
I've been using template systems for a long time to generate documents for my courses, so I decided to make a "clean and presentable" version.
(I'm a total self-taught programmer, and this is a passion project I'm doing in my spare time.)
Copy of the beginning of the readme :
Programming languages like Python and Lua enable the implementation of complex logic with relative ease. However, working with text input can often be tedious due to cumbersome syntax.
While there are formats that facilitate enriched text writing, such as Markdown or Jinja, they tend to have limited logical capabilities.
Plume's philosophy is to combine the best of both worlds: text input is at the core of its design, yet the integration of logic is seamless, thanks to its close relationship with the Lua noscripting language.
To illustrate, consider the task of generating ten files, each containing a multiplication table for a specific number. This can certainly be achieved in Python or Lua, but of Plume offers a more intuitive approach:
\for {i=1,10} {
\file {table-#i.txt} {
\for {j=1,10}{
#i #j = #{ij}
}
}
}
https://github.com/ErwanBarbedor/Plume\_-\_TextEngine
https://redd.it/1er66z9
@r_lua
Favourite cross-platform (Linux, Mac, Windows) GUI?
I think we all already know that the state of cross platform GUI on Lua kinda sucks, but let's hear some good ones.
Bonus points (optional):
- on Luarocks
- maintained
- actually easy to install (looking at you, windows...)
- Lua version support
- well documented
The best one I can find that furfills all of this is https://libyue.com/docs/latest/lua/ but it's not very maintained
https://redd.it/1erdzet
@r_lua
I think we all already know that the state of cross platform GUI on Lua kinda sucks, but let's hear some good ones.
Bonus points (optional):
- on Luarocks
- maintained
- actually easy to install (looking at you, windows...)
- Lua version support
- well documented
The best one I can find that furfills all of this is https://libyue.com/docs/latest/lua/ but it's not very maintained
https://redd.it/1erdzet
@r_lua
Tell me if this is a stupid question, is there anything obviously wrong with this part of a code? I know nothing about LUA and i'm just desperatly trying to get this STALKER Anomaly mod to work. The crash log says theres an error at the line at the very top. No big details needed, thank you.
https://redd.it/1erxdk2
@r_lua
https://redd.it/1erxdk2
@r_lua
Special Variables
hey,
I discovered that when running a cli app, I can pass `arg` to the function, and it will receive the command-line arguments, as described here
are there any others special variables? where can I found them?
https://redd.it/1eryu3h
@r_lua
hey,
I discovered that when running a cli app, I can pass `arg` to the function, and it will receive the command-line arguments, as described here
are there any others special variables? where can I found them?
https://redd.it/1eryu3h
@r_lua
help i cant make a file in visual code studio
https://preview.redd.it/du8fqnebmqid1.png?width=1919&format=png&auto=webp&s=1a67ccaf181dc7348b220c13a27c98e5c28dad5e
ive downloaded lua on here, but it shows some languages ive downloaded apart from lua..
really need help
https://redd.it/1esjs3m
@r_lua
https://preview.redd.it/du8fqnebmqid1.png?width=1919&format=png&auto=webp&s=1a67ccaf181dc7348b220c13a27c98e5c28dad5e
ive downloaded lua on here, but it shows some languages ive downloaded apart from lua..
really need help
https://redd.it/1esjs3m
@r_lua
how do I make it so that if the user enters the random number wrongly, a message that they have failed appears every time this happens?
Well, i was trying to make a lua program that when a random number is drawn from 0 to 10 the user must try to guess it, but if he gets it wrong i want a message to appear every time he gets it wrong, but without having to restart the program.
print("guess a number between 0 and 10")
local guess = io.read()
local rightNumber = math.random(0, 10)
if guess == rightNumber then
print("congratulations!")
elseif guess ~= rightNumber then
while true do
print("sorry the right number is " .. rightNumber .. " you failed try again")
end
end
https://redd.it/1esyv4j
@r_lua
Well, i was trying to make a lua program that when a random number is drawn from 0 to 10 the user must try to guess it, but if he gets it wrong i want a message to appear every time he gets it wrong, but without having to restart the program.
print("guess a number between 0 and 10")
local guess = io.read()
local rightNumber = math.random(0, 10)
if guess == rightNumber then
print("congratulations!")
elseif guess ~= rightNumber then
while true do
print("sorry the right number is " .. rightNumber .. " you failed try again")
end
end
https://redd.it/1esyv4j
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How to add team distribution in this noscript, so that after teleportation to the map, players who were teleported are added to the Game team, and players who are in the lobby also remain in the Lobby team? Help please
local gMgr = {}
local sessionData = {}
local mSpawns = workspace.Map.Spawns:GetChildren()
local lSpawns = workspace.Lobby.Spawns:GetChildren()
local numOfPlayers = 0
local declareWinnerTime = 3
local rs = game:GetService("ReplicatedStorage")
local winnerRe = rs:WaitForChild("WinnerRe")
local intermissionRe = rs:WaitForChild("IntermissionRe")
local intermissionTime = 5
local Teams = game:GetService("Teams")
local lobbyTeam = Teams:FindFirstChild("Lobby") or Instance.new("Team", Teams)
lobbyTeam.Name = "Lobby"
local gameTeam = Teams:FindFirstChild("Game") or Instance.new("Team", Teams)
gameTeam.Name = "Game"
function gMgr:isEnoughPlayers()
if numOfPlayers > 1 then
return true
end
return false
end
function gMgr:declareWinner(player)
-- remote event to UI
winnerRe:FireAllClients(player, declareWinnerTime)
wait(declareWinnerTime)
sessionDataplayer"isWinner" = true
sessionDataplayer"wins" = sessionDataplayer"wins" + 1
for ply, data in pairs(sessionData) do
local spawnPnt = lSpawnsmath.random(1, #lSpawns)
ply.Character.HumanoidRootPart.CFrame = spawnPnt.CFrame + Vector3.new(0, 3, 0)
data"isPlaying" = false
ply.Team = lobbyTeam
end
end
function gMgr:checkForLastPlayerStanding()
local num = 0
local aPlayer = nil
for player, data in pairs(sessionData) do
if data"isPlaying" then
num = num + 1
aPlayer = player
end
end
if num == 1 then
return aPlayer
end
return nil
end
function gMgr:intermission()
intermissionRe:FireAllClients(intermissionTime)
wait(intermissionTime)
end
local function teleportPlayers()
for ply, data in pairs(sessionData) do
local spawnPnt = mSpawnsmath.random(1, #mSpawns)
ply.Character.HumanoidRootPart.CFrame = spawnPnt.CFrame + Vector3.new(0, 3, 0)
data"isWinner" = false
data"isPlaying" = true
ply.Team = gameTeam
end
end
local function checkIfAnyoneIsPlaying()
for ply, data in pairs(sessionData) do
if data"isPlaying" then
return true
end
end
return false
end
function gMgr:playGame()
local stillPlaying = true
teleportPlayers()
while stillPlaying do
stillPlaying = checkIfAnyoneIsPlaying()
wait(1)
end
end
local function addChar(char)
local player = game.Players:GetPlayerFromCharacter(char)
sessionDataplayer"isPlaying" = false
player.Team = lobbyTeam
end
local function addPlayer(player)
sessionDataplayer = { isPlaying=false, isWinner=false, wins=0 }
numOfPlayers = numOfPlayers + 1
player.CharacterAdded:Connect(addChar)
player.Team = lobbyTeam
end
local function removePlayer(player)
sessionDataplayer = nil
numOfPlayers = numOfPlayers - 1
end
game.Players.PlayerAdded:Connect(addPlayer)
game.Players.PlayerRemoving:Connect(removePlayer)
return gMgr
https://redd.it/1et1lly
@r_lua
local gMgr = {}
local sessionData = {}
local mSpawns = workspace.Map.Spawns:GetChildren()
local lSpawns = workspace.Lobby.Spawns:GetChildren()
local numOfPlayers = 0
local declareWinnerTime = 3
local rs = game:GetService("ReplicatedStorage")
local winnerRe = rs:WaitForChild("WinnerRe")
local intermissionRe = rs:WaitForChild("IntermissionRe")
local intermissionTime = 5
local Teams = game:GetService("Teams")
local lobbyTeam = Teams:FindFirstChild("Lobby") or Instance.new("Team", Teams)
lobbyTeam.Name = "Lobby"
local gameTeam = Teams:FindFirstChild("Game") or Instance.new("Team", Teams)
gameTeam.Name = "Game"
function gMgr:isEnoughPlayers()
if numOfPlayers > 1 then
return true
end
return false
end
function gMgr:declareWinner(player)
-- remote event to UI
winnerRe:FireAllClients(player, declareWinnerTime)
wait(declareWinnerTime)
sessionDataplayer"isWinner" = true
sessionDataplayer"wins" = sessionDataplayer"wins" + 1
for ply, data in pairs(sessionData) do
local spawnPnt = lSpawnsmath.random(1, #lSpawns)
ply.Character.HumanoidRootPart.CFrame = spawnPnt.CFrame + Vector3.new(0, 3, 0)
data"isPlaying" = false
ply.Team = lobbyTeam
end
end
function gMgr:checkForLastPlayerStanding()
local num = 0
local aPlayer = nil
for player, data in pairs(sessionData) do
if data"isPlaying" then
num = num + 1
aPlayer = player
end
end
if num == 1 then
return aPlayer
end
return nil
end
function gMgr:intermission()
intermissionRe:FireAllClients(intermissionTime)
wait(intermissionTime)
end
local function teleportPlayers()
for ply, data in pairs(sessionData) do
local spawnPnt = mSpawnsmath.random(1, #mSpawns)
ply.Character.HumanoidRootPart.CFrame = spawnPnt.CFrame + Vector3.new(0, 3, 0)
data"isWinner" = false
data"isPlaying" = true
ply.Team = gameTeam
end
end
local function checkIfAnyoneIsPlaying()
for ply, data in pairs(sessionData) do
if data"isPlaying" then
return true
end
end
return false
end
function gMgr:playGame()
local stillPlaying = true
teleportPlayers()
while stillPlaying do
stillPlaying = checkIfAnyoneIsPlaying()
wait(1)
end
end
local function addChar(char)
local player = game.Players:GetPlayerFromCharacter(char)
sessionDataplayer"isPlaying" = false
player.Team = lobbyTeam
end
local function addPlayer(player)
sessionDataplayer = { isPlaying=false, isWinner=false, wins=0 }
numOfPlayers = numOfPlayers + 1
player.CharacterAdded:Connect(addChar)
player.Team = lobbyTeam
end
local function removePlayer(player)
sessionDataplayer = nil
numOfPlayers = numOfPlayers - 1
end
game.Players.PlayerAdded:Connect(addPlayer)
game.Players.PlayerRemoving:Connect(removePlayer)
return gMgr
https://redd.it/1et1lly
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Scripts de Lua en Redis
https://emanuelpeg.blogspot.com/2024/08/noscripts-de-lua-en-redis.html
https://redd.it/1etkzo4
@r_lua
https://emanuelpeg.blogspot.com/2024/08/noscripts-de-lua-en-redis.html
https://redd.it/1etkzo4
@r_lua
Blogspot
Scripts de Lua en Redis
Java Apache Linux Spring SOA Scala Ruby Maven javanoscript php Open Source NoSql Hibernate Python Erlang MongoDb Hadoop Rest big data Cassandra Spark
Support for updating the Lua vcpkg port?
Over the past couple weeks, I have been working on updating the [Lua Port](https://github.com/microsoft/vcpkg/pull/39953) from the microsoft official vcpkg repo. I want to:
* Export CMake targets for generated artifacts
* unofficial::lua::lua - C library
* unofficial::lua::lua-cpp - C++ library
* unofficial::lua::lua-interpreter - luai
* unofficial::lua::lua-compiler - luac
* Update the port to follow the maintainer guide
* Use vcpkg 'features' to add functionality as opposed to modifying the artifacts that the default port produces.
* Eliminate dependency on FindLua.cmake
* This port still works for users using the FindLua.cmake module
* This is traditionally how Lua users found their libraries. But we have the opportunity to improve the ergonomics and make CMake development sane.
* Not to mention, the [discouraged](https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#find-module-files) use of Find modules..
I was planning on updating ALL of the 5.X versions to improve the ergonomics and developer experience. I started with 5.3 because I'm currently tied to this version for development. If I am able to update 5.1 -> 5.4 and unify the development experience I think it would be a big win.
On the PR, I've taken a lot of the feedback into consideration, made a lot of modifications, and I appreciate the work the maintainers do to run the whole thing. However the latest reasoning for refusing the merge has me bewildered beyond belief. It stems from one of vcpkg's weaknesses from the very beginning, when it shirked versioning altogether, and has mostly remained an afterthought ever since.
Essentially, they [wont update older versions of packages](https://github.com/microsoft/vcpkg/pull/39953#discussion_r1702135037). Because every port with a dependency on \`lua\` without specifying a version will be 'rolled back'. I tried to explain that users can be 'stuck' on certain minor versions because of ABI/API compatibility but that doesn't seem to be a good enough explanation. I'm looking to be tactful here, so if anybody has recommendations for how I might navigate/convince the maintainers to allow updating these older packages I would be grateful. If there are any other communities I should crosspost to, let me know.
Also:
I wonder how they deal with older, vulnerable packages that could leave users exposed to attack should they not update them.
You can see available lua versions [here](https://vcpkg.link/ports/lua/versions)
One of the automated tests for the lua package builds `rbdl`([github](https://github.com/rbdl/rbdl/blob/master/addons/luamodel/CMakeLists.txt)), which is funny because that package is looking for `FIND_PACKAGE (Lua 5.1 REQUIRED)` and 5.1 does not even have a vcpkg port.
https://redd.it/1etsq9a
@r_lua
Over the past couple weeks, I have been working on updating the [Lua Port](https://github.com/microsoft/vcpkg/pull/39953) from the microsoft official vcpkg repo. I want to:
* Export CMake targets for generated artifacts
* unofficial::lua::lua - C library
* unofficial::lua::lua-cpp - C++ library
* unofficial::lua::lua-interpreter - luai
* unofficial::lua::lua-compiler - luac
* Update the port to follow the maintainer guide
* Use vcpkg 'features' to add functionality as opposed to modifying the artifacts that the default port produces.
* Eliminate dependency on FindLua.cmake
* This port still works for users using the FindLua.cmake module
* This is traditionally how Lua users found their libraries. But we have the opportunity to improve the ergonomics and make CMake development sane.
* Not to mention, the [discouraged](https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#find-module-files) use of Find modules..
I was planning on updating ALL of the 5.X versions to improve the ergonomics and developer experience. I started with 5.3 because I'm currently tied to this version for development. If I am able to update 5.1 -> 5.4 and unify the development experience I think it would be a big win.
On the PR, I've taken a lot of the feedback into consideration, made a lot of modifications, and I appreciate the work the maintainers do to run the whole thing. However the latest reasoning for refusing the merge has me bewildered beyond belief. It stems from one of vcpkg's weaknesses from the very beginning, when it shirked versioning altogether, and has mostly remained an afterthought ever since.
Essentially, they [wont update older versions of packages](https://github.com/microsoft/vcpkg/pull/39953#discussion_r1702135037). Because every port with a dependency on \`lua\` without specifying a version will be 'rolled back'. I tried to explain that users can be 'stuck' on certain minor versions because of ABI/API compatibility but that doesn't seem to be a good enough explanation. I'm looking to be tactful here, so if anybody has recommendations for how I might navigate/convince the maintainers to allow updating these older packages I would be grateful. If there are any other communities I should crosspost to, let me know.
Also:
I wonder how they deal with older, vulnerable packages that could leave users exposed to attack should they not update them.
You can see available lua versions [here](https://vcpkg.link/ports/lua/versions)
One of the automated tests for the lua package builds `rbdl`([github](https://github.com/rbdl/rbdl/blob/master/addons/luamodel/CMakeLists.txt)), which is funny because that package is looking for `FIND_PACKAGE (Lua 5.1 REQUIRED)` and 5.1 does not even have a vcpkg port.
https://redd.it/1etsq9a
@r_lua
GitHub
[lua] Update 5.3.5. Modern CMake practices and MinGW Linux support. by XJ-0461 · Pull Request #39953 · microsoft/vcpkg
Changes comply with the maintainer guide.
SHA512s are updated for each updated download.
The "supports" clause reflects platforms that may be fixed by this new version.
Any fix...
SHA512s are updated for each updated download.
The "supports" clause reflects platforms that may be fixed by this new version.
Any fix...