Lua in 100 Seconds

preview_player
Показать описание
Lua is a lightweight dynamic scripting language often embedded into other programs like World of Warcraft and Roblox. It's minimal syntax makes it easier to learn than Python, while being much more performant than other interpreted languages.

#programming #compsci #100SecondsOfCode

🔗 Resources

🔥 Get More Content - Upgrade to PRO

Use code lORhwXd2 for 25% off your first payment.

🎨 My Editor Settings

- Atom One Dark
- vscode-icons
- Fira Code Font

🔖 Topics Covered

What is Lua?
What is Lua used for?
Is Lua faster than Python?
Lua vs Python
Lua Basics Tutorial
How do tables work in Lua?
How to use C or C++ with Lua
Рекомендации по теме
Комментарии
Автор

I love how Jeff always uses “hi mom” instead of “hello world”.

Edit: Jeff made a Twitter post about how his Mom always watched his videos and was proud of him even though she wasn't a programmer. Sadly she passed away.

My heartfelt condolences Jeff. I'm sure she in a better place seeing the great work you do for the tech community making these amazing videos. ❤

vicradon
Автор

Being subscribed to this channel is a problem, because every day I learn about a new piece of technology I want to go play around with

alexandermichaud
Автор

Pretty cool seeing people talk about lua, it was invented in my university and I had a class lectured by one of the creators you showed in this video!

tati
Автор

Lua is one of the greatest scripting language for video game mods that I have encountered. If you're creating a game and have mods in mind as a possible feature, include Lua scripts in that mod loader, the community will make amazing things with it.

Ren-bobj
Автор

Lua is what most likely got me into programming. I started messing around with it in Roblox back in 2010 when I was only nine and that got me into computers, now I'm a software engineer :)

phire
Автор

Fun fact: The PyTorch machine learning library that everyone loves is actually based on the original Torch library, built for Lua.

jakubsebek
Автор

Lists of keywords in each launguage

ANSI COBOL 85: 357
SystemVerilog: 250 + 73 reserved system functions = 323
VHDL 2008: 115 reserved words
C#: 79 + 23 contextual = 102
F#: 64 + 8 from ocaml + 26 future = 98
C++: 82
Dart: 54
Java: 50 (48 without unused keywords const and goto)
PHP: 49
Ruby 42
JavaScript: 38 reserved words + 8 words reserved in strict mode only
Python 3.7: 35
C: 32
Python 2.7: 31
Go: 25
Elm : 25
Lua: 22
CoffeeScript: 19, not necessarily "reserved", plus ~50 to avoid from JS
Smalltalk: 6 pseudo-variables
iota: 2

Little-bird-told-me
Автор

The way you depict the arrays starting at one is perfection.

douggale
Автор

Lua doesn't have Regex because the Regex C library is bigger than the entire Lua compiler and runtime, including Lua's own "Lua patterns" that works like a simpler Regex.

KalleJillheden
Автор

Lua is interesting because it's what I'd a call a "low level" scripting langauge. It's not close to the metal or anything, but it is quite flexible. It doesn't have classes, but you can implement them with function tables, metatables, or closures, each having its advantages and disadvantages. You can also implement multiple inheritance using metatable pooling. You can reuse tables to conserve memory with the table.clear() function. Iterators are simply functions that return a function for retrieving the next element of your (custom) collection.

mikolmisol
Автор

I knew nothing about Lua 2 months ago, but now I realize that Lua is a good complement for C language, and viceversa. Both languages work beautifully between them and when I need to code something quickly, I use Lua, but when I need more performance, I use C or C++. I wonder why I didn't learn before about Lua...

xyzzyx
Автор

Fun fact: in Scottish Gaelic, “luath” (pronounced much the same as “Lua”) means “fast”.

ScotsmanRS
Автор

While there are no traditional classes in lua, you should note that there is a concept called metatables that allows for object oriented programming.

felixo.
Автор

I met lua first time in the *Computercraft* extension for Minecraft — never had so much fun coding before that.

I think this should be the first project in classes to motivate pupils für CS.

enstein
Автор

To me, Lua always felt like someone heard the "JavaScript the Good Parts" talk by Doug Crockford, and decided to make a language from it. Sometimes I wish, we had Lua in the browser.

captmcneil
Автор

BRASIL! VOCÊ FINALMENTE CRIOU ALGO ÚTIL! OBRIGADO MEU QUERIDO PAÍS!

ariankark
Автор

Also worth mentioning that Lua is a first-class citizen for Neovim

f-person
Автор

Lua has become one of my favorite programming languages. It's sheer simplicity makes writing it an absolute joy.

dyXurChannel
Автор

Lua is simple and easy to learn. Perfect scripting language to implement if anyone is interested

SpiteAnims
Автор

A brilliant and thorough introduction to Lua. Thank you for your 100 second session. Much appreciated from beautiful Melbourne Australia from an ex-software engineer.

ProfreshionalLifeBeyond