Full Lua Crash Course 💥 2.5 Hours 🖥️⌨️ Beginner's Programming Fundamentals Guide for Developers

Поделиться
HTML-код
  • Опубликовано: 10 мар 2024
  • Lua is a high level, cross-platform programming language that can be embedded in various software products. For example, Lua is used as a scripting language inside of popular networking software tools including Wireshark and nmap. Lua has also been used to script actions inside of games such as Roblox.
    Similar to other high level languages, Lua uses a "virtual machine" layer to interpret instructions, and handle memory management (garbage collection).
    In this video, we will be taking a look at how to write Lua code completely from scratch. After watching this video, and practicing some of the code samples, you should be equipped to write Lua code yourself. You should install the development tools that we present in this video, including Microsoft Visual Studio Code, and the Lua and Code Runner extensions for VSCode.
    Lua probably isn't the best choice for general purpose programming, although it could be used for that purpose if you chose to. Even though Lua doesn't support the notion of structs and classes, you can still construct custom types of objects by using the "table" data type.
    🚨📦 Help support this channel - shop through my Amazon storefront!
    ⬇️⬇️⬇️
    www.amazon.com/shop/trevorsul...
    ⬆️⬆️⬆️
    Visual Studio Code ➡️ code.visualstudio.com
    Lua Website ➡️ lua.org
    Please follow me on these other social channels!
    ➡️ trevorsullivan.net
    ➡️ github.com/pcgeek86
    ➡️ / pcgeek86
    ➡️ / trevorsullivan
    ➡️ / trevorsoftware
    ➡️ tiktok.com/pcgeek86
    All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.
    #opensource #software #linux #devops #programming #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #developer #lua #luascript
  • НаукаНаука

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

  • @Im_Ninooo
    @Im_Ninooo 16 дней назад +2

    === Timestamps ===
    0:00:00 Intro
    0:00:34 What is Lua
    0:01:02 Where is Lua used
    0:02:12 How Lua works
    0:04:35 What's included in this course
    0:04:55 Other places to learn Lua
    0:07:08 How to install and run Lua
    0:08:11 Lua shell (REPL) vs interpreter
    0:10:04 Installing Lua on Ubuntu (apt)
    0:10:45 Installing Lua on Windows (scoop)
    0:12:06 Installing Lua on MacOS (homebrew)
    0:13:16 Installing and setting up VSCode
    0:15:16 Extensions
    0:16:25 Creating a new Lua script
    0:17:15 Using the Lua shell (REPL)
    0:18:03 Variables
    0:20:47 Multiple statements on the same line
    0:21:46 Block definitions (do...end)
    0:23:13 Back to VSCode
    0:24:21 Code Runner extension
    0:26:04 nil type
    0:26:46 Booleans
    0:27:36 Variable naming conventions
    0:29:58 Strings
    0:30:12 Numbers
    0:33:25 String concatenation
    0:36:41 Multi-line strings
    0:40:19 Comments
    0:42:07 Tables 1
    0:44:02 type() function
    0:45:15 Tables 2 (indexing, types)
    0:47:13 Length operator
    0:48:58 Tables 3 (key-value pairs)
    0:51:06 Variable naming limitations
    0:52:40 Math operations
    0:54:00 Math module
    0:55:59 abs()
    0:57:09 ceil()
    0:57:55 floor()
    0:58:32 random()
    0:59:17 randomseed()
    1:01:07 min(), max()
    1:02:52 More Strings
    1:03:47 String module
    1:04:07 sub()
    1:07:22 find()
    1:09:01 Functions
    1:35:08 For loop
    1:40:55 If statements
    1:47:31 While loop
    1:49:46 Repeat loop
    1:51:43 User input
    1:52:14 io.read()
    1:57:05 Table module
    1:58:50 sort()
    2:02:21 concat()
    2:04:07 remove()
    2:06:33 OS module 1
    2:08:11 remove()
    2:09:18 execute()
    2:10:07 getenv()
    2:12:10 IO module (writing to file)
    2:12:39 output()
    2:14:00 write()
    2:15:31 open()
    2:18:05 OS module 2
    2:18:15 time()
    2:21:27 Modules

    • @KillerJo-nn4nl
      @KillerJo-nn4nl 2 дня назад

      Crazy..
      yoo
      Its only 2 Months ago (the vid)

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

    I watched the whole video. Great and Smooth! Keep up the good work :))

  • @LouisWeiser
    @LouisWeiser Месяц назад +3

    The quality of your video is amazing, and you are such a good teacher.
    i'm still at half of the course but i hope there will be more of lua !
    thanks alot !

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

    this video was such a great finding!
    I've been learning lua myself by trial and error, and I got stuck not knowing how to structure my code properly.
    (ah, so that's how Lua modules work!)
    thanks a lot for your time and valuable info. you are an amazing teacher.

  • @B52-ge8qy
    @B52-ge8qy 2 месяца назад +8

    Hi Trevor ! It's a very awesome topic, because I'm going to learn Lua to configure NeoVim😆

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

      Dawg same it’s been about two weeks since I started my nvim config ☠️

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

      Same here :) need to improve my config

  • @k2c2
    @k2c2 2 месяца назад +3

    Good to see you back ;)

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

      Thanks! Glad to be back. I've been posting AWS + Rust videos over on the StratusGrid RUclips channel. Make sure to follow that! 🦀🦀

  • @BlackistedGod
    @BlackistedGod 2 месяца назад +1

    Thank you for this, it would be nice if you could do Luau also, its like a Typescript version of Lua that is being use by Roblox

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

    I feel there's not many informative, in-depth videos on YT about Lua; specially for OOP.
    (I know that's not Lua's strongest suit but, in the environment I'm currently working in, it's either Lua or C)
    if you ever have the time to tackle more advanced concepts like how to use Lua modules to do composition or how to make use of mixins with Lua, that would be wonderful.
    either way, you've got a new subscriber!

  • @thescottallen
    @thescottallen 27 дней назад

    This is great!
    I use Lua in an audio/visual/control system called QSYS by the audio company QSC. Lua is used to control automation, build plugins to connect to other devices or extend stock functionality of the system.
    This video is helpful for me to fill in some gaps, where I sometimes find it difficult to read the manual, having someone explain it in a different way is awesome. Much appreciated!

    • @TrevorSullivan
      @TrevorSullivan  27 дней назад +1

      That's exactly why I created this video! To help round out people's knowledge of the language in an easy to understand video form. I'm so happy that this helped you! That's a really interesting use case for Lua as well. Thanks for sharing the software package name that you are using!

  • @jakubtomas9154
    @jakubtomas9154 2 месяца назад +1

    12:29 you are able to install Lua through Homebrew with `brew install lua`

  • @user-ew6mz8kz8v
    @user-ew6mz8kz8v 24 дня назад

    Огромное спасибо!

    • @TrevorSullivan
      @TrevorSullivan  24 дня назад +1

      Пожалуйста! Спасибо, что смотрите мой канал!

  • @XYZ-gr2iu
    @XYZ-gr2iu 6 дней назад

    Hi Trevor, which theme are you using in the video? I like your purple theme.

    • @TrevorSullivan
      @TrevorSullivan  6 дней назад +2

      Hey there! It's the Outrun theme by "samrapdev" in the VSCode Marketplace.

    • @XYZ-gr2iu
      @XYZ-gr2iu 6 дней назад

      @@TrevorSullivan great, thanks!!

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

    Hey, Just learning lua (programming in general as im trying to make a FiveM server) and my output says :
    'lua' is not recognized as an internal or external command, operable program or batch file."
    every time I CTRL + Alt + N sorry if this is a stupid question to ask but would you know why this is happening??

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

      just to add onto this my:
      "local" is dark blue instead of purple like yours
      "last_name" is light blue instead of white
      *name* is orange instead of blueish/purple
      ""print" is light yellow instead of orange

    • @TrevorSullivan
      @TrevorSullivan  Месяц назад +1

      @@JMiiahYT the colors can be customized to whatever you want in your terminal. Those don't matter at all.
      Usually you'll get the error about Lua missing because it's not in your PATH environment variable. There's tons of videos and articles that talk about this fundamental concept, so I'd recommend checking those out. The alternative to adding the Lua directory to "PATH" is to call it using the full filesystem path (ie. C:/Lua/lua.exe)

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

    when i use the run code command in the promt and execute it it says "lua' is not recognized as an internal or external command,
    operable program or batch file.

    • @TrevorSullivan
      @TrevorSullivan  Месяц назад +2

      That's usually because it's not in your shell's PATH. How did you install it? You'll need to find the Lua binary and specify the full or relative path to it.

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

    can you make Advance lua tut sir?

  • @PutYourQuarterUpGaming
    @PutYourQuarterUpGaming Месяц назад +1

    1:02
    And various entirely non useful things like my game mods 😂
    And it is like Java imo. It and HTML are the only languages of any kind even had passing knowledge of before picked up Lua to mod the total wars games beyond texture swapping etc. It felt familiar to me, and wasn’t until dipping my toes into other programming languages, let’s say more mature languages, that I realized how they differ.

  • @0onima
    @0onima 2 месяца назад +6

    Time stamps please

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

    Make more videos on rust

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

    🤗 'Promo sm'