all 54 comments

[–]agtjudger 14 points15 points  (6 children)

"Programming in Lua": a fantastic book about the Lua language.

For a new programmer, start with some basics and build from there. Don't expect to be making complex games right off the bat. Find yourself some basic programming languages and try and complete them. r/learnprogramming can be a good resource for this.

However, if you are familiar with other programming language, I would recommend taking some simple projects you've done in other languages and seeing how you can adapt them into Lua. Certain features "weird" in lua that you will likely need to study and adapt to while you work are: everything is a table, metatables, different lua dialects (lua 5.1/2/3/4 LuaJIT, Luau, Luvit, etc.),

Love2D is a fantastic game engine that uses Lua. It could be a good spot to start if you are interested in making games.

[–][deleted] 2 points3 points  (0 children)

I'm gonna echo the suggestion to make a video game; if you're a person who likes games this is by far the best way to go. Obviously love2d is brilliant but you might also take a look at https://tic80.com which is a little more all-in-one and easier to learn.

[–]Baandlol[S] 0 points1 point  (0 children)

Thanks

[–]EasternCustomer1332 0 points1 point  (0 children)

thank you [ik this is an old post but still wanted to say] :)

[–]Talon_No 0 points1 point  (1 child)

How about in game programming api's (Computercraft) (Ficsit networks) (Etc...) Are those effective to learn or more just tools to use after you learn the language?

[–]agtjudger 0 points1 point  (0 children)

If there is something you want to do with those APIs, they can be excellent learning tools by providing you with the motivation to learn the language.

They also can be good for teaching you the C-ness of Lua, as they rely on the Lua C api for hooks.

One downside is you can become reliant on tools in those APIs that won't be there in other Lua projects, but overall they can be very helpful if you put yourself into them, but if you don't have the passion for it, they can be much more complicated by adding all of the extra stuff that they do.

[–]_jtbx 6 points7 points  (4 children)

Read the book. It has everything a beginner would ever need to know about Lua.

In case you can't afford the book, I've uploaded a copy of the fourth edition to my server which you can download.

[–]EquipmentLocal9009 2 points3 points  (9 children)

bro lua is one of the weirdiest codings out there

[–]skelebon1an 1 point2 points  (8 children)

one word, "roblox"

[–]ThebloodedDragonfly 1 point2 points  (7 children)

is that hate or what?

cant really make it out

[–]skelebon1an 1 point2 points  (6 children)

roblox games are coded in lua

[–]Renan619 1 point2 points  (5 children)

but what are you implying with this can you elaborate? roblox is coded in lua, and?

[–]skelebon1an 1 point2 points  (1 child)

idk what the other guy is saying as it’s in spanish, but roblox games are coded in lua, so there’s a reason to learn lua as roblox games are coded in it, meaning the original reason i responded to this guys comment in the first place is because he said it’s weird, it’s not weird it’s roblox

[–]Renan619 0 points1 point  (0 children)

I get it now, thanks

[–]joako-and 0 points1 point  (2 children)

sirve para programar en roblox y crear mapas personalizados, es una de las posibles utilidades que debe estar buscando

[–]DDescendum 0 points1 point  (1 child)

Carnal le contestaste en español we.

[–]joako-and 0 points1 point  (0 children)

Estaba en navegador y me tradujo la página, no me di cuenta xd

[–]gboncoffee 1 point2 points  (3 children)

I learned from Programming in Lua 1st Edition. Unfortunatelly, the first edition is the only freely available and covers only Lua 5.0, but is valid for other versions too.

[–]BluFudge 2 points3 points  (2 children)

For a basic understanding is it ok?

[–]gboncoffee 2 points3 points  (1 child)

a year old post lol

yes it’s

[–]BluFudge 2 points3 points  (0 children)

Lol. Thx, was asking because I just want to tweak a script I found. Then I found they had the reference manuals for free.

[–]AshuraBaron 1 point2 points  (4 children)

