Lua - Reddit – Telegram
Lua - Reddit
31 subscribers
281 photos
31 videos
4.27K links
News and discussion for the Lua programming language.

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

Powered by : @r_channels & @reddit2telegram
Download Telegram
I've only been learning for a short time, but I love physics so I tried this

Is it good for a beginner?



--define the root function
function root(x)
return math.sqrt(x)
end


--- light constant
c = 310^8

--get the values
print("how many percent of the speed of light")
v = (tonumber(
io.read())/100)c
print("what is the mass of the object(kg)")
M = tonumber(io.read())


--calculate lorentz value
LorentzFactor = (1/root(1-(v^2)/(c^2)))


--simplify the variable
F= Lorentz
Factor


--see if the value is less than the speed of light
if v >= c+1 then
print("               $ERROR.0".. math.random(1,10).. "$;enter a valid value (<= c)")
-- here checks if the value is equal
elseif v == c then
print(" $ERROR.0"..math.random(11,15)..";value approaches infinity")
--aki checks if the value is negative
elseif v <= -1 then
print("ERROR.016;identified negative value")

else
--energy calculation
E = (F - 1)Mc^2
--print the energy
print("the energy of the object is "..E)
end





https://redd.it/1ik0pz6
@r_lua
Thoughts on roblox as a free way to learn?

What are your thought son roblox studio and the platform itself, from a developer's perspective?


I'm leaning towards roblox but ive also considered love2d or some fantasy console.

I like lua and i want to learn the basic of it. ive messed with roblox but im not sure if i should stick with it. ive also never finished anything in studio.

https://redd.it/1ike280
@r_lua
Why did you guys decide to learn Lua?

Basically noscript.
I’m just curious to learn why other people decided to learn Lua. For me it’s for my work (I work as a robot programmer and I need to learn how to write some noscripts). I’m just starting out and I think it’s kinda fun.
Do you have any tips and or insights for a newb?

https://redd.it/1ilpbvz
@r_lua
fivem noscript support

ayone here with fivem noscripting that can help me out please?

https://redd.it/1ilssyh
@r_lua
How do you learn programming in general when you have mathematical struggles?

Hello, I have a learning disability and it affects my ability to comprehend math.

https://redd.it/1imcqo1
@r_lua
Learning Lua

Hello all!

I am very interested in Lua language because the game Final Fantasy XI has some add-ons that use it. Is there an online course I could take?? I've heard about Love2d

https://redd.it/1in7awd
@r_lua
It's lua a good choice to Desktop Apps?

My first language was lua, like 10 years ago, but then i start use JavaScript, and i forgot how to use lua btw, i want to know if i can use lua to make Desktop apps, not games, i want to build apps such as a POS or a Dashboard.

https://redd.it/1ini0e3
@r_lua
My two cents about my favorite language

Decided to write this up as a love letter to the best language - Lua

https://topcheto.eu/posts/0002

https://redd.it/1io7r01
@r_lua
Rationale for the numeric "for" loop syntax in Lua?

I've always been mystified by the obfuscated syntax of numeric "for" loops in Lua.

for i=10,1,-1 do

They seem so out of place compared to all of the other syntactical conventions of Lua which have more English-like semantics. I have to wonder was this a design decision by some completely separate group than the original creators of Lua? Or how did it come about?

https://redd.it/1io7ke6
@r_lua
Sub chat

