Lua - Reddit – Telegram
Lua - Reddit
30 subscribers
278 photos
31 videos
4.23K links
News and discussion for the Lua programming language.

Subreddit: https://www.reddit.com/r/lua

Powered by : @r_channels & @reddit2telegram
Download Telegram
Lua Programming Gems book for a newer Lua programmer?

I'm still fairly new to Lua and have been working my way through the official book, remaking some of my Python programs and writing new noscripts to learn the language. I came across Lua Programming Gems from Feisty Duck and wanted to see what you guys thought of it. Would it be good for an otherwise experienced programmer learning Lua or should I hold off until I know the language better?

https://redd.it/1oz0w41
@r_lua
Would learning Lua effect my c++ learning journey

So i wanna learn Lua to use it on fantasy console and maybe make some Roblox games, I heard it was really easy but I'm afraid it could effect my c++ learning journey
What do you think

https://redd.it/1oz97mr
@r_lua
local variable in interactive mode

Why in the second line, the variable `a` becomes `nil`?

~ $ lua
Lua 5.4.7 Copyright (C) 1994-2024 Lua.org, PUC-Rio
> local a = 123; print(a)
123
> print(a)
nil

https://redd.it/1p00yzm
@r_lua
Is lua a good option for me?

Hi friends, i'm a Java/kotlin developer, most of the time i'm using Spring boot to make projects.

But recently i was searching for an easy 2 learn language for me to use It as a lab language, to learn web architecture without the opinative way from the Spring, and learn some other things like graphical programming, games and desktop programming(and a bit of DSA too).

My First ideia was lua because everyone say that Its a simple language and because Its from Brazil(my country).

I would appreciate any opinion.

https://redd.it/1p1d61d
@r_lua
Looking for someone that could do a Serious Sam 4/Serious Sam Siberian Mayhem dynamic bones mod which mainly consists of Lua noscripting.



There was a mod of it done in an earlier game that uses the same engine, here's the link to the mod, do let me know if it's possible to do it in the newer games too! https://steamcommunity.com/sharedfiles/filedetails/?id=1304802396

https://redd.it/1p1fppk
@r_lua
How do I noscript for Roblox?

Can you guys help me please, I really wanted to make a noscript for Roblox but I don't know how to do it, in fact I don't understand anything about programming and I don't have a PC to do this, but if anyone knows how to make a noscript for Roblox on their cell phone, please teach me how to create one, I would like to take a course for that but it's very expensive and I can't afford one.

https://redd.it/1p1kutb
@r_lua
Localizing

Will localizing hot table lookups be faster?
VM.Register = {}
local Register = VM.Register


https://redd.it/1p1w5rh
@r_lua
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
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
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
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
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
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
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
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
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:

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