r/lua • u/Adam0hmm • Jun 12 '25
should i learn lua ?
hello there , is it a good idea to start learning lua knowing only python?
14
Upvotes
r/lua • u/Adam0hmm • Jun 12 '25
hello there , is it a good idea to start learning lua knowing only python?
14
u/CirnoIzumi Jun 12 '25
Lua and Python are philosophically opposed solutions to the same problem
Lua is minimal by design and let's you extend as needed
Python has a massive standard library with tons of predefined functions
But they do similar stuff. Lua leans a bit more towards games and lower level functionality while Python is often targeted at hobbyist and mathematicians
7
u/no_brains101 Jun 12 '25
If you have to ask this you probably do not know python
But yes if you know python you could be writing code in lua ok enough by the end of the day basically guaranteed.
I mean you arent going to become a metatable and coroutine wizard overnight (metatables are really not hard though) but give it a month its really one of the simplest languages out there.
4
u/Jabutypp Jun 12 '25
Why you wanna know about Lua?
Programming languages are like cars, a Ferrari's cool, but it sucks on a farm.
My opnion 👍
2
u/Owen-Here Jun 12 '25
Lua is a much faster and simpler language in my opinion but Python isn't too much different if you wanted to you could probably learn it in a day or two
To be honest IDK if its really that great of an idea to learn Lua don't get me wrong there is a lot of good libraries and frameworks for the language but Python already has most that you need for a high level language like this I mean the only reason I use Lua over Python is just out of habit and personal preference
If you want give lua a try do so and if you like it stick with it just don't get distracted by shiny stuff too much especially when you are trying to go from Python to something so similar there is just not much of a learning experience to be had
2
u/Isogash Jun 12 '25
I mean despite their differences they are both fundamentally quite similar and learning one will make the other easier to learn.
Personally I think Lua is easier to learn.
2
u/Kqyxzoj Jun 12 '25
No idea. Should you?
Recently I learned a bit of lua, simply because I needed it to do some mpv scripting. From what I've seen so far it's pretty simple.
Since you already know python, learning some lua shouldn't be that difficult.
With a combination of reading some docs + chatgpt you can get up to speed pretty quickly.
2
u/collectgarbage Jun 13 '25
People often forget to mention that while Lua can be a stand alone programming language, it was also designed to be embedded in another program in order to give that program scripting capabilities. Lua is known to be the easiest scripting language to embed and with the smallest footprint. The Lua interpreter is something like only 2Kb in size. These are two of the reasons why games often use Lua for game mods. Examples: WoW, Roblox, DCS to name a few.
2
u/jorgerezende Jun 13 '25
Yes
2
u/snrmwg Jun 13 '25
of course it is!
1
u/HawH2 Jun 12 '25
I doubt you even know Python
1
u/lambda_abstraction Jun 12 '25 edited Jun 12 '25
The answer is always "that depends." What are you hoping to accomplish in Lua?
I'm drawn to Lua because of its economy. I use a number of Python programs, but they seem far more resource heavy, and I often wish they were LuaJIT programs instead. On the other hand, Python has a far larger ecosystem and popularity. With Lua, you will likely run into cases where you have to hack support for things you wish to do. I started with C back in 1987, so this is no big deal for me, but your case may be very different.
1
u/TutorialDoctor Jun 14 '25
I don’t know of many use-cases for lua, so I’d say go with python (a lot of use-cases). I did use lua once for a game engine called Maratis. I think the Love2d game engine uses Lua.
1
u/AwayEntrepreneur4760 Jun 14 '25
It’s fun
1
u/AbbyUpdoot Jun 15 '25
I'm learning it because games and emulators give you a lot more control of things with it. Lua is small and easy to add to things, while Python in its current form is a beasty. So Lua shows up all sorts of places you don't expect but nonetheless appreciate.
1
u/[deleted] Jun 15 '25
No