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

  Рет қаралды 6,515

Trevor Sullivan

Trevor Sullivan

2 ай бұрын

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

Пікірлер: 29
@Im_Ninooo
@Im_Ninooo 9 күн бұрын
=== 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
@LouisWeiser
@LouisWeiser Ай бұрын
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 !
@alijavidi2503
@alijavidi2503 Ай бұрын
I watched the whole video. Great and Smooth! Keep up the good work :))
@B52-ge8qy
@B52-ge8qy 2 ай бұрын
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 ай бұрын
Good to see you back ;)
@TrevorSullivan
@TrevorSullivan 2 ай бұрын
Thanks! Glad to be back. I've been posting AWS + Rust videos over on the StratusGrid KZbin channel. Make sure to follow that! 🦀🦀
@nederui
@nederui 29 күн бұрын
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.
@thescottallen
@thescottallen 20 күн бұрын
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 20 күн бұрын
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 ай бұрын
12:29 you are able to install Lua through Homebrew with `brew install lua`
@BlackistedGod
@BlackistedGod 2 ай бұрын
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 29 күн бұрын
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!
@user-ew6mz8kz8v
@user-ew6mz8kz8v 18 күн бұрын
Огромное спасибо!
@TrevorSullivan
@TrevorSullivan 18 күн бұрын
Пожалуйста! Спасибо, что смотрите мой канал!
@XYZ-gr2iu
@XYZ-gr2iu 11 минут бұрын
Hi Trevor, which theme are you using in the video? I like your purple theme.
@TrevorSullivan
@TrevorSullivan 8 минут бұрын
Hey there! It's the Outrun theme by "samrapdev" in the VSCode Marketplace.
@JMiiahYT
@JMiiahYT 26 күн бұрын
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 26 күн бұрын
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 26 күн бұрын
@@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 Ай бұрын
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: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 ай бұрын
Time stamps please
@chandandbg
@chandandbg 2 ай бұрын
Make more videos on rust
@TrevorSullivan
@TrevorSullivan 2 ай бұрын
I will!
@madisonrodgers6870
@madisonrodgers6870 14 күн бұрын
🤗 'Promo sm'
NeovimConf 2022: Lua, a Primer
30:10
John McBride
Рет қаралды 14 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 34 М.
Miracle Doctor Saves Blind Girl ❤️
00:59
Alan Chikin Chow
Рет қаралды 24 МЛН
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 2,3 МЛН
Indian sharing by Secret Vlog #shorts
00:13
Secret Vlog
Рет қаралды 44 МЛН
Why Is Lua So Popular?
8:03
Awesome
Рет қаралды 82 М.
Let's Create a Compiler (Pt.1)
1:11:03
Pixeled
Рет қаралды 457 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 752 М.
7 Amazing CLI Tools You Need To Try
18:10
Josean Martinez
Рет қаралды 182 М.
Lua Crash Course - Less than 15mins
14:50
PohkaDev
Рет қаралды 112 М.
15 crazy new JS framework features you don’t know yet
6:11
ThePrimeagen On Running Linux
9:40
Tech Over Tea
Рет қаралды 172 М.
Making a Game in Lua with No Experience
5:52
Goodgis
Рет қаралды 219 М.
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 640 М.
Как я сделал домашний кинотеатр
0:41
RICARDO
Рет қаралды 1,5 МЛН
Samsung Android Mobile Battrey
0:39
Gaming zone
Рет қаралды 342 М.
A Comprehensive Guide to Using Zoyya Tools for Photo Editing
0:50
Обзор игрового компьютера Макса 2в1
23:34
Introducing GPT-4o
26:13
OpenAI
Рет қаралды 4,4 МЛН
#miniphone
0:18
Miniphone
Рет қаралды 10 МЛН