Am looking for some lua coders here ,I have a problem with a roblox code, it's subbost to comment commands I selected and it's not working ,I tryed with Claude and gpt and still not working ,the code suppost to work in the noscript emulater (if you know what I mean) and not on roblox studio itself, can anyone help ;( ?

https://redd.it/1iodxer
@r_lua
Arrays start at 1 executive order
https://redd.it/1iosmv3
@r_lua
Why you should know Lua

Okay, maybe you don’t have to, but it’s definitely useful. People who know me well might be surprised here. They’re aware that my first programming language was PHP, but they don’t know that my second wasn’t JavaScript, it was Lua. I bet even my friends are confused now, and you probably are too. We’ll circle back to this.

## Why Should I Care?

That’s a fair question, especially if you already know other noscripting languages. Sure, you can live without Lua. But it’s lurking in places you’d never expect.

It’s popular, even if you rarely hear about it. Not as hyped as those Python devs who import every single letter, or Java folks in suits at banks, but Lua has an active community and plenty of great resources.

## It’s Simple. Too simple

Lua is a minimalist language with clean, straightforward syntax. It avoids unnecessary complexity, so you can learn it in a couple of hours. And here’s the classic example:

print('Hello, everyone! Except Java folks.')

if you.crazy() then
learnJava()
end


Lua isn’t usually used solo. It’s often embedded in game engines, other software, or paired with C/C++. I could list endless examples of where it’s used, but check this out if you’re curious.

## It’s fast

Lua is one of the fastest interpreted languages. It compiles to bytecode and runs on a virtual machine, giving it a significant speed advantage over other noscripting languages. That’s why it’s used in game engines and paired with C/C++ it’s easy to integrate and lightweight. Lua itself is tiny.

## Gaming

Ever played World of Warcraft? Or maybe you still do? (RIP your social life.) If so, you’ve heard of addons like browser extensions, but for games. Those addons are written in Lua. Back in school, I wrote and tweaked them myself. Magical times. As you might have guessed, yes, I did this before diving into client side web technologies. Oddly, I already knew PHP by then. If anyone’s interested, I could write a separate post about that.

Lua isn’t limited to WoW, though. It’s in game engines like:

- Godot (Lua support via GDScript wrappers)
- Love2D (a Lua-first engine)
- Defold (Lua as the main language)
- Gideros (mobile game engine)
- Cocos2d-x (supports Lua alongside C++ and JavaScript)
- Solar2D (formerly Corona SDK, Lua-centric for 2D games)
- OpenMW (Morrowind engine with Lua modding)

Honestly, I have no idea what most of these engines are, except Love2D it’s awesome. I’m no game engine expert, but clearly, Lua is everywhere.

According to Google, here are more games using Lua:

- Garry’s Mod—Lua drives most modding and gameplay.
- Roblox—uses a Lua dialect called Luau.
- Angry Birds—core logic is Lua.
- Terraria (tModLoader)—modding via Lua.
- Don't Starve—Lua for modding and game logic.
- Dark Souls series—Lua noscripts some AI.
- The Sims 4—powers game mechanics.
- Far Cry series (pre-Far Cry 3)—heavily noscripted with Lua.
- RimWorld (partially via Harmony modding).
- Payday 2—mods are Lua-based.
- Teardown—Lua for modding.

## DevOps & Systems programming

Lua isn’t just for games. It’s also in sysadmin tools:

- Nginx—uses Lua for dynamic configurations.
- Redis—supports Lua server-side noscripting.
- Tarantool—in-memory database.
- AwesomeWM—a Lua-based window manager.
- Syslog-ng—logging with Lua.
- HAProxy—Lua noscripting.
- OpenWrt—router firmware.

Lua doesn’t replace Python, Bash, or Go in DevOps, but it fits where speed, embeddability, and a tiny footprint matter.

## C’s Best Friend

Lua was built to be embedded. If you’re writing BlAzInG FaSt apps in C/C++, Lua adds flexibility without sacrificing BlAzInG FaSt.

## Should You Learn It?
Don’t forget, even though Lua is super small, it’s still a different language. For broadening your horizons it’s an interesting, if you have time, why not? There’s also Nelua, an interesting project, but it’s not nearly as widespread as Lua.

If you’re a default web monkey shuffling JSONs on the server and happy with that, Lua won’t make you better or worse. But exploring it might just
noscript help

i've made a car but i want cylinders that are transparent and are sand orange to come out the wheels and get bigger for 3 seconds before they despawn to add a cool effect when going really fast, how do i do that i only model not code?

https://redd.it/1ipkxkh
@r_lua
UserInputService is underlined and I don't know why... I'm trying to get my sons game to let players run. Please help. He is so proud of what he's made so far and i'm helping him learn coding. He is 7 years old
https://redd.it/1ips4di
@r_lua
LUA decryption

Hello Guys i need a help i have a noscript which is Lua format when i open it, weird symbols and searched the internet top to bottom way to decrypt the file can anyone help me with it and tell me how to do it tried too many things anyone help please and appreciate the help in advance

https://redd.it/1ipvhvy
@r_lua