Lua with Manual memory management
Hi everyone!
I’ve started experimenting with the Lua API in C, and I thought there was no better way to challenge myself than by implementing a manual memory management system in Lua.
I just wanted to share the current state of the project. As of now, it’s not working as smoothly as I’d like. Currently, you still need to explicitly use the garbage collector (GC) to delete freed pointers, and I’ve only implemented integer types so far. But hey, I’m closer than I was yesterday, so I’ll keep improving the project.
Feel free to check it out, discuss, critique my code, open issues, or make pull requests (PRs).
At the moment, it doesn’t include a method to compile the library or even a simple release, as, like I mentioned, it’s not fully functional yet.
For anyone wondering: Why??????
Well, I just wanted to do it. There’s no particular scenario where this would be better than Lua’s original garbage collector—especially considering you can trigger the GC manually—but hey, I’m just a simple guy who likes to mess around with things.
I hope some of you find the idea interesting.
GitHub Repository: Unsafe-Lua
https://redd.it/1hvra76
@r_lua
Hi everyone!
I’ve started experimenting with the Lua API in C, and I thought there was no better way to challenge myself than by implementing a manual memory management system in Lua.
I just wanted to share the current state of the project. As of now, it’s not working as smoothly as I’d like. Currently, you still need to explicitly use the garbage collector (GC) to delete freed pointers, and I’ve only implemented integer types so far. But hey, I’m closer than I was yesterday, so I’ll keep improving the project.
Feel free to check it out, discuss, critique my code, open issues, or make pull requests (PRs).
At the moment, it doesn’t include a method to compile the library or even a simple release, as, like I mentioned, it’s not fully functional yet.
For anyone wondering: Why??????
Well, I just wanted to do it. There’s no particular scenario where this would be better than Lua’s original garbage collector—especially considering you can trigger the GC manually—but hey, I’m just a simple guy who likes to mess around with things.
I hope some of you find the idea interesting.
GitHub Repository: Unsafe-Lua
https://redd.it/1hvra76
@r_lua
GitHub
GitHub - Ajotah98/Unsafe-Lua
Contribute to Ajotah98/Unsafe-Lua development by creating an account on GitHub.
Problems With Sol and the Lua Library
Hello! I'm currently setting up an SDL project and wanted to use Lua to some extent. However, I'm having issues including Sol in the project. I haven't had problems with any of the other libraries I'm using, just Sol-Lua specifically. I've included the appropriate Include and Library paths. If you have any experience with this library, could you help me figure out what I could be doing wrong? Any help would be greatly appreciated.
https://preview.redd.it/6xccupiqtkbe1.jpg?width=690&format=pjpg&auto=webp&s=bfb4ed9972478dff87eff0d937812cc1ae960c46
https://preview.redd.it/ob7bspiqtkbe1.jpg?width=382&format=pjpg&auto=webp&s=de93af5063745d80ce441824d3687edce65caa4f
https://preview.redd.it/gaj84riqtkbe1.jpg?width=387&format=pjpg&auto=webp&s=41207f7d64fa33ba55d2540ae8704f9c31ae5441
https://preview.redd.it/nhvz1riqtkbe1.jpg?width=470&format=pjpg&auto=webp&s=4854db036f9fc989fb7b585671eec7f79ae72ff6
https://redd.it/1hvuitn
@r_lua
Hello! I'm currently setting up an SDL project and wanted to use Lua to some extent. However, I'm having issues including Sol in the project. I haven't had problems with any of the other libraries I'm using, just Sol-Lua specifically. I've included the appropriate Include and Library paths. If you have any experience with this library, could you help me figure out what I could be doing wrong? Any help would be greatly appreciated.
https://preview.redd.it/6xccupiqtkbe1.jpg?width=690&format=pjpg&auto=webp&s=bfb4ed9972478dff87eff0d937812cc1ae960c46
https://preview.redd.it/ob7bspiqtkbe1.jpg?width=382&format=pjpg&auto=webp&s=de93af5063745d80ce441824d3687edce65caa4f
https://preview.redd.it/gaj84riqtkbe1.jpg?width=387&format=pjpg&auto=webp&s=41207f7d64fa33ba55d2540ae8704f9c31ae5441
https://preview.redd.it/nhvz1riqtkbe1.jpg?width=470&format=pjpg&auto=webp&s=4854db036f9fc989fb7b585671eec7f79ae72ff6
https://redd.it/1hvuitn
@r_lua
Im trying to make my dude teleport forward a few seconds after pressing one
me my brother a friend of mine and one of my friend's friends are making a roblox battlegrounds game. even tho my friend and his friend are the ones supposed to be coding, they're not really helping fix the move. basically the dude goes into a running stance, then flashes forward and kicks. however, right now all he does is run forward. ples tell me how im supposed to do it
https://redd.it/1hw3elt
@r_lua
me my brother a friend of mine and one of my friend's friends are making a roblox battlegrounds game. even tho my friend and his friend are the ones supposed to be coding, they're not really helping fix the move. basically the dude goes into a running stance, then flashes forward and kicks. however, right now all he does is run forward. ples tell me how im supposed to do it
https://redd.it/1hw3elt
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Announcing Astra - LuaJIT webserver built on top of Rust
Hey everyone! Hope the new year has been chill so far.
I am very happy to announce Astra (https://astra.arkforge.net), a small webserver built on top of Rust + Axum for LuaJIT (Lua PUC versions coming soon). The goal is to have a fault-tolerant, fast, memory safe, and auto scaling web server while at the same time being insanely easy to use and extend. This project is mainly used so far within our company for some products and sees development wherever we find need for.
Some examples from the README:
-- Routes are defined through these route functions
-- route functions need a path and a callback
Astra.get("/", function()
-- they may have a return too (optional)
return "hello from default Astra instance!"
end)
-- Local and global variables can be mutated at any
-- time as the callbacks are ran on runtime.
local counter = 0
Astra.get("/count", function()
counter = counter + 1
-- and also can return JSON
return { countervalue = counter }
end)
-- The callback function offers requests and responses
-- arguments which can be used to consume incoming data
-- and shape outgoinging structure
Astra.get("/", function(req, res)
-- set header code
res:setstatuscode(300)
-- set headers
res:setheader("header-key", "header-value")
-- read the request body
print(req:body():text())
return "Responding with Code 300 cuz why not"
end)
There are also a lot of utilities provided as well, such as table schema validation (as an alternative to having typed tables), HTTP client, PostgreSQL driver, async tasks, markup language parsing such as JSON, ... and with more to come in the future such as templating. There are also some functionality missing as of yet, such as websockets, which will come with time.
This webserver is packaged as a single binary that you can just download on server of your local machine (prebuilt binary releases for windows and linux x64 are available) and can generally assume what works locally will work on the cloud as well since they both will use the same binary and instructions. The binary also packages the bundled lua code that includes some utilities and the Astra's own type definitions for help with intellisense in some cases.
Enjoy!
https://redd.it/1hwfmz5
@r_lua
Hey everyone! Hope the new year has been chill so far.
I am very happy to announce Astra (https://astra.arkforge.net), a small webserver built on top of Rust + Axum for LuaJIT (Lua PUC versions coming soon). The goal is to have a fault-tolerant, fast, memory safe, and auto scaling web server while at the same time being insanely easy to use and extend. This project is mainly used so far within our company for some products and sees development wherever we find need for.
Some examples from the README:
-- Routes are defined through these route functions
-- route functions need a path and a callback
Astra.get("/", function()
-- they may have a return too (optional)
return "hello from default Astra instance!"
end)
-- Local and global variables can be mutated at any
-- time as the callbacks are ran on runtime.
local counter = 0
Astra.get("/count", function()
counter = counter + 1
-- and also can return JSON
return { countervalue = counter }
end)
-- The callback function offers requests and responses
-- arguments which can be used to consume incoming data
-- and shape outgoinging structure
Astra.get("/", function(req, res)
-- set header code
res:setstatuscode(300)
-- set headers
res:setheader("header-key", "header-value")
-- read the request body
print(req:body():text())
return "Responding with Code 300 cuz why not"
end)
There are also a lot of utilities provided as well, such as table schema validation (as an alternative to having typed tables), HTTP client, PostgreSQL driver, async tasks, markup language parsing such as JSON, ... and with more to come in the future such as templating. There are also some functionality missing as of yet, such as websockets, which will come with time.
This webserver is packaged as a single binary that you can just download on server of your local machine (prebuilt binary releases for windows and linux x64 are available) and can generally assume what works locally will work on the cloud as well since they both will use the same binary and instructions. The binary also packages the bundled lua code that includes some utilities and the Astra's own type definitions for help with intellisense in some cases.
Enjoy!
https://redd.it/1hwfmz5
@r_lua
astra.arkforge.net
🔥 Blazingly Fast 🔥 lua runtime
Good practices - (type|nil) vs (type) passed in an if statement
Hello, which of below cases is a good practice in lua?
case 1:
local function foo(arg, bool)
bar(arg)
-- passing bool: boolean|nil
if bool then baz() end
end
case 2:
local function foo(arg, bool)
bar(arg)
bool = (bool ~= nil and bool)
-- passing bool: boolean
if bool then baz() end
end
https://redd.it/1hwkf0f
@r_lua
Hello, which of below cases is a good practice in lua?
case 1:
local function foo(arg, bool)
bar(arg)
-- passing bool: boolean|nil
if bool then baz() end
end
case 2:
local function foo(arg, bool)
bar(arg)
bool = (bool ~= nil and bool)
-- passing bool: boolean
if bool then baz() end
end
https://redd.it/1hwkf0f
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
MPV Lua Script to cycle through specific audio and subs of a video
Here is an example:
A video have 5 audio in it (English, Japanese, Spanish, German, French) and it also have 5 subs in it (English, Japanese, Spanish, German, French).
With the above example, how can I cycle to specific audio and subs while skipping the other ones? I'm only interested in English, Japanese and Spanish, which means I don't want to cycle through German and French and I want to get rid of those languages when I'm cycling with the hotkey, how can I do this? is there a Lua noscript that can make this happen?
Note: It needs to be able to cycle the subnoscript inside the "Subs" folder as well as long as the subnoscript has the same name as the video.
https://redd.it/1hwoy6t
@r_lua
Here is an example:
A video have 5 audio in it (English, Japanese, Spanish, German, French) and it also have 5 subs in it (English, Japanese, Spanish, German, French).
With the above example, how can I cycle to specific audio and subs while skipping the other ones? I'm only interested in English, Japanese and Spanish, which means I don't want to cycle through German and French and I want to get rid of those languages when I'm cycling with the hotkey, how can I do this? is there a Lua noscript that can make this happen?
Note: It needs to be able to cycle the subnoscript inside the "Subs" folder as well as long as the subnoscript has the same name as the video.
https://redd.it/1hwoy6t
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
MPV.net (media player) On Screen Controller Lua Script help
I have this noscript that hides the OSC in fullscreen but it's always visible when I exit fullscreen:
-- Keeps the OSC visible in windowed mode and hides it in fullscreen
mp.observeproperty("fullscreen", "bool", function(, isfullscreen)
if isfullscreen then
-- Hide the OSC in fullscreen mode
mp.command("noscript-message osc-visibility auto")
else
-- Always show the OSC in windowed mode
mp.command("noscript-message osc-visibility always")
end
end)
The noscript works fine but there is a problem, when I enter fullscreen I get an on-screen text saying "OSC visibility: Auto", and when I exit fullscreen it says "OSC visibility: Always", how can I modify the above noscript to remove those 2 annoying on-screen text messages?
https://redd.it/1hwosxn
@r_lua
I have this noscript that hides the OSC in fullscreen but it's always visible when I exit fullscreen:
-- Keeps the OSC visible in windowed mode and hides it in fullscreen
mp.observeproperty("fullscreen", "bool", function(, isfullscreen)
if isfullscreen then
-- Hide the OSC in fullscreen mode
mp.command("noscript-message osc-visibility auto")
else
-- Always show the OSC in windowed mode
mp.command("noscript-message osc-visibility always")
end
end)
The noscript works fine but there is a problem, when I enter fullscreen I get an on-screen text saying "OSC visibility: Auto", and when I exit fullscreen it says "OSC visibility: Always", how can I modify the above noscript to remove those 2 annoying on-screen text messages?
https://redd.it/1hwosxn
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is there a Lua noscript to have the Audio/Sub icon show a mini-menu?
I'm using MPV.net, is there a way to make the Audio/Sub icon of the player show a menu with the available audio and subnoscripts? With the default behavior, clicking these icons cycles through them which is a pain because if a video has 10 audio or subnoscripts it will cycle through each one of them so it's counter-productive for me.
Instead of the default behavior, I want to click on it, open a mini-menu and select my specific audio or subnoscripts and not cycle through them. Is there a Lua noscript that can make this happen?
https://preview.redd.it/tqlh8crgwtbe1.jpg?width=932&format=pjpg&auto=webp&s=9fefec81016d993f9a58f04d09f396cfccedb838
https://redd.it/1hwtuxi
@r_lua
I'm using MPV.net, is there a way to make the Audio/Sub icon of the player show a menu with the available audio and subnoscripts? With the default behavior, clicking these icons cycles through them which is a pain because if a video has 10 audio or subnoscripts it will cycle through each one of them so it's counter-productive for me.
Instead of the default behavior, I want to click on it, open a mini-menu and select my specific audio or subnoscripts and not cycle through them. Is there a Lua noscript that can make this happen?
https://preview.redd.it/tqlh8crgwtbe1.jpg?width=932&format=pjpg&auto=webp&s=9fefec81016d993f9a58f04d09f396cfccedb838
https://redd.it/1hwtuxi
@r_lua
GitHub
GitHub - mpvnet-player/mpv.net: 🎞 mpv.net is a media player for Windows with a modern GUI.
🎞 mpv.net is a media player for Windows with a modern GUI. - mpvnet-player/mpv.net
Make an object face the camera (roblox studio)
I'm pretty new to coding Lua, so I have like no clue how to do anything. I'm trying to get an object to face towards the camera at all times, and I've gone into countless forums and things where people asked a similar question, but I can't find anything that actually works or even has an effect on the object for that matter. Any Suggestions?
I would also like to know somewhere I can get lessons on coding with Lua.
https://redd.it/1hwt60i
@r_lua
I'm pretty new to coding Lua, so I have like no clue how to do anything. I'm trying to get an object to face towards the camera at all times, and I've gone into countless forums and things where people asked a similar question, but I can't find anything that actually works or even has an effect on the object for that matter. Any Suggestions?
I would also like to know somewhere I can get lessons on coding with Lua.
https://redd.it/1hwt60i
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is chatgpt a valuable resource to help with learning with the basics, or a resource to avoid?
been trying to learn lua specificly off and on for the past few years. finally commiting to getting a functional and practical level of understanding and want to know if that a is a viable resource or if I should stick to ONLY other sources.
https://redd.it/1hwssbt
@r_lua
been trying to learn lua specificly off and on for the past few years. finally commiting to getting a functional and practical level of understanding and want to know if that a is a viable resource or if I should stick to ONLY other sources.
https://redd.it/1hwssbt
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Language aware diff for Lua with integration into VS Code and GitHub
Hi there,
I am working on SemanticDiff, a programming language aware diff that hides style-only changes, detects moved code and refactorings. We just added support for Lua and would like to know what you think!
SemanticDiff parses the contents of Lua files to distinguish between relevant and irrelevant changes. This way it can, for example, ignore whitespace outside of strings or how a string literal is written (brackets vs. quotes). The idea is to generate a diff with less noise:
https://preview.redd.it/g9728xu9dzbe1.png?width=901&format=png&auto=webp&s=451f316b29a8d18a173cead431843a631d4d3d97
The VS Code extension is completely free and the GitHub App is free as well if used with public repositories or private repositories that have 3 or less contributors. If this sounds interesting, you can read the release blog post to learn more.
Looking forward to your feedback.
https://redd.it/1hxedws
@r_lua
Hi there,
I am working on SemanticDiff, a programming language aware diff that hides style-only changes, detects moved code and refactorings. We just added support for Lua and would like to know what you think!
SemanticDiff parses the contents of Lua files to distinguish between relevant and irrelevant changes. This way it can, for example, ignore whitespace outside of strings or how a string literal is written (brackets vs. quotes). The idea is to generate a diff with less noise:
https://preview.redd.it/g9728xu9dzbe1.png?width=901&format=png&auto=webp&s=451f316b29a8d18a173cead431843a631d4d3d97
The VS Code extension is completely free and the GitHub App is free as well if used with public repositories or private repositories that have 3 or less contributors. If this sounds interesting, you can read the release blog post to learn more.
Looking forward to your feedback.
https://redd.it/1hxedws
@r_lua
Semanticdiff
SemanticDiff - Language Aware Diff For VS Code & GitHub
SemanticDiff helps you review code diffs in VS Code and GitHub faster. It hides irrelevant changes, detects moved code, and understands refactorings.
ı need help disconeccting remote serverrr
right now the code looks liek this:
game.ReplicatedStorage.shake.OnClientEvent:Connect(function()
local Camera = game.Workspace.CurrentCamera
local Seed = math.random()
local X = 0
local Z = 0
game:GetService("RunService").RenderStepped:Connect(function()
Camera.CFrame = Camera.CFrame * CFrame.Angles(math.noise(Seed, X * 0.35, Z * 0.35) * 0.02, math.noise(X * 0.35, Seed, Z * 0.35) * 0.02, 0)
X = X + 0.4
Z = Z + 0.4
end)
end)
please help em its an emergency
https://redd.it/1hxhq0n
@r_lua
right now the code looks liek this:
game.ReplicatedStorage.shake.OnClientEvent:Connect(function()
local Camera = game.Workspace.CurrentCamera
local Seed = math.random()
local X = 0
local Z = 0
game:GetService("RunService").RenderStepped:Connect(function()
Camera.CFrame = Camera.CFrame * CFrame.Angles(math.noise(Seed, X * 0.35, Z * 0.35) * 0.02, math.noise(X * 0.35, Seed, Z * 0.35) * 0.02, 0)
X = X + 0.4
Z = Z + 0.4
end)
end)
please help em its an emergency
https://redd.it/1hxhq0n
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
ZeroBrane Autocomplete Function?
Hi guys,
I've recently tried some other ide's but zerobrane just works great with lua & love2d.
However atom and vscode both have this thing where you type fun and it autocreates a function putting your line at the noscript, tab to switch to args and tab to switch to body.
Can someone help/direct/guide me to getting this on zerobrane?
https://redd.it/1hxmbh2
@r_lua
Hi guys,
I've recently tried some other ide's but zerobrane just works great with lua & love2d.
However atom and vscode both have this thing where you type fun and it autocreates a function putting your line at the noscript, tab to switch to args and tab to switch to body.
Can someone help/direct/guide me to getting this on zerobrane?
https://redd.it/1hxmbh2
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua Language Server support for my 2D game framework
Hi everyone,
I wanted to share something I’ve been working on over the past few weeks. I’ve improved the Lua development workflow for my open-source 2D game framework, nCine, and put together a video to demonstrate it.
The updated workflow now includes:
- Autocomplete
- Type checking
- Full API documentation
- Debugger support
These features are made possible thanks to the Lua Language Server and the Local Lua Debugger, and they make noscripting a lot more efficient and enjoyable.
Here’s the video if you’d like to check it out:
🎥 https://www.youtube.com/watch?v=vyXqnrW5_5Y
If you’re interested, there’s more information in the video denoscription and on the project’s website: https://ncine.github.io/.
If you’ve used the Lua Language Server with other game frameworks like LÖVE, Solarus, or Solar2D, I’d love to hear your thoughts. Does this workflow feel on par with what you’ve experienced?
https://redd.it/1hy5qnj
@r_lua
Hi everyone,
I wanted to share something I’ve been working on over the past few weeks. I’ve improved the Lua development workflow for my open-source 2D game framework, nCine, and put together a video to demonstrate it.
The updated workflow now includes:
- Autocomplete
- Type checking
- Full API documentation
- Debugger support
These features are made possible thanks to the Lua Language Server and the Local Lua Debugger, and they make noscripting a lot more efficient and enjoyable.
Here’s the video if you’d like to check it out:
🎥 https://www.youtube.com/watch?v=vyXqnrW5_5Y
If you’re interested, there’s more information in the video denoscription and on the project’s website: https://ncine.github.io/.
If you’ve used the Lua Language Server with other game frameworks like LÖVE, Solarus, or Solar2D, I’d love to hear your thoughts. Does this workflow feel on par with what you’ve experienced?
https://redd.it/1hy5qnj
@r_lua
YouTube
The new Lua development workflow with the nCine
Enjoy autocomplete, type checking, and full Lua API documentation with the official support from the Lua Language Server!
Don't forget to install the Local Lua Debugger extension for debugging support.
Read the new Lua API documentation at: https://ncine…
Don't forget to install the Local Lua Debugger extension for debugging support.
Read the new Lua API documentation at: https://ncine…
Help with lua returning a string for conky
Hello, i am looking to get some help with lua. I am trying to create a noscript to get and return weather data for conky. It mostly works as text until i tried to get it to display images. I have all the images it needs, but when i try to get it to load the images in conky instead of the image i jsut get the conky image command as text
This is the string i am using
It displays as this
https://ibb.co/XpmRs9j
Can anyone help me figure out what's wrong ?
Thanks!
https://redd.it/1hy7ttj
@r_lua
Hello, i am looking to get some help with lua. I am trying to create a noscript to get and return weather data for conky. It mostly works as text until i tried to get it to display images. I have all the images it needs, but when i try to get it to load the images in conky instead of the image i jsut get the conky image command as text
This is the string i am using
-- Return the image pathreturn string.format("Location: %s\nTemperature: %d°C\nCondition: %s\nHumidity: %d%%\nWind Speed: %.1f m/s\n${image \"%s/.conky/lua/images/%s.png\"}",city, temp, condition, humidity, wind_speed, os.getenv("HOME"), icon_code)It displays as this
https://ibb.co/XpmRs9j
Can anyone help me figure out what's wrong ?
Thanks!
https://redd.it/1hy7ttj
@r_lua
ImgBB
Screenshot-from-2025-01-10-12-06-29 hosted at ImgBB
Image Screenshot-from-2025-01-10-12-06-29 hosted in ImgBB
2d IDE for lua game dev that isn't pico-8?
Hey y'all, going through a bit of a confusing time rn as far as programming goes, was set on Lua but then switched to python, then to C, then to Go, then to common lisp, now back on Lua again. I was "learning lua" for a few months but made like zero progress because I didn't really do anything, so I want to change that this time. Anyway, back to what I was saying and sorry for the mini-rant lol, do any of y'all have recommendations for 2D IDE's/Engines for Lua game development that aren't pico-8? Also for anyone wondering why not pico-8, I has no moneys and also I don't like the constraints (I know why they're there, just not for me). If not I'll just learn Löve2d. Thanks!
https://redd.it/1hzaqbz
@r_lua
Hey y'all, going through a bit of a confusing time rn as far as programming goes, was set on Lua but then switched to python, then to C, then to Go, then to common lisp, now back on Lua again. I was "learning lua" for a few months but made like zero progress because I didn't really do anything, so I want to change that this time. Anyway, back to what I was saying and sorry for the mini-rant lol, do any of y'all have recommendations for 2D IDE's/Engines for Lua game development that aren't pico-8? Also for anyone wondering why not pico-8, I has no moneys and also I don't like the constraints (I know why they're there, just not for me). If not I'll just learn Löve2d. Thanks!
https://redd.it/1hzaqbz
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
"Programming in Lua" Journey
A while back I decided that I want to add lua binding to the project I'm working on (ceph). I'm mainly a C++ developer, and did not have any real experience with lua (except helping my kid with some roblox stuff...).
Initially, I picked lua since other projects in similar domains use it (nginx, haproxy, redis, etc.), but as I went on with my work I really fell in love with the language :-)
Currently, I have most of the bindings implemented on the Object Gateway of Ceph. But,I also figured out my knowledge of the language itself is very limited...
To try and fix that, I bought the "Programming in Lua" book and started to read through it and do the exercises (reading is pretty useless without the exercises). So far, I finished "Part I" (chapters 1 - 8), and documented in this repo: https://github.com/yuvalif/PIL
It has been great fun, but could be even better if done together with others. So, if anyone has also gone through these exercises, or want to give me some feedback, new ideas or want to tag along in this journey, it would be wonderful!
(I'll try to post regularly as I chew through the book)
https://redd.it/1hzslfk
@r_lua
A while back I decided that I want to add lua binding to the project I'm working on (ceph). I'm mainly a C++ developer, and did not have any real experience with lua (except helping my kid with some roblox stuff...).
Initially, I picked lua since other projects in similar domains use it (nginx, haproxy, redis, etc.), but as I went on with my work I really fell in love with the language :-)
Currently, I have most of the bindings implemented on the Object Gateway of Ceph. But,I also figured out my knowledge of the language itself is very limited...
To try and fix that, I bought the "Programming in Lua" book and started to read through it and do the exercises (reading is pretty useless without the exercises). So far, I finished "Part I" (chapters 1 - 8), and documented in this repo: https://github.com/yuvalif/PIL
It has been great fun, but could be even better if done together with others. So, if anyone has also gone through these exercises, or want to give me some feedback, new ideas or want to tag along in this journey, it would be wonderful!
(I'll try to post regularly as I chew through the book)
https://redd.it/1hzslfk
@r_lua
GitHub
GitHub - ceph/ceph: Ceph is a distributed object, block, and file storage platform
Ceph is a distributed object, block, and file storage platform - GitHub - ceph/ceph: Ceph is a distributed object, block, and file storage platform
Problems while installing LÖVR on EndeavourOS linux.
Hi, recently I tried to install LÖVR by compiling it from source. I cloned the repo and ran
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
Unfortunately, docs don't list what to do after this and probably assume some level of CMake profficiency:
[https://lovr.org/docs/Compiling#linux](https://lovr.org/docs/Compiling#linux)
They say how to run LÖVR with VR, but that's not what I want to do right now.
Now, if i run `lovr` file from bin subdirectory, I get this error:
lovr: /usr/src/debug/glfw/glfw-3.4/src/window.c:868: glfwGetWindowAttrib: Assertion `window != NULL' failed.
Aborted (core dumped)
If I run `sudo make install .` I get different error:
CMake Error at luajit/src/cmake_install.cmake:81 (file):
file INSTALL cannot find
"/home/user1/dev/lovr/first_touch/build/luajit/src/luajit": No such file
or directory.
Call Stack (most recent call first):
luajit/cmake_install.cmake:47 (include)
cmake_install.cmake:48 (include)
I do not really use CMake that often and am not fluent in compiling software from source.
What have I done wrong? And what should I do now?
Thanks in advance.
https://redd.it/1i0bzno
@r_lua
Hi, recently I tried to install LÖVR by compiling it from source. I cloned the repo and ran
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
Unfortunately, docs don't list what to do after this and probably assume some level of CMake profficiency:
[https://lovr.org/docs/Compiling#linux](https://lovr.org/docs/Compiling#linux)
They say how to run LÖVR with VR, but that's not what I want to do right now.
Now, if i run `lovr` file from bin subdirectory, I get this error:
lovr: /usr/src/debug/glfw/glfw-3.4/src/window.c:868: glfwGetWindowAttrib: Assertion `window != NULL' failed.
Aborted (core dumped)
If I run `sudo make install .` I get different error:
CMake Error at luajit/src/cmake_install.cmake:81 (file):
file INSTALL cannot find
"/home/user1/dev/lovr/first_touch/build/luajit/src/luajit": No such file
or directory.
Call Stack (most recent call first):
luajit/cmake_install.cmake:47 (include)
cmake_install.cmake:48 (include)
I do not really use CMake that often and am not fluent in compiling software from source.
What have I done wrong? And what should I do now?
Thanks in advance.
https://redd.it/1i0bzno
@r_lua
Can a LUA noscript be used to replace a file that is within a ZIP file?
I am very new to this so I apologize if this is a stupid question.
I'm currently designing a Reaper Theme that will have it's own theme adjuster (the adjuster is the lua noscript), and I'm trying to plan ahead a bit and figure out what I should or should not be investing time into.
Something I wanted for the theme is the ability to swap out theme images using the noscript, similar to this noscript (it's called the Theme Assembler which is used in conjunction with the Theme Assembler Theme).
Normally, a theme and all it's files are zipped within a .ReaperThemeZip file (but it doesn't need to be). In order for the Theme Assembler noscript to work however the Theme Assembler theme must be unpacked.
Want I want to know is if it's possible to accomplish the same thing if the theme was in its zipped state with the .ReaperThemeZip. Basically to use a LUA noscript to drop in and replace images within the .ReaperThemeZip.
https://redd.it/1i0hz0y
@r_lua
I am very new to this so I apologize if this is a stupid question.
I'm currently designing a Reaper Theme that will have it's own theme adjuster (the adjuster is the lua noscript), and I'm trying to plan ahead a bit and figure out what I should or should not be investing time into.
Something I wanted for the theme is the ability to swap out theme images using the noscript, similar to this noscript (it's called the Theme Assembler which is used in conjunction with the Theme Assembler Theme).
Normally, a theme and all it's files are zipped within a .ReaperThemeZip file (but it doesn't need to be). In order for the Theme Assembler noscript to work however the Theme Assembler theme must be unpacked.
Want I want to know is if it's possible to accomplish the same thing if the theme was in its zipped state with the .ReaperThemeZip. Basically to use a LUA noscript to drop in and replace images within the .ReaperThemeZip.
https://redd.it/1i0hz0y
@r_lua