Roblox Studio (that uses lua noscript for noscripting games) just added ability to add comments to functions
https://www.youtube.com/watch?v=bII-FIL2w-E
https://redd.it/1ghfrlb
@r_lua
https://www.youtube.com/watch?v=bII-FIL2w-E
https://redd.it/1ghfrlb
@r_lua
YouTube
ROBLOX drops new USEFUL studio update for LUA noscript devs
New ROBLOX Studio update is here for LUA developers! You can now add comments to functions in roblox studio (lua noscript) and style them using SOME available html tags.
Dev forum: https://devforum.roblox.com/t/new-noscript-editor-hover-tips-and-user-defined…
Dev forum: https://devforum.roblox.com/t/new-noscript-editor-hover-tips-and-user-defined…
I manage to embed lua vm to my project!
Hey Lua community! I wanted to share a project I've been working on called RapidForge, it platform for building internal apps, automating tasks and creating web pages. Everything comes with a single binary and I manage to embed Lua VM into RapidForge. Big thanks to the Cosmopolitan project for making this possible!
With RapidForge, you can easily set up webhooks, schedule periodic tasks, and implement custom business logic using Lua. The platform takes care of the boilerplate for you, parsing request data automatically and making it available as environment variables (I’m planning to improve this further).
Lua is amazing language, I think its also a perfect language to experiment its small but performant and very easy to learn.
https://redd.it/1ghh7z7
@r_lua
Hey Lua community! I wanted to share a project I've been working on called RapidForge, it platform for building internal apps, automating tasks and creating web pages. Everything comes with a single binary and I manage to embed Lua VM into RapidForge. Big thanks to the Cosmopolitan project for making this possible!
With RapidForge, you can easily set up webhooks, schedule periodic tasks, and implement custom business logic using Lua. The platform takes care of the boilerplate for you, parsing request data automatically and making it available as environment variables (I’m planning to improve this further).
Lua is amazing language, I think its also a perfect language to experiment its small but performant and very easy to learn.
https://redd.it/1ghh7z7
@r_lua
rapidforge.io
RapidForge | Low-Code Platform for Apps, Automation & Web Development
Build internal tools, automate workflows and create web pages with RapidForge. Ideal for developers, DevOps and SOAR teams seeking a low code solution.
A boostraped Lua Compiiler (create executables and embed stuff on native binaries)
https://github.com/OUIsolutions/Darwin
https://redd.it/1gi5nrd
@r_lua
https://github.com/OUIsolutions/Darwin
https://redd.it/1gi5nrd
@r_lua
GitHub
GitHub - OUIsolutions/Darwin: A Boostrapped lua Compiler
A Boostrapped lua Compiler. Contribute to OUIsolutions/Darwin development by creating an account on GitHub.
Why did this regex fail?
why did
https://redd.it/1gja380
@r_lua
why did
print(("PascalCase"):match("^(%u%l+)+")) returns nil while ^([A-Z][a-z]+)+ in pcre2 works.https://redd.it/1gja380
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Making a synth
I am a beginner programmer and I decided that I want to try and make my own synthesizer as a project. I know it might not be best for a beginner but I don’t have a time limit or anything, it’s just something I want to try. My question is: I was looking at different programming languages and stumbled upon Lua. So I’m wondering whether a project like that is worth making in Lua(as in if there are any problems I will encounter ) or should I do it in a different language?
https://redd.it/1gjstnj
@r_lua
I am a beginner programmer and I decided that I want to try and make my own synthesizer as a project. I know it might not be best for a beginner but I don’t have a time limit or anything, it’s just something I want to try. My question is: I was looking at different programming languages and stumbled upon Lua. So I’m wondering whether a project like that is worth making in Lua(as in if there are any problems I will encounter ) or should I do it in a different language?
https://redd.it/1gjstnj
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I made a Banner Designer (Or presentation card maker) in Lua for the terminal
https://redd.it/1gk75we
@r_lua
https://redd.it/1gk75we
@r_lua
Tiny Typing Utility Library
Hello y'all, I'm here to share a small lib I made for my own convenience and I think it might be useful to more people:
https://github.com/VicCAlq/moonkind
This is a simpler alternative to people who want the safety of a typing system but might not want to deal with using a language that compiles/transpiles to Lua or has any other kind of build step. I still want to work more on the feature of matching an "object's shape", but at the current point it can already be used.
It's already available on LuaRocks as
Any feedback is more than welcome :D
https://redd.it/1gkp0vf
@r_lua
Hello y'all, I'm here to share a small lib I made for my own convenience and I think it might be useful to more people:
https://github.com/VicCAlq/moonkind
This is a simpler alternative to people who want the safety of a typing system but might not want to deal with using a language that compiles/transpiles to Lua or has any other kind of build step. I still want to work more on the feature of matching an "object's shape", but at the current point it can already be used.
It's already available on LuaRocks as
moonkind, so a simple luarocks install moonkind suffices.Any feedback is more than welcome :D
https://redd.it/1gkp0vf
@r_lua
GitHub
GitHub - VicCAlq/moonkind: Simple type assertions for your Lua projects
Simple type assertions for your Lua projects. Contribute to VicCAlq/moonkind development by creating an account on GitHub.
lua-docs: aesthetic documentation for the coolest noscripting language
Hey y'all, I'm pretty new to Lua, so when I tried to find documentation, it was either some outdated, scattered website tutorial or the lua.org manual that's incredibly long. I thought it'd be nice to have some good docs for the standard libraries!
And here it is: https://lua-docs.vercel.app
It's mostly copied from the manual but placed in a way that everything's easy to access. There's also a dark mode. Pretty cool, pretty cool. There's version 5.1 (which LuaJIT specs are at rn i think) and version 5.4 (most recent "major" release). There might be some errors with the formatting... but it should mostly be okay... (power of regex and command-f). People can always send a pr on the github repo for any basic issues with the markdown.
There's more dev notes at https://lua-docs.vercel.app/docs/about if you're interested.
https://preview.redd.it/h124q40y6czd1.png?width=2878&format=png&auto=webp&s=5e7879a4ad3bd3a86c350c9665b9f5c9b51760a0
https://preview.redd.it/471ai53h7czd1.png?width=2844&format=png&auto=webp&s=1c21b0e7088266635001dbff266ae5fb9ac02921
I hope its helpful for some peeps!
https://redd.it/1gl7qhf
@r_lua
Hey y'all, I'm pretty new to Lua, so when I tried to find documentation, it was either some outdated, scattered website tutorial or the lua.org manual that's incredibly long. I thought it'd be nice to have some good docs for the standard libraries!
And here it is: https://lua-docs.vercel.app
It's mostly copied from the manual but placed in a way that everything's easy to access. There's also a dark mode. Pretty cool, pretty cool. There's version 5.1 (which LuaJIT specs are at rn i think) and version 5.4 (most recent "major" release). There might be some errors with the formatting... but it should mostly be okay... (power of regex and command-f). People can always send a pr on the github repo for any basic issues with the markdown.
There's more dev notes at https://lua-docs.vercel.app/docs/about if you're interested.
https://preview.redd.it/h124q40y6czd1.png?width=2878&format=png&auto=webp&s=5e7879a4ad3bd3a86c350c9665b9f5c9b51760a0
https://preview.redd.it/471ai53h7czd1.png?width=2844&format=png&auto=webp&s=1c21b0e7088266635001dbff266ae5fb9ac02921
I hope its helpful for some peeps!
https://redd.it/1gl7qhf
@r_lua
lua.org
The Programming Language Lua
Official website of the Lua language
Anyone interested in study how to write LUA with reframework?
Reframework is a powerful plugin for games and it support almost all CAPCOM games, but this plugin is lack of example so that it is difficult to master the programming skill, and I am only interested in joystick feedback so I only give example of joystick here. I want to ask about how to turn singleton of Reframework into LUA code.
1. Singleton for any key is press:
app.InputManager -> Reflection Properties -> app.inputDeviceFlag
2. Singleton for specific key is press:
app.InputManager -> AutoGeneratedItem -> app.InputState -> AutoGeneratedItem ->ArrayEntries[2\] ->
0x0:app.InputDeviceStateGamePad -> AutoGeneratedItem -> arrayEntries[32\] -> Reflection Properties ->
app.inputDeviceFlag
I have read the instruction of Reframework wiki, Reflection Properties item need special setting to access, did anyone here knew about it or is reframework bad at detecting joystick?
https://redd.it/1glr04x
@r_lua
Reframework is a powerful plugin for games and it support almost all CAPCOM games, but this plugin is lack of example so that it is difficult to master the programming skill, and I am only interested in joystick feedback so I only give example of joystick here. I want to ask about how to turn singleton of Reframework into LUA code.
1. Singleton for any key is press:
app.InputManager -> Reflection Properties -> app.inputDeviceFlag
2. Singleton for specific key is press:
app.InputManager -> AutoGeneratedItem -> app.InputState -> AutoGeneratedItem ->ArrayEntries[2\] ->
0x0:app.InputDeviceStateGamePad -> AutoGeneratedItem -> arrayEntries[32\] -> Reflection Properties ->
app.inputDeviceFlag
I have read the instruction of Reframework wiki, Reflection Properties item need special setting to access, did anyone here knew about it or is reframework bad at detecting joystick?
https://redd.it/1glr04x
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How to start?
Hey, I want learn Lua on the I Pad, how should I start (With which app) and are there any good Videos or playlist on You tube to Help me?
https://redd.it/1gm1z3c
@r_lua
Hey, I want learn Lua on the I Pad, how should I start (With which app) and are there any good Videos or playlist on You tube to Help me?
https://redd.it/1gm1z3c
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
The function that I like in Lua
< Python >
< Lua >
I think it is beneficial to view entire logic.
What else?
https://redd.it/1gmft0z
@r_lua
< Python >
if try == 0: self:Reset() return < Lua >
if try == 0 then self:Reset() return endI think it is beneficial to view entire logic.
What else?
https://redd.it/1gmft0z
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How to install Lua on macOS 14?
I am extremely interested into learning Lua, but I prefer using macOS. Is there any way to install Lua on a MacBook? By the way, what's the most recommended IDE for Lua?
https://redd.it/1gmit2b
@r_lua
I am extremely interested into learning Lua, but I prefer using macOS. Is there any way to install Lua on a MacBook? By the way, what's the most recommended IDE for Lua?
https://redd.it/1gmit2b
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Help with Removing the Dot in Modern X Progress Bar (Lua Extension for MPV)
Help with Removing the Dot in Modern X Progress Bar (Lua Extension for MPV)
Hi everyone!
I’m using the ModernX interface for MPV, which is Lua-based. However, I’m trying to remove a dot in the progress bar that I find distracting. Does anyone know how to adjust this in the Lua code?
https://preview.redd.it/b3gr9a4p2uzd1.png?width=130&format=png&auto=webp&s=7b1494c28f3564717b473b6c0957407f1b4bccfe
I Use an older version of this so please download this from the google drive.
https://drive.google.com/file/d/1fFXiYIHrp0RlKLIRAs5fBIPvVMuaJDdL/view?usp=sharing
Sorry for the bother i cant upload it form here, i promise it is not a virus just a Lua. Google can scan it.
https://preview.redd.it/xtnnqdy05uzd1.png?width=2007&format=png&auto=webp&s=0efb66cf0f4c61007d8f94e6babec74f599e04fb
You can check with virus total too. it is safe
However this is the github for this extension it self
https://github.com/zydezu/ModernX/blob/main/modernx.lua
Would really appreciate any insights from those familiar with tweaking Lua for MPV!
Thanks in advance!
https://redd.it/1gn5inb
@r_lua
Help with Removing the Dot in Modern X Progress Bar (Lua Extension for MPV)
Hi everyone!
I’m using the ModernX interface for MPV, which is Lua-based. However, I’m trying to remove a dot in the progress bar that I find distracting. Does anyone know how to adjust this in the Lua code?
https://preview.redd.it/b3gr9a4p2uzd1.png?width=130&format=png&auto=webp&s=7b1494c28f3564717b473b6c0957407f1b4bccfe
I Use an older version of this so please download this from the google drive.
https://drive.google.com/file/d/1fFXiYIHrp0RlKLIRAs5fBIPvVMuaJDdL/view?usp=sharing
Sorry for the bother i cant upload it form here, i promise it is not a virus just a Lua. Google can scan it.
https://preview.redd.it/xtnnqdy05uzd1.png?width=2007&format=png&auto=webp&s=0efb66cf0f4c61007d8f94e6babec74f599e04fb
You can check with virus total too. it is safe
However this is the github for this extension it self
https://github.com/zydezu/ModernX/blob/main/modernx.lua
Would really appreciate any insights from those familiar with tweaking Lua for MPV!
Thanks in advance!
https://redd.it/1gn5inb
@r_lua
Bug Fixing for an OBS timer?
I'm trying to create a timer counter for OBS paired with a distance counter (Think "I walked 10 feet in 10 minutes".
What's odd is that it's working entirely for my OBS... And not anyone else??
I can run it well on my computer but if anyone else tries it, it either crashes their OBS, gives them a very strange number, or keeps counting without correctly adding the distance interval.
I've been trying to fix it for hours, but it's hard to debug when I can't seem to test it on my own computer. I'm very tired and there's a time limit to it, so I can't keep running random trials and asking my friends to test it. Could someone review my code and pinpoint why it may be continuing to count the time without adding distance when prompted?
https://redd.it/1gn7uzl
@r_lua
I'm trying to create a timer counter for OBS paired with a distance counter (Think "I walked 10 feet in 10 minutes".
What's odd is that it's working entirely for my OBS... And not anyone else??
I can run it well on my computer but if anyone else tries it, it either crashes their OBS, gives them a very strange number, or keeps counting without correctly adding the distance interval.
I've been trying to fix it for hours, but it's hard to debug when I can't seem to test it on my own computer. I'm very tired and there's a time limit to it, so I can't keep running random trials and asking my friends to test it. Could someone review my code and pinpoint why it may be continuing to count the time without adding distance when prompted?
obs = obsluadistance = 0 time_elapsed = 0 interval = 9 * 60 distance_increment = 1 timer_started = false last_time = 0 text_source_name = ""timer_interval = 1000function noscript_denoscription()return "Increments a distance counter by a specified amount every set interval. Displays Time and Distance."endfunction noscript_properties()local props = obs.obs_properties_create()obs.obs_properties_add_int(props, "interval", "Interval (minutes)", 1, 1440, 1)obs.obs_properties_add_int(props, "distance_increment", "Distance Increment", 1, 100, 1)obs.obs_properties_add_text(props, "text_source", "Text Source Name", obs.OBS_TEXT_DEFAULT)obs.obs_properties_add_button(props, "start_button", "Start", start_button)obs.obs_properties_add_button(props, "stop_button", "Stop", stop_button)obs.obs_properties_add_button(props, "reset_button", "Reset", reset_button)return propsendfunction noscript_update(settings)interval = obs.obs_data_get_int(settings, "interval") * 60distance_increment = obs.obs_data_get_int(settings, "distance_increment")text_source_name = obs.obs_data_get_string(settings, "text_source")obs.noscript_log(obs.LOG_INFO, "Interval set to: " .. interval .. " seconds")obs.noscript_log(obs.LOG_INFO, "Distance increment set to: " .. distance_increment)obs.noscript_log(obs.LOG_INFO, "Text source name: " .. text_source_name)endfunction start_button()if not timer_started thenlast_time = os.time()obs.timer_add(timer_callback, timer_interval)timer_started = trueobs.noscript_log(obs.LOG_INFO, "Timer started.")elseobs.noscript_log(obs.LOG_INFO, "Timer already running.")endendfunction stop_button()if timer_started thenobs.timer_remove(timer_callback)timer_started = falseobs.noscript_log(obs.LOG_INFO, "Timer stopped.")elseobs.noscript_log(obs.LOG_WARNING, "Timer not running.")endendfunction reset_button()distance, time_elapsed = 0, 0update_text_source()obs.noscript_log(obs.LOG_INFO, "Distance and Time reset.")endfunction timer_callback()if not timer_started then return endlocal current_time = os.time()local time_diff = current_time - last_timelast_time = current_timetime_elapsed = time_elapsed + time_diffif time_elapsed >= interval thendistance = distance + distance_incrementtime_elapsed = time_elapsed - interval obs.noscript_log(obs.LOG_INFO, "Distance updated to: " .. distance .. " km after interval reached.")endupdate_text_source()endfunction update_text_source()local source = obs.obs_get_source_by_name(text_source_name)if source thenlocal settings = obs.obs_data_create()local minutes, seconds = math.floor(time_elapsed / 60), time_elapsed % 60local time_string = string.format("Time: %d:%02d\nDistance: %d km", minutes, seconds, distance)obs.obs_data_set_string(settings, "text", time_string)obs.obs_source_update(source, settings)obs.obs_data_release(settings)obs.obs_source_release(source)elseobs.noscript_log(obs.LOG_WARNING, "Text source not found.")endendhttps://redd.it/1gn7uzl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
What Roblox game should I make?
I want to be a developer, and I think roblox is a good way to start. Do any of you know some good game ideas for me? PS: I am a solo developer
https://redd.it/1gn9hjq
@r_lua
I want to be a developer, and I think roblox is a good way to start. Do any of you know some good game ideas for me? PS: I am a solo developer
https://redd.it/1gn9hjq
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I want to learn lua
Hello,I want to start learning lua to make games,and idk how I should learn it,i decided on using notepad++ (tell me if there are any better softwares to code in) and idk if I should use this one and learn from youtube videos ,or use roblox and youtube to learn it
https://redd.it/1gndt21
@r_lua
Hello,I want to start learning lua to make games,and idk how I should learn it,i decided on using notepad++ (tell me if there are any better softwares to code in) and idk if I should use this one and learn from youtube videos ,or use roblox and youtube to learn it
https://redd.it/1gndt21
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua Pandoc Citation Modifier
I'm trying to create a lua noscript that does the following with pandoc and its internal citeproc:
The current input is: \`(MPD; \[@Somereference2020 noparens\])\`
The desired output is: \`(MPD; Somereference, 2020)\` with the correct internal link to citeproc references.
I'm close, but I can't seem to wrangle removing the preceding space before \`noparens\` on the output.
Current output is: \`(MPD; Somereference, 2020 )\`
Note the space after the year which I've been able to debug to being the preceding space before the \`noparens\` (based on the debug output with carrots).
Thanks in advance to the Lua ninja ... Here's the code
function Cite(cite)
for i, citation in ipairs(cite.citations) do
if citation.suffix and pandoc.utils.stringify(citation.suffix):match("noparens") then
-- Debugging: Print the original suffix
print("Original suffix:", pandoc.utils.stringify(citation.suffix))
-- Remove 'noparens' from the suffix
local new_suffix = pandoc.List{}
for _, item in ipairs(citation.suffix) do
if item.t == "Str" then
-- Remove 'noparens' and trim spaces/commas
item.text = item.text:gsub("noparens", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
if item.text ~= "" then
new_suffix:insert(item)
end
else
new_suffix:insert(item)
end
end
citation.suffix = new_suffix
-- Debugging: Print the modified suffix
print("Modified suffix:", pandoc.utils.stringify(citation.suffix))
-- Debugging: Print the original content
print("Original content:", pandoc.utils.stringify(cite.content))
-- Remove 'noparens' and unnecessary parentheses from the content
local new_content = pandoc.List{}
for _, item in ipairs(cite.content) do
if item.t == "Str" then
-- Remove 'noparens' and parentheses
item.text = item.text:gsub("noparens", ""):gsub("%(", ""):gsub("%)", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
end
if item.text ~= "" then
new_content:insert(item)
end
end
cite.content = new_content
-- Debugging: Print the modified content
print("Modified citation: ^" .. pandoc.utils.stringify(cite) .. "^")
return cite
end
end
end
https://redd.it/1go35uf
@r_lua
I'm trying to create a lua noscript that does the following with pandoc and its internal citeproc:
The current input is: \`(MPD; \[@Somereference2020 noparens\])\`
The desired output is: \`(MPD; Somereference, 2020)\` with the correct internal link to citeproc references.
I'm close, but I can't seem to wrangle removing the preceding space before \`noparens\` on the output.
Current output is: \`(MPD; Somereference, 2020 )\`
Note the space after the year which I've been able to debug to being the preceding space before the \`noparens\` (based on the debug output with carrots).
Thanks in advance to the Lua ninja ... Here's the code
function Cite(cite)
for i, citation in ipairs(cite.citations) do
if citation.suffix and pandoc.utils.stringify(citation.suffix):match("noparens") then
-- Debugging: Print the original suffix
print("Original suffix:", pandoc.utils.stringify(citation.suffix))
-- Remove 'noparens' from the suffix
local new_suffix = pandoc.List{}
for _, item in ipairs(citation.suffix) do
if item.t == "Str" then
-- Remove 'noparens' and trim spaces/commas
item.text = item.text:gsub("noparens", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
if item.text ~= "" then
new_suffix:insert(item)
end
else
new_suffix:insert(item)
end
end
citation.suffix = new_suffix
-- Debugging: Print the modified suffix
print("Modified suffix:", pandoc.utils.stringify(citation.suffix))
-- Debugging: Print the original content
print("Original content:", pandoc.utils.stringify(cite.content))
-- Remove 'noparens' and unnecessary parentheses from the content
local new_content = pandoc.List{}
for _, item in ipairs(cite.content) do
if item.t == "Str" then
-- Remove 'noparens' and parentheses
item.text = item.text:gsub("noparens", ""):gsub("%(", ""):gsub("%)", ""):gsub("^%s*,%s*", ""):gsub("%s*,%s*$", "")
end
if item.text ~= "" then
new_content:insert(item)
end
end
cite.content = new_content
-- Debugging: Print the modified content
print("Modified citation: ^" .. pandoc.utils.stringify(cite) .. "^")
return cite
end
end
end
https://redd.it/1go35uf
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community