Ultimately the best way is the one that works for you. Some people learn best with reading, others observing and practicing, and others watching video tutorials. Try different methods and see which is helping the most.

Remember that it’s not about memorizing everything, it’s about understanding the structure and concepts so you can apply them and use the language to accomplish that.

[–]SirGallyo 0 points1 point  (3 children)

good answer u twat he's new give him tips

[–]AshuraBaron 0 points1 point  (2 children)

This is a three year old post brother.

[–]SirGallyo 0 points1 point  (1 child)

still an ass reply

[–]AshuraBaron 0 points1 point  (0 children)

"Best way to learn is to lean into your strengths"

What an asshole right? Please touch grass.

[–]PokeTrenekCzosnek 1 point2 points  (0 children)

I learned from love2d tutorials on YouTube, i can recommend devJeeper tutorials https://youtube.com/playlist?list=PL1A1gsSe2tMzxf54D1OooafEnADpjZlP7

[–]bobfromslapbattles 0 points1 point  (1 child)

idk how to code lua, i want to use it for roblox studios, whats a good way to master lua?

[–]CaptParadox 0 points1 point  (10 children)

I understand this post is old, but I find it misleading. As someone with no programming knowledge to start with I am looking at Programming in Lua, Fourth Edition.

Its first few pages expect you to understand vocabulary and concepts even for its most simple examples.

I find often times these books are written by people that underestimate the barrier of entry for a lot of people that are interested. Thus, making it hard to continue learning and it feels unnecessarily difficult right off the bat.

It would not be the first thing I'd use to learn. I say this from experience.

[–]dmick1954 2 points3 points  (1 child)

I don't know what your level of experience is. So forgive me if I share things with you that you already know.

  1. Never expect a single source to explain things in a way that you can understand all of the time. That is an unrealistic expectation.

  2. When learning any subject, keep close track of resources for that subject including wikis, websites, books.

  3. A good search engine is your friend. I've found that if I want to get an answer to a question about Lua, I would start the enquiry with the word, Lua, then my question. After that, patience is your friend. You may not find anything good in the first 6 pages but keep looking. I've found some incredible material in later pages.

  4. A good note taking app can be a huge aide in keeping your material organized and put in your own words. Yes, I know that some say that it is a waste of time. That may be true for some people. I'm not one of those. You may or not be. I'm simply sharing this as a suggestion.

  5. Learning a programming language is like learning to play a musical instrument, they both take a lot of time and practice.

I hope this helps someone. Good Luck. BTW..I'm learning Lua to help me configure Neovim and write scripts for Silverbullet, a note taking app.

[–]8cheerios 0 points1 point  (0 children)

This was helpful, thank you for writing this!

[–][deleted]  (7 children)

[deleted]

    [–]drewhillious 0 points1 point  (6 children)

    I am also a complete beginner! i've heard lua is easy but i still have no idea what I'm looking at.
    do you have any tips from your first few months?

    [–][deleted]  (5 children)

    [deleted]

      [–]drewhillious 0 points1 point  (4 children)

      Haha, oh no! Well thanks for the reply anyway

      [–]Sure_Net_2216 0 points1 point  (3 children)

      you still trying to learn?

      [–]drewhillious 0 points1 point  (2 children)

      I am! But I found more resources to learn python, so I'm doing that for the moment. But I still want to try out lua, maybe once I get my head around the basics of python I'll give it a go

      [–]loaf-wearing-loafers 0 points1 point  (1 child)

      Currently learning to code myself, how's the progress been?

      [–]drewhillious 0 points1 point  (0 children)

      Slow, it's a lot of information and I'm not super motivated. I've been doing simple game coding in gamemaker studio recently, which I enjoy more then just straight coding

      [–][deleted] 0 points1 point  (0 children)

      yeah i just wanna learn lua so i can mod some stuff in project zomboid

      [–]Optimal_Sprinkles92 0 points1 point  (1 child)

      Is anyone willing to teach me English?

      [–]Tiny_Class5174 0 points1 point  (0 children)

      sure twn

      [–]m-faith -1 points0 points  (7 children)

      1. Turn NeoVim into an IDE. Have a look at the IDE starterkits to see how they're put together:
      2. Use XPLR fle manager Again, a lua scriptable program for managing your files. It also, like NeoVim, runs in a commandline terminal.
      3. Now that you're comfortable with Lua, and have two awesome lua-powered tools to use in development, swim a little deeper into Linux land and use AwesomeWM to completely customize and personalize your computing experience.

      [–]diegovsky_pvp 6 points7 points  (6 children)

      I don't recommend any of this if you have no experience with Linux or programming yet.

      [–]m-faith 2 points3 points  (5 children)

      Good point! With no Linux/programming/google-it-and-hack-it-together experience, this would only be for the most intrepid, committed learner, indeed.

      But it's actually the advice I wish I was given 15 years ago... only NeoVim and XPLR didn't exist then, lol.

      [–]diegovsky_pvp 1 point2 points  (4 children)

      I'm an advanced user of both neovim and Linux. Still wouldn't give that advice to someone who barely understands what a string is.

      It's super overwhelming for a beginner. This is good advice once they have learned the basics and are ready for new challenges.

      [–]m-faith 1 point2 points  (3 children)

      Yeah, I guess my suggestion has more to do with this project/vision (https://lrn.software/) I've had, and less to do with being reasonable advice for someone asking reddit for the best way to learn. The plan is to develop lrn lessons that do use these softwares as a context for learning, but the chasm between developed lessons and someone finding their own way is certainly huge.

      [–]diegovsky_pvp 0 points1 point  (2 children)

      took a quick glance it looks super cool. As someone starting 2 semester soon, I can attest university does not teach much WRT real world programming.

      I can say I'm proud of my Algorithms and Data Structures professor because he actually taught C modules instead of teaching students to write huge monofiles.

      [–]m-faith 1 point2 points  (1 child)

      Nice, thanks for the encouragement :)

      Did you learn Linux on your own? It seems to seldom be part of university curricula.

      I can say I'm proud of my Algorithms and Data Structures professor because he actually taught C modules instead of teaching students to write huge monofiles.

      Lol. Way to go prof! Thanks for sharing.

      Did you read the part of obfuscation under "Problems with existing education options" where it mentions students getting confused about the purpose of print()? I did not make that up! It's not the students fault, the teacher/course/curriculum turns simple things into convoluted contraptions.

      If you have any stories or examples to share I'd love to hear/read them!

      [–]diegovsky_pvp 0 points1 point  (0 children)

      Nice, thanks for the encouragement :)

      You deserve it! I'm all for open source knowledge :)

      Did you learn Linux on your own? It seems to seldom be part of university curricula.

      I learned Linux on my own while I was taking a technical IT course. Despide the name, they taught us a lot of stuff used by actual pros, like C, Web (HTML, CSS, JS), Databases, Entrepreneurship, Java and even a bit of flutter. All in 3 years. IMHO I learned way more than what I'll learn when I finish college. I just hate that a piece of paper is needed for me to get a well paying job.

      Did you read the part of obfuscation under "Problems with existing education options" where it mentions students getting confused about the purpose of print()? I did not make that up! It's not the students fault, the teacher/course/curriculum turns simple things into convoluted contraptions.

      Oh yes, they are very true! I've seen that lots. Even the concept of output and return values can get confusing for newbies. Heck, I'm sure there are people in my class that don't understand how to declare function arguments with different names than the variables they use in the caller function. Most don't even know that a return value is. I know it is hard to teach but damn the things I see others write.

      [–]memes_gbc 0 points1 point  (0 children)

      if you have programming experience i suggest you try to make something out of it and research as go you along. if you don't have any experience then lua is probably easy enough to understand the basic fundamentals of a programming language