Localizing
Will localizing hot table lookups be faster?
https://redd.it/1p1w5rh
@r_lua
Will localizing hot table lookups be faster?
VM.Register = {}
local Register = VM.Register
https://redd.it/1p1w5rh
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I need help compiling a program from GitHub.
I want to decompile several Lua files. I found a page, luadec.metaworm.site, which had a GitHub repository: https://github.com/metaworm/luac-parser-rs
, so I went there, and that led me to believe it could be compiled, so I tried it (I've never done it before). This program uses Rust; I downloaded everything, even the night version, and it doesn't work when compiling. I got these errors, and of course, I don't know anything about this:
let (mut input, out) = le_u8(input)?;
...
(input, out) = complete::le_u64(input)?;
p.as_ptr().sub_ptr(input.as_ptr())
The thing is, I want to remove the censorship from a game, and I need to create a file to batch decompile it.
https://redd.it/1p1z2vh
@r_lua
I want to decompile several Lua files. I found a page, luadec.metaworm.site, which had a GitHub repository: https://github.com/metaworm/luac-parser-rs
, so I went there, and that led me to believe it could be compiled, so I tried it (I've never done it before). This program uses Rust; I downloaded everything, even the night version, and it doesn't work when compiling. I got these errors, and of course, I don't know anything about this:
let (mut input, out) = le_u8(input)?;
...
(input, out) = complete::le_u64(input)?;
p.as_ptr().sub_ptr(input.as_ptr())
The thing is, I want to remove the censorship from a game, and I need to create a file to batch decompile it.
https://redd.it/1p1z2vh
@r_lua
GitHub
GitHub - metaworm/luac-parser-rs: lua bytecode parser written in Rust using nom, part of metaworm's lua decompiler, support lu…
lua bytecode parser written in Rust using nom, part of metaworm's lua decompiler, support lua51/lua52/lua53/lua54/luajit/luau https://luadec.metaworm.site/ - metaworm/luac-parser-rs
Looking for a better pure Lua library for handling large numbers
Hey everyone, I’m looking for a pure Lua library to handle really large numbers, something easier to use.
The old library I was using (int) sometimes loses precision when dividing large numbers, so I need something more reliable.
Anyone has recommendations or alternatives?
https://redd.it/1p26lcr
@r_lua
Hey everyone, I’m looking for a pure Lua library to handle really large numbers, something easier to use.
The old library I was using (int) sometimes loses precision when dividing large numbers, so I need something more reliable.
Anyone has recommendations or alternatives?
https://redd.it/1p26lcr
@r_lua
GitHub
GitHub - SupTan85/int: Enable large-number arithmetic in pure Lua.
Enable large-number arithmetic in pure Lua. Contribute to SupTan85/int development by creating an account on GitHub.
gibt es eine Lua/Luau lern website
i will Lua/Luau lernen damit ich roblox spiele für mich und meine freunde machen kann
https://redd.it/1p29fcc
@r_lua
i will Lua/Luau lernen damit ich roblox spiele für mich und meine freunde machen kann
https://redd.it/1p29fcc
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Hello. Starting from scratch, new to Lua, and coding in general. Where should I start?
Basically what it says on the tin, I hope to reach the end goal of creating a boat mod for project zomboid build 42 (despite the great difficulties that will come with it as seen from those who had already done it in b41), and coding games on roblox as well, and since Lua is required for both, I am here. Advice appreciated!
https://redd.it/1p4cf6f
@r_lua
Basically what it says on the tin, I hope to reach the end goal of creating a boat mod for project zomboid build 42 (despite the great difficulties that will come with it as seen from those who had already done it in b41), and coding games on roblox as well, and since Lua is required for both, I am here. Advice appreciated!
https://redd.it/1p4cf6f
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Roblox collection (2025 - 2006) (Steal a brainrot noscripted & Grow a garden)
also includes Azure Latch stand awakening aut and more..
https://codeberg.org/RobloxCollection/Roblox\_Game\_Collection
https://preview.redd.it/qjgqrbhmwx1g1.png?width=2250&format=png&auto=webp&s=df38ca1b56377c67d8bf6660bb29c64f35456f8f
https://preview.redd.it/c3ky87towx1g1.png?width=2264&format=png&auto=webp&s=a6d2b749418c1ebe26ae10ea9859c18e73e79018
https://preview.redd.it/vogsrpfrwx1g1.png?width=2264&format=png&auto=webp&s=9cc2e1b9174e72844fbcc99944aa2d0b2cf91985
https://preview.redd.it/l29v06zswx1g1.png?width=2250&format=png&auto=webp&s=f3f0a68e70291f47af12f9383b771a699e812bb9
Whats new:
2014_empty.rbxl
2025_Click_Tower.rbxl
2025_MMP_X.rbxl
2025_Squid_Game_Glass_Bridge.rbxl
2025_Steal_A_Dragon_Ball.rbxl
2008_Dark_Plateau.rbxl
2008_Lemur_Land_Mall.rbxl
2009_Heli_Wars_Winter_Mayhem.rbxl
2013_Castle_of_Birds.rbxl
2014_London_England.rbxl
2014_Mermaid_and_Fairies_Underwater.rbxl
2014_SS_Grandure.rbxl
https://redd.it/1p4njr6
@r_lua
also includes Azure Latch stand awakening aut and more..
https://codeberg.org/RobloxCollection/Roblox\_Game\_Collection
https://preview.redd.it/qjgqrbhmwx1g1.png?width=2250&format=png&auto=webp&s=df38ca1b56377c67d8bf6660bb29c64f35456f8f
https://preview.redd.it/c3ky87towx1g1.png?width=2264&format=png&auto=webp&s=a6d2b749418c1ebe26ae10ea9859c18e73e79018
https://preview.redd.it/vogsrpfrwx1g1.png?width=2264&format=png&auto=webp&s=9cc2e1b9174e72844fbcc99944aa2d0b2cf91985
https://preview.redd.it/l29v06zswx1g1.png?width=2250&format=png&auto=webp&s=f3f0a68e70291f47af12f9383b771a699e812bb9
Whats new:
2014_empty.rbxl
2025_Click_Tower.rbxl
2025_MMP_X.rbxl
2025_Squid_Game_Glass_Bridge.rbxl
2025_Steal_A_Dragon_Ball.rbxl
2008_Dark_Plateau.rbxl
2008_Lemur_Land_Mall.rbxl
2009_Heli_Wars_Winter_Mayhem.rbxl
2013_Castle_of_Birds.rbxl
2014_London_England.rbxl
2014_Mermaid_and_Fairies_Underwater.rbxl
2014_SS_Grandure.rbxl
https://redd.it/1p4njr6
@r_lua
Codeberg.org
Roblox_Game_Collection
lua and python
hello! i've been wanting to learn lua for a while, so i can learn how to make a certain roblox game. but i was thinking about python because it is a better software, if i learned python first, in a few years would lua be easier?
https://redd.it/1p4ouby
@r_lua
hello! i've been wanting to learn lua for a while, so i can learn how to make a certain roblox game. but i was thinking about python because it is a better software, if i learned python first, in a few years would lua be easier?
https://redd.it/1p4ouby
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Linked List speed vs table, not as expected?
I wrote a basic SLL implementation as part of my learning process with Lua and decided to do a bit of execution time testing to see how it held up compared to tables. Now, I recognize that tables are highly optimized, but I was a little surprised by what I found. Using a Linked List as a queue or stack had the same results, but it is taking a little more than twice as long as using a table (stack only, queue it is way slower).
Any idea why it is so much slower when both the Linked List and the table should be operating in O(n) time?
Here is the Linked List module
Here is the Linked List tester noscript and the table tester.
Cheers!
https://redd.it/1p658ch
@r_lua
I wrote a basic SLL implementation as part of my learning process with Lua and decided to do a bit of execution time testing to see how it held up compared to tables. Now, I recognize that tables are highly optimized, but I was a little surprised by what I found. Using a Linked List as a queue or stack had the same results, but it is taking a little more than twice as long as using a table (stack only, queue it is way slower).
Any idea why it is so much slower when both the Linked List and the table should be operating in O(n) time?
Here is the Linked List module
Here is the Linked List tester noscript and the table tester.
Cheers!
https://redd.it/1p658ch
@r_lua
How to do a noscript that detects when a capture card freezes and then deactivates and reactivates the capture card to fix it when obs or the noscript is bad at detecting when the capture card froze?
So I have a capture that has a problem to randomly freeze at least once during certain points but the problem is when it freezes audio still is going through perfectly and I think obs recognizes it as not frozen however when it freezes it stays frozen on a certain frame during the stream and only gets fix from activating and reactivating but the problem with any noscript I tried is they can’t detect when the freezing occurs because I believe obs doesn’t even detect the capture card froze since audio still goes through. So is it possible at all to fix this issue with a noscript or something that does work?
https://redd.it/1p66bbp
@r_lua
So I have a capture that has a problem to randomly freeze at least once during certain points but the problem is when it freezes audio still is going through perfectly and I think obs recognizes it as not frozen however when it freezes it stays frozen on a certain frame during the stream and only gets fix from activating and reactivating but the problem with any noscript I tried is they can’t detect when the freezing occurs because I believe obs doesn’t even detect the capture card froze since audio still goes through. So is it possible at all to fix this issue with a noscript or something that does work?
https://redd.it/1p66bbp
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Working with arbitrary numbers of args, emulating Python's slice?
This has come up as I've been working with the language and it hasn't been a problem yet, but I could see it being an issue. I think the easiest way to explain my question is to give an example:
If I run this with
This functionality with slices is really handy when you want to deal with an arbitrary number of arguments in a noscript.
In Lua, I've been working with varargs a bit, but my understanding of them is limited. Particularly, how you could go from a table of given arguments (the built-in
https://redd.it/1p7by1n
@r_lua
This has come up as I've been working with the language and it hasn't been a problem yet, but I could see it being an issue. I think the easiest way to explain my question is to give an example:
import sys
# Print the given args, starting with the third and continuing through any number of given args
def printargs(*args):
for a in args:
print(a)
printargs(*sys.argv[2:])
If I run this with
runfile(args='a b c d e'), it will print:b
c
d
e
This functionality with slices is really handy when you want to deal with an arbitrary number of arguments in a noscript.
In Lua, I've been working with varargs a bit, but my understanding of them is limited. Particularly, how you could go from a table of given arguments (the built-in
arg table) to a vararg to give to a function, starting at a given index? Or maybe this isn't a relevant problem when working with Lua?https://redd.it/1p7by1n
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Starting In Lua
Hello, I've been interested in learning how to program in Lua because I want to make Roblox games for fun and also get a sense of what programming is about. So I'm here to ask: how did you start learning? Is there any free online program that's worth it? Your experiences and advice would be a lot of help.
Thank you!
https://redd.it/1p7kgs4
@r_lua
Hello, I've been interested in learning how to program in Lua because I want to make Roblox games for fun and also get a sense of what programming is about. So I'm here to ask: how did you start learning? Is there any free online program that's worth it? Your experiences and advice would be a lot of help.
Thank you!
https://redd.it/1p7kgs4
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Writing compact code - how do I check for multiple possibilities all at once in the shortest statement possible?
I'm a relative newbie to Lua and I'm curious about ways to very compactly write a check for multiple possible values. Consider the following code:
Obviously functional for an if statement, but I want to know if there's a less repetitious way to write it. Does Lua have any tricks for making this more compact? If so, could these tricks be scaled up for checking large numbers of possible values all at once?
https://redd.it/1p7msep
@r_lua
I'm a relative newbie to Lua and I'm curious about ways to very compactly write a check for multiple possible values. Consider the following code:
if value ~= "a" and value ~= "b" and value ~= "c" thenObviously functional for an if statement, but I want to know if there's a less repetitious way to write it. Does Lua have any tricks for making this more compact? If so, could these tricks be scaled up for checking large numbers of possible values all at once?
https://redd.it/1p7msep
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community