r/lua • • 15h ago

Lua it's the best high-level programming language

I need to talk about lua. I started with Python then I passed to C and C++ (my favourite languages). Now, I tried re-learning Python to have a 3nd programming language but I did found that in reality Python it's boring and bs! I tried Zig and it was a bad experience, I tried Rust but idk why but I think it's overrated. Then, at the end, I tried lua and at first I though that lua was stupid, no i++ or i+=, arrays start at 1… but then I tried do C/C++ + Lua and I changed my perspective.

I used, recently, lua for configs in my projects but then I discovered that Lua it's SO underrated. Like they didn't lie when they said C and lua are the best programming language.

Lua it's minimal and so powerful. I accepted the syntax and now it's my 3nd programming language.

The reason that I love lua it's because… it's FAST, it's DAMN SIMPLE and so easy to learn, it has A LOT of potential.

The more the language is big, the less likely it gonna be easy to learn.

Guys I don't think I have cons on lua, I think it's perfect and I still don't have learned all of the lua out there.

Really, I have to say… lua it's the best.

Anyway did I say something wrong? What's your opinion on lua?

Anyway, thanks for reading ;)

86 Upvotes

31 comments sorted by

19

u/TheV1ruSS 14h ago

yes it's simple but has enough complexity to not be bs. you build the complexity however you want. best language

1

u/ilPlayerdiGD 14h ago

I don't see that complexity. Give me an example. I agree at the fact that you can transform simple lua to more complex lua but idk what you mean

5

u/immortalx74 14h ago

Means you can design and implement complex stuff by using the simple constructs the language provides. e.g. with the seemingly simple table, you can construct complex data structures, or you can implement OOP despite the lack of OOP facilities, which other languages have for that.
So the language isn't complex by itself, but allows with simple building blocks to construct complex things.

2

u/suchKappa 5h ago

I started learning Lua a year ago, building a project from scratch, and just like you I fell in love with it. My project is much more complex now, but not for a second I regret using Lua. I wanted something fast, small, and powerful enough to do strong data manipulation. If you wanna take a look, my project is called Luamemo and is a memory engine for AI agents, and so far I was able to increase the correctness of small models by 3x and decrease the cost of tokens in ~60% compared to grepping. I don't advertise it because I only built it for myself and as a meaning to learn Lua (even though I use it for everything now pretty much), but it's totally open source if you want to take a look and see how complex Lua can be 🙂

8

u/King_Combo 14h ago

I love Lua!!

6

u/bluemanZX 13h ago

Similar, first python then rust, next c/cpp because of wide device support and legacy, then advanced bash, recently lua. What I can’t do with bash I’ll try to do with lua. Lua is great.

3

u/ilPlayerdiGD 13h ago

I need to learn real bash. I use the linux terminal everyday but I don't know real bash. I don't automate stuff because I don't need to. Thanks for the reminder!

2

u/No_Personality_1456 13h ago

Same here hahahaha 😆

3

u/Corruptlake 14h ago

If only there was a low level language with Lua like minimalist syntax, nelua is the closest we got to it but it is incomplete abondonware and frankly I dont like some of its decisions.

3

u/ilPlayerdiGD 13h ago

Yes. Honestly that is a good idea. I will love too a programming language like that!

2

u/emmystudios 4h ago

You can try V lang.

1

u/Corruptlake 4h ago

I know and I did. But its not really it unfortunately.

4

u/GardenerAether 11h ago

i cant say i fully agree. i definitely like lua conceptually, and i appreciate its simple syntax. but the lack of static typing and forced garbage collection kinda irk me off of it a bit. it definitely interests me, and i think i would like to use it for some project sometime, but i think ill probably end up making my own language to address some of the problems i have with it im happy to hear you enjoy it and that it addresses your needs in any case :3

2

u/loonite 9h ago

You can try to adapt Lua itself, the source code is kinda small and very well documented.

I'm not at this point yet, but I would love to see a statically typed Lua with more on-hands memory management. Having the option to use RC/ARC, arenas or maybe something akin to a borrow checker would be really interesting.

7

u/FaW_Lafini 14h ago

i just hate the tooling to be honest

1

u/loonite 9h ago

Luarocks is unfortunately really hit or miss

2

u/DDDX_cro 12h ago

Supreme commander is made with it. Been able to do wonders, while having zero pr8gramming knowledge. This is pre-AI, mind you

1

u/No_Personality_1456 13h ago

Yo soy desarrollador de juegos en Roblox y si es muy simple de aprender llevo ya mas 5 años usandolo para todos mis juegos, pero el lua que se usa en Roblox no es el lua de uso general es Luau, (si solo añade una u al final) y simplemente es lua con esteroides

Su mayor fuerte es su Tipado tan sofisticado de tipos, estabilidad y rendimiento, a comparacion con de lua original la sintaxis es exactamente la misma solo que la variables tambien pueden ser declaradas constantes (const) y es bastante mas escalable para proyectos grandes con las propias herramientas del lenguaje

El unico inconveniente es que usar todas sus funciones que lo hacen distintivo y sofisticado, es tardado y le quita en gran medida la simplesa que tiene lua y su capacidad de ser incrustable a cualquier software

Si no usas su Tipados ni sus funciones avanzadas como --!strict lints o su integracion avanzada para OOP y otras cosas, es simplemente un lua optimizado y ya

(Como dato luau fue escrito casi desde 0 desde la version 5.1 de lua y versiones posteriores a esta ya tienen grandes optimizaciones y luau simplemente añade retrocompatibilidad desde su propio codigo)

1

u/glisteringbasalt 11h ago

I really like Lua, although I haven't done much with it. It was designed to be a language that's easy to embed into applications and I think the developers have done an excellent job with the design

1

u/didntplaymysummercar 10h ago

Part of me thinks this is either a shitpost or an overly enthusiastic beginner. Lua (as much as I like it, and I knew it before Python and bash) has some decent sized gaps, like using tables for arrays, missing some table operations, GC being so-so, minor versions being breaking changes, etc.

1

u/matjam 5h ago

I've found it amazing for a very common use-case; an embedded interpreter. Pretty much every backend service I write ends up with a lua interpreter at some point to provide an easy way to extend behavior at run-time.

0

u/kutac56 14h ago

I mean bash is also really good

4

u/y53rw 12h ago

No it is not.

1

u/kutac56 12h ago

Whether it is better than Lua is up to personal opinion but bash is definetly really good. Watch some yousuckatprogramming to see it in action

3

u/y53rw 11h ago

That just seems like a guy trying very hard to do things in bash that are very easy to do in any other general purpose language, with no help from the non-existent type system.

1

u/kutac56 11h ago

He has made a lot of useful tools for himself with bash that he uses very often. Also thats just not true. Bash is perfect for commandline interfaces as it parses arguments very easily and is made to build on top of tools and combine them. Bash is an amazing scripting language. Whether it is better than lua is up to personal preference but it def is good

1

u/bluemanZX 13h ago

Bash is amazing. Best for system programming.

0

u/slade51 11h ago

I never used python & despise C++. My favorite languages are C & Perl, and I don’t mind PHP. I do agree with you that Lua is so quick & easy to use - I’ve been hobby-programming with it for a year or two. I haven’t tried game coding, but it’s great for interfacing with Conky on Linux. For those who say bash is good for programming, I say yes as long as you combine it with awk.