Lua Crash Course - Less than 15mins

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • A guide to lua for people who already know how to code in another language
    Timestamps:
    1:13 hello world
    1:25 comments
    1:31 variables
    2:39 conditional statements
    4:47 functions
    5:23 scope
    5:42 global variables
    6:10 loops
    7:36 tables
    9:57 2 dimensional tables
    10:46 key tables
    13:05 math library
    13:51 modules
    Links
    -----------
    Cheat sheet: github.com/poh...
    Lua Docs: www.lua.org/do...

Комментарии • 181

  • @sh0ker
    @sh0ker 3 года назад +316

    I usually don't comment much but I just had to because the video was the perfect example of a crash course that is aimed at non-beginner programmers.
    Fast, well explained, clear, to the point, highlight the difference between common programming languages. Really well done.

    • @borgiedude
      @borgiedude 3 года назад +6

      Well said. This is exactly what I needed.

    • @JabirAH
      @JabirAH 3 года назад +1

      Same thoughts.

    • @KManAbout
      @KManAbout 2 года назад

      Somethings I would have liked to see were things like if there are generators, classes, decorators, anonymous functions etc.

    • @patjustpat8178
      @patjustpat8178 2 года назад

      what he said

    • @ivanjijon8647
      @ivanjijon8647 7 месяцев назад

      And it has some misleading information too, as a bonus

  • @fredfred9847
    @fredfred9847 4 года назад +121

    Great video as usually coding videos are hours long but this is the nice fast pace i want

  • @sir_no_name1478
    @sir_no_name1478 4 года назад +57

    You saved so much of my time. Thanks dude.
    I need to learn Lua for Open computers ^^

  • @illuminum8576
    @illuminum8576 3 месяца назад +8

    Finally a short video that explains everything well, and is made for people that already now other programming languages. Absolutely fantastic

  • @garychike266
    @garychike266 2 года назад +53

    Good! Except one possible oversight: 10/2 = 5 is incorrect. Lua 5.3 distinguishes between floats and integers. 10//2 = 5 is correct with two forward slashes (//) and performs the integer division like C and C-based languages. 10/2 = 5.0 defaults to a float(real) division like Pascal and Pascal-based languages.

  • @Gabzim
    @Gabzim 3 года назад +14

    hey if in the timestamps in the description you include "00:00 Intro" or something like that, it'll show the chapters in the youtube progress bar.

  • @rain_sq
    @rain_sq 2 года назад +10

    bro this is actually helpful cuz i aint trying to watching a beginner tutorial when im already a software engineering college student and too lazy to read documents on this… thanks for the crash course

    • @matrix-seu
      @matrix-seu 2 месяца назад

      same! i'm a c# + c++ coder, and this tutorial is perfect for me lol

  • @shanerj4410
    @shanerj4410 2 года назад +17

    This was awesome! I've learned the basics of python and was able to follow just about everything just reading your examples and what I didn't understand I did when I unpaused it and listen to you explain. Would love to see videos like this for other languages!

  • @list9016
    @list9016 3 года назад +14

    This is perfect, you just need to learn one language decently well and you can learn others in a really small amount of time. Thanks for the tutorial!

  • @Muskar2
    @Muskar2 3 года назад +10

    Almost everything I needed to know with very little wasted time. Much appreciated!

  • @matrix-seu
    @matrix-seu 2 месяца назад +3

    I already know how to code with python, c# and c++, and I can already tell this video is fantastic. Straightforward for those who already know concepts of programming! Well done.

  • @InfoSecDojo
    @InfoSecDojo 3 года назад +4

    another language that i can add in my resume 🐎🐎 thanks

  • @eezara961
    @eezara961 3 года назад +8

    I'm a complete beginner and this video has helped me a lot and solved my various doubts. Well!! Thank You

  • @LRTOTAL
    @LRTOTAL 3 года назад +5

    Why they went with the ~= for inequality is a mistery to me. Not all keyboard layouts have the ~ key, for example my keyboard doesn't.
    Edit: Apparently it's not a problem anymore: I found out that you can use Microsoft Keyboard Layout Creator (MSKLC) to create a layout and add any ascii/unicode character to any key! It's so cool.
    So I don't have to use Alt+126 to write ~ anymore.

    • @thenecroking6170
      @thenecroking6170 3 года назад

      I mean you can also pull out an on-screen keyboard

    • @LRTOTAL
      @LRTOTAL 3 года назад +2

      @@thenecroking6170 Yes but at that point it's quicker to use Alt+126
      Or do the MSKLC thing once and get ~ mapped to the keyboard permanently

  • @jkobain
    @jkobain 3 года назад +2

    04:29 - I must note that «not x == 10» is equivalent neither to «not (x == 10)», nor to «x ~= 10»; in fact, «not» precedes the equality check. I think in section 3.4.7 they covered it.
    So instead you're trying to compare «not x» to «10», which will yield false any day of the week.

  • @quasigod1083
    @quasigod1083 2 года назад +6

    This is an awesome video, it can be tough to find guides for new languages that aren't made for complete beginners to programming. Thank you!

  • @mopsfl
    @mopsfl 3 года назад +8

    local data ={"Hello", "World"}
    for i, v in pairs(data) do
    print(i, v)
    end
    Yay

  • @TheHobbit28
    @TheHobbit28 3 года назад +4

    For someone who knows how to program this is a really cool Crash Course :)
    Thanks a lot

  • @unaisulhadi9102
    @unaisulhadi9102 2 года назад +1

    Nice video, you just saved me from documentation hell

  • @W_0_W
    @W_0_W 4 года назад +2

    If you are looking for an OOP library, use middleclass: github.com/kikito/middleclass. I tried about 15 different libraries and this one is the best.

  • @freaklore
    @freaklore 2 года назад +1

    This language is so similar to Ruby, Elixir, Python and JavaScript.

    • @matrix-seu
      @matrix-seu 2 месяца назад

      yes. definitely python and javascript in my opinion.

  • @490o
    @490o 3 года назад +2

    Finally a tutorial that doesn't hand-hold you through the entire thing. It's so annoying especially if you already know how to program.

  • @krishnaraj3989
    @krishnaraj3989 4 года назад +4

    thanks a lot man, great vid. keep going, i still dont get the point of this language tho

  • @marinac.ll.4840
    @marinac.ll.4840 3 года назад +2

    Brilliant explanation! Thank you very much

  • @antoniomasotti8060
    @antoniomasotti8060 8 месяцев назад +1

    I wished there were more such videos for "less known" languages. As developer is always so annoying to go through all those tutorials that explain for the 100th time what a var or a loop is...
    Very well done!

  • @cordelldev
    @cordelldev 3 года назад +2

    Exactly what I was looking for, thank you.

  • @JabirAH
    @JabirAH 3 года назад +2

    A perfect crash course to get the idea of what Lua is instead of watching hours of tutorials.

  • @popplestones886
    @popplestones886 7 месяцев назад +1

    while i

  • @matthewwoodruff3563
    @matthewwoodruff3563 3 года назад +3

    I usually do not comment, and I just had to say thank you! This was extremely well done!

  • @alexandrutica6610
    @alexandrutica6610 4 года назад +4

    Can we make softwares with lua

  • @SecretAgentPaul
    @SecretAgentPaul 2 года назад +1

    13:00 I thought you couldn't use +=

  • @jayel9809
    @jayel9809 Год назад +1

    Currently interviewing for a AAA game studio that uses Lua to build their interfaces (I have a FE/Javascript background). This was exactly what I needed to get a sense of what that would look like 👌

  • @jonathanward7216
    @jonathanward7216 3 года назад +4

    Omfg that cheat sheet is legendary

  • @spyh4rd
    @spyh4rd 2 года назад +2

    This is literally exactly what I need. Thank you so much

  • @fadijabr8992
    @fadijabr8992 3 года назад +3

    I did programming in Pascal in the 90s. It seems Lua is resurrecting Pascal from the past. Anyone who knows Pascal sure will agree with me.

    • @borgiedude
      @borgiedude 3 года назад

      It also seems to share some simlarities with LISP with the use of tables / lists and no variable types. Admittedly that's where the similarity to LISP ends.

    • @absmustang
      @absmustang Год назад

      Turbo Pascal used to be the sh!t then suddenly nobody cared. Beautiful language.

  • @설리-o2w
    @설리-o2w 3 года назад +1

    Am speechless thank you so much you've literally saved me so much time

  • @NilsKullberg
    @NilsKullberg 3 года назад +2

    As advertised, a crash course. Just the way it should be done. Thanks!

  • @cheffromspace9771
    @cheffromspace9771 3 года назад +3

    Perfectly paced and exactly what I needed with no fluff.

  • @aoli2182
    @aoli2182 3 года назад +3

    Concise, quick, organized. Love it.

  • @vincenzo3574
    @vincenzo3574 4 года назад +13

    Watching this for computercraft lmao

    • @r50142
      @r50142 4 года назад +1

      Same lol.

    • @eddev
      @eddev 4 года назад +2

      @GraphicsOn the two biggest uses for Lua are Roblox and Cheat Engine

    • @oako-uconn4973
      @oako-uconn4973 4 года назад

      GTA V Scripting

    • @ramon1930
      @ramon1930 2 года назад

      @@eddev V-rep too

    • @redchief94
      @redchief94 3 месяца назад

      Computercraft got me to install linux as my base os.

  • @arthur5996
    @arthur5996 3 года назад +2

    Perfect, very clear, thank you very much !!

  • @jaimedpcaus1
    @jaimedpcaus1 3 года назад +1

    Can you do one tut where you incorporate Lua into C? Thx

  • @VulcanOnWheels
    @VulcanOnWheels 2 месяца назад

    1:16 They're called parentheses.
    5:44 Why do this instead of leaving out "local" and "_G."?

  • @jlamores
    @jlamores Год назад

    I would like to have this cheat sheet printed in paper for reference. The link in the description takes me to the github, but it's not easy to print and keep the formating. Can you help me?

  • @benzenatizineeddine7816
    @benzenatizineeddine7816 3 года назад +1

    you just saved me 3 hours of learning things a already know. thank you dude

  • @vulcalien-priv-abc
    @vulcalien-priv-abc 4 года назад +8

    Nice tutorial. Really good for just reminding basic concepts of this simple language.
    But... why global variables are done like that? Just not using "local" makes them global, as much as I know.

  • @ChristopherFranko
    @ChristopherFranko 4 года назад +3

    preciate it fam

  • @flathippo4997
    @flathippo4997 Год назад

    a lot of the examples were incorrect but you got the basic concepts down so its a 8/10 from me

  • @danielfernandes1010
    @danielfernandes1010 2 месяца назад

    Thank you so much! I needed a quick way to learn Lua and your explanation was perfect!

  • @ivanjijon8647
    @ivanjijon8647 7 месяцев назад

    "this is a dinamically typed language so there's no strong types". Less than two minutes and there is already a wrong statement.
    Dinamic vs Static typing has nothing to do with Weak vs Strong typing.

  • @ironmanlifts
    @ironmanlifts 3 года назад +1

    Thanks for the tutorial. I was wondering what the hash was lol. Basically, it allows you to Enumerate like in python as long as you use the hash and declare the counter. Vimscript should have gotten some tips from lua, all the functions end with 'endfunction' , 'endfu'.

  • @ltd5480
    @ltd5480 Месяц назад

    After this, I can add Lua to my resumé for the programming language

  • @alisa2284
    @alisa2284 7 месяцев назад

    Really helpful! I am searching for a lua crash course in order to work with sol2 library.

  • @x1plus1x
    @x1plus1x 3 месяца назад

    Can you direct me to a crash course for people who don't already code? I got interested in this because I want to make addons for World of Warcraft.

  • @montoyabaezdiegoricardo5450
    @montoyabaezdiegoricardo5450 Год назад

    I hate when I try to learn another language and every course starts with programming learning instead of the language.
    Thank you :D

  • @thengakola6217
    @thengakola6217 3 года назад

    nice video..... but couldve said something sbout math.random

  • @JEAPI_DEV
    @JEAPI_DEV 2 года назад

    He used a , b in the for loops instead of i,j that should be criminalized. Unbelievable

  • @StarMineBR
    @StarMineBR 4 года назад +4

    Hey Buddy, great video, but there are some mistakes, like the "if not x == 10 then", in Lua, we need to add parenthesis in the comparison, "if not (x == 10) then".

  • @hi-hg4og
    @hi-hg4og 2 года назад +1

    omg i learned to code in 10 seconds!!!!

  • @samna-q3e
    @samna-q3e Год назад

    the most dumb simple language to exist this is the best language to teach programming

  • @Wurstfinger-rl1zi
    @Wurstfinger-rl1zi 3 года назад +2

    Imagine needing more than two hours to learn this shit rofl

  • @boiii3productions945
    @boiii3productions945 2 года назад

    Ultimate tutorial for roblox developers

  • @alisanan9090
    @alisanan9090 7 месяцев назад

    Why you stopped making videos?

  • @cariyaputta
    @cariyaputta 5 месяцев назад

    Perfect introduction to a language.

  • @iZomb
    @iZomb 3 года назад

    who tryna script roblox games

  • @044_sanketpalchaudhary_mec8
    @044_sanketpalchaudhary_mec8 4 года назад +1

    hi, I had a small if you can pls solve, at the place where you explain if statement you have commented that the print statement will not be executed, why is it so?? Also a great video loved, helped a lot :)

    • @Cumaran
      @Cumaran Год назад

      I think that is a mistake (at 2:40) and a similar mistake at 3:50. Seems to have mixed up the < and > signs.

  • @swbusby
    @swbusby 2 года назад

    Reminds me alot of bash shell scripting.

  • @williamlongin7140
    @williamlongin7140 3 года назад

    I'm looking for a mentor in LUA. Can anyone help me?

  • @vlaktorbb
    @vlaktorbb 2 года назад

    finally a good Lua video; thx! ;-)

  • @simoxeh
    @simoxeh Год назад

    Perfect training. Tired of his of training to get the basics

  • @stevelitt
    @stevelitt 3 года назад +1

    Perfect concise explanation! Thanks for sharing this!

  • @Wo0dY101
    @Wo0dY101 4 года назад +2

    Thanks, exactly what I needed!

  • @joeee559
    @joeee559 2 года назад

    So cursed how indexing starts with 1

  • @MarkVolkmann
    @MarkVolkmann Год назад

    Where can I find your Lua cheatsheet?

  • @lucianorodriguez7726
    @lucianorodriguez7726 3 года назад

    I have so many scripts of a game called Worms3D, but they are all in .LUB files. There is a good way to read the configs of each map (every script) of that files? How I have to manage to convert the Lub files into Lua files?

  • @cristianfigueredo566
    @cristianfigueredo566 2 года назад

    Thanks, i am learning Lua for neovim

  • @shalikui9849
    @shalikui9849 4 года назад +2

    People younger than me (12) in my class all know how to code why am I cursed

  • @samyakbharsakle
    @samyakbharsakle 20 дней назад

    absolutely goated video

  • @thegreendude2086
    @thegreendude2086 Год назад

    Thanks for the cheat sheet

  • @tadeob_UB
    @tadeob_UB 2 года назад

    No time wasted here. Thanks

  • @IvanSedov-i7f
    @IvanSedov-i7f 2 года назад

    Thanks you. Very cool.

  • @maximofernandez196
    @maximofernandez196 2 года назад

    Man, this I exactly what I needed

  • @sauraabh
    @sauraabh 6 месяцев назад

    This is exactly what I needed

  • @walterclements3164
    @walterclements3164 3 года назад

    Let's pay our respects to John Doe, arguably the most famous man in the English speaking world. Died while coding Lua.

  • @stephenmackenzie9016
    @stephenmackenzie9016 4 месяца назад

    The first while loop is infinite

  • @Avery-River-
    @Avery-River- Год назад

    Its similar to phyton

  • @0casin0
    @0casin0 2 года назад

    weird language.. but well explained. will have to use lua for my phd

  • @originalni_popisovac
    @originalni_popisovac 2 года назад

    Thanks, i didn't know how boolean value works, this video help me. But, not only boolean value, more things in this video was interesting.

  • @deikois
    @deikois 3 года назад

    1:29 why literally nobody never noticed john doe, thats literally the biggest hacker in roblox

  • @s4degh
    @s4degh 3 года назад

    Thank you, Thank you.

  • @marctalcott5613
    @marctalcott5613 3 месяца назад

    Great help for the basics of Lua. Thank you.

    • @matrix-seu
      @matrix-seu 2 месяца назад

      Hello! Does this tutorial apply well to Roblox coding and scripting?

  • @matthewchu6905
    @matthewchu6905 3 года назад

    ty time to make gta 6 on roblox

  • @thenecroking6170
    @thenecroking6170 3 года назад

    Very insightful, just long enough to understand, good comparisons, and most of all.. free, lol. Great vid

  • @oscarjeans4119
    @oscarjeans4119 2 года назад

    This is a great crash course, exactly the kind of thing people like me who love to jump in a learn whilst doing need to get off the ground.
    But also alot of the stuff you mentioned were weird, to me they just look alot like VBA. But i guess they are both scripting languages

  • @Betruet
    @Betruet 4 месяца назад

    great video

  • @FifthSparkGaming
    @FifthSparkGaming 2 года назад

    Perfectly paced course for those who know how to code and can't sit still for more than a minute. Thanks for this!

  • @KevinOMalleyisonlysmallreally
    @KevinOMalleyisonlysmallreally 3 месяца назад

    abhoy d'kid!

  • @choccooco
    @choccooco 26 дней назад

    thanks :)

  • @ouhyeap315
    @ouhyeap315 Год назад

    Fasttt niceeee

  • @ozzyfromspace
    @ozzyfromspace Год назад

    Surprised how well this crash course was. I now understand the basics of lua. You rock, friend!