![Trevor Sullivan](/img/default-banner.jpg)
- 224
- 2 158 781
Trevor Sullivan
United States
Приєднався 22 вер 2006
Learn software development tips on topics ranging from programming (PowerShell, Python, Go, Rust, C#, etc.) to cloud (AWS, Azure, Google Cloud), Linux, open source, and much more!
Any content produced on this UA-cam channel is produced exclusively by Trevor Sullivan, and is not affiliated with any other individual, company, business, government entity, or non-governmental organization (NGO).
Any content produced on this UA-cam channel is produced exclusively by Trevor Sullivan, and is not affiliated with any other individual, company, business, government entity, or non-governmental organization (NGO).
Full Lua Crash Course 💥 2.5 Hours 🖥️⌨️ Beginner's Programming Fundamentals Guide for Developers
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/trevorsullivan
⬆️⬆️⬆️
Visual Studio Code ➡️ code.visualstudio.com
Lua Website ➡️ lua.org
Please follow me on these other social channels!
➡️ trevorsullivan.net
➡️ github.com/pcgeek86
➡️ pcgeek86
➡️ ua-cam.com/users/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
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/trevorsullivan
⬆️⬆️⬆️
Visual Studio Code ➡️ code.visualstudio.com
Lua Website ➡️ lua.org
Please follow me on these other social channels!
➡️ trevorsullivan.net
➡️ github.com/pcgeek86
➡️ pcgeek86
➡️ ua-cam.com/users/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
Переглядів: 9 592
Відео
Organize Rust Projects with Cargo Virtual Workspaces 🦀 Rust Programming Tutorial for Developers
Переглядів 4,9 тис.7 місяців тому
When Rust software development projects become increasingly large and complex, it helps to segment your code into different crates. However, this segmentation of functionality introduces a new issue: managing multiple crates. In this video, we'll explore the Cargo Virtual Workspaces feature in Rust, and learn how to manage multiple crates, using a structured approach. Virtual Workspaces allow b...
Write Unit Tests in Rust 🦀 Rust Programming Tutorial for Developers
Переглядів 3 тис.8 місяців тому
In this video, we'll be exploring how you can write unit tests in Rust. Unit tests help you to write more robust code, and release better quality software. Rust makes writing unit tests incredibly easy, since tests just Rust functions. There are a couple of attributes you'll want to be aware of, and several methods of structuring your test code. You can incorporate your tests into the same code...
Call Amazon S3 APIs with AWS SDK for Rust | Rust Programming Tutorial for Developers
Переглядів 2,7 тис.8 місяців тому
Amazon Web Services (AWS) provides a preview version of their Software Development Kit (SDK) for Rust developers. You can use the Rust SDK to interact with nearly any service in the AWS portfolio. Let's explore the Rust SDK for AWS, and learn how it's designed, and spend some hands-on time with the Amazon S3 service. We'll learn how to research calling APIs including the CreateBucket and PutObj...
Beginner's Guide to Regular Expressions in Rust 🦀 Rust Programming Tutorial for Developers
Переглядів 2,5 тис.9 місяців тому
Regular expressions are powerful constructs that allow us to detect and extract text, using patterns. There is a community crate on the crates.io registry that allows Rust developers (like you!) to include support for regular expressions in their applications. Once you've installed the regex crate, you can construct Regex instances and use various functions to perform pattern detection and data...
Read CSV Files with Rust CSV Crate 🦀📦 Rust Programming Tutorial for Developers
Переглядів 4,1 тис.9 місяців тому
Reading CSV files is a common need for exchanging data between systems. Although more modern serialization formats are available, such as JSON, some legacy vendor systems still use CSV to this day. Using the open source CSV crate, we can easily read various CSV formats. If you need to customize the behavior of the CSV parser, such as changing the field delimiter, adding CSV headers, or commenti...
Spawn External Processes with Rust Standard Library 🦀 Rust Programming Tutorial for Developers
Переглядів 4,1 тис.9 місяців тому
Using the std::process module in Rust, you can build Rust programs that spawn external processes. This is a helpful technique when you need to spawn a black-box vendor application, or rely on powerful applications (ie. FFMPEG) that are unrealistic to implement quickly in Rust. We'll be taking a look at how to use the built-in Command struct to spawn Linux processes synchronously and asynchronou...
Implement Rust Async Future Trait with Tokio Executor 🦀 Rust Programming Tutorial for Developers
Переглядів 11 тис.9 місяців тому
In this video, we'll be exploring how you can implement the Rust standard library's Future trait on your own, custom data structures! The Future's output type and the poll() function are the only two things that you need to implement, but generally your custom type will also have helper functions of their own as well. We'll also be exploring the Tokio async executor crate, and how you can easil...
Intro to Rust Async Function Execution With Smol 🦀 Rust Programming Tutorial for Developers
Переглядів 6 тис.9 місяців тому
The Rust standard crate includes support for defining async functions. Rust async functions return a "Future" type, instead of a direct value. Although you can declare async functions, Rust doesn't include an executor to "drive" those Futures to completion. We need to either develop our own executor (advanced) or use a pre-built executor like tokio, smol, actix, or potentially others. In this v...
Linting Rust Code With Clippy CLI Rules 🤯🦀 Rust Programming Tutorial for Developers
Переглядів 1,8 тис.9 місяців тому
Clippy is a command-line tool that's included in the Rust toolchain installation. Clippy is installed with the Rust toolchain, using "rustup", unless you've installed the "minimal" toolchain. You typically run clippy as a sub-command of the "cargo" CLI tool, in order to run linting rules against your Rust project. There are hundreds of rules in Clippy, and they're searchable on the Clippy websi...
Intro Guide to Rust Documentation With Rustdoc 🦀 Rust Tutorial for Developers
Переглядів 2,7 тис.9 місяців тому
When you install the Rust toolchain, one of the essential developer tools that's installed is called "rustdoc." This is a command-line tool that generates static documentation for your Rust project, based on comments discovered in your Rust source code files. Although generating documentation might seem like a simple concept, there's quite a few advanced features in Rustdoc that make it a power...
Beginner's Guide to Rust Operator Overloading 🦀 Rust Programming Tutorial for Developers
Переглядів 1,4 тис.9 місяців тому
Rust provides several "traits" that allow you to overload the behavior of mathematical operators. You can implement custom behaviors for your user-defined structs in your Rust applications! In this video, we'll explore a couple of different techniques to use the Add trait, including an example with Rust generics, to implement custom behaviors. Be creative and explore these unique traits in your...
Implement the Simple Rust Default Trait 🦀 Rust Tutorial for Developers
Переглядів 1,4 тис.9 місяців тому
The Rust standard library provides a "default" module, which declares a trait named "Default." This trait provides a single, simple method declaration called "default()" that you can implement on your custom Rust structs. The purpose of this default() function is to simplify the construction of new Rust struct instances. Normally you'd need to specify every single data field, when instantiating...
Hands-on With Dynamic Dispatch Traits in Rust 🦀 Rust Tutorial for Developers
Переглядів 5 тис.9 місяців тому
Rust provides a language construct called dynamic dispatch for trait objects, which allows you to write generic code. Functionally, dynamic dispatch provides similar benefits to writing functions with "generic" arguments, which we covered in an earlier video. However, dynamic dispatch results in smaller binary sizes, with a potential cost at runtime. In this video, we'll take a hands-on approac...
Sending HTTP Requests in Rust Applications 🦀 Rust Tutorial for Developers
Переглядів 7 тис.9 місяців тому
There are several different crates available for Rust, that allow you to craft and send HTTP requests to remote servers. The crate we'll be looking at, in this video, is called "reqwest." Reqwest is built on top of another low-level HTTP client crate called "Hyper." You can use both a synchronous or asynchronous approach to handling HTTP requests. To keep things easy to understand in this video...
Hitchhiker's Guide to JSON Data in Rust 🦀 Serialize and Deserialize with Serde 🗺️ Rust Tutorial
Переглядів 9 тис.9 місяців тому
Hitchhiker's Guide to JSON Data in Rust 🦀 Serialize and Deserialize with Serde 🗺️ Rust Tutorial
Parse Rust CLI Args With Clap 🦀 Rust Tutorial
Переглядів 10 тис.9 місяців тому
Parse Rust CLI Args With Clap 🦀 Rust Tutorial
Parse CLI Arguments With Rust Standard Crate 🦀📦 Rust Tutorial
Переглядів 1,8 тис.9 місяців тому
Parse CLI Arguments With Rust Standard Crate 🦀📦 Rust Tutorial
Overview of Rust Cargo Tool 🦀📦 Rust Tutorial
Переглядів 4,3 тис.9 місяців тому
Overview of Rust Cargo Tool 🦀📦 Rust Tutorial
Beginner's Guide to Rust Filesystem APIs 🦀 Rust Tutorial
Переглядів 11 тис.9 місяців тому
Beginner's Guide to Rust Filesystem APIs 🦀 Rust Tutorial
Message Passing With Rust MPSC Channels 🦀 Rust Tutorial
Переглядів 4 тис.9 місяців тому
Message Passing With Rust MPSC Channels 🦀 Rust Tutorial
Share Rust Thread Data With Mutexes 🦀 Rust Tutorial
Переглядів 3,1 тис.9 місяців тому
Share Rust Thread Data With Mutexes 🦀 Rust Tutorial
Rust Scoped Threads 🦀 Rust Tutorial
Переглядів 3,8 тис.9 місяців тому
Rust Scoped Threads 🦀 Rust Tutorial
Rust Threading Basics 🦀 Rust Tutorial
Переглядів 4,7 тис.9 місяців тому
Rust Threading Basics 🦀 Rust Tutorial
Rust Time Module and Chrono Crate Intro 🦀
Переглядів 3,3 тис.9 місяців тому
Rust Time Module and Chrono Crate Intro 🦀
Rust HashMap and HashSet Collection Types 🦀
Переглядів 3,4 тис.10 місяців тому
Rust HashMap and HashSet Collection Types 🦀
Use the Rust Vec Type for Dynamically Expanding Arrays 🦀
Переглядів 2,5 тис.10 місяців тому
Use the Rust Vec Type for Dynamically Expanding Arrays 🦀
Rust Generics and Traits: Define Common Struct Behaviors 🦀
Переглядів 4,2 тис.10 місяців тому
Rust Generics and Traits: Define Common Struct Behaviors 🦀
Implement Methods on Rust Structs 🦀
Переглядів 3,8 тис.10 місяців тому
Implement Methods on Rust Structs 🦀
I am going to love Rust each time I am learning new things about it!!!
I will try this.
It isn't necessary you answer me, the reason was the annotations I have put textual "impl Fn()" must not be written in the editor, they are VSC Rust Analyzer annotations. Regards
Why not Python then?
@@linkernick5379 I would love to do Python training. I've done some work with Python before, but haven't focused deeply on it. I'd actually suggest learning Rust with my playlist. Have you considered that? 🦀
@@TrevorSullivan I know Rust, thank you 😚, (at least on the level that allows me to earn money). I mean why Lua, if there exist Python with (seemingly) the same characteristics: dynamic typing and garbage collected runtime?
@@linkernick5379 oh I don't know, I was just looking to learn something new. I keep hearing about Lua here and there and wanted to understand why people keep bringing it up. Figured I would learn it and document my experience. 😊
AWESOME ANYONE HERE IN 2024 LOL
Your explanations are top-notch. Thanks. what project can i start building at this level
Thanks! I'm glad you're learning from these videos. A good start would be a CLI tool.
Ok thanks
Trevor, you are great speaker, comunicator, and teacher, thanks for your effort, and "lets go surfing go" for more content
Well, I guess I sorta see the bird takin' flight from his first sketch when designin' these wings. Really cool piece of technology nonetheless!
Really cool use case, thanks for this video!
20:55 I needed configure the tunneling to my server on termius. The response is here.
u are the hero
absolutely amazing, as a beginner to rust. This helps quite a lot, youre going over the small details and everything. A very nice idea for your channel growth could be rust shorts, where you summarize these videos. keep up the good work 👍👍👍
Thank you very much! I'm glad you're benefiting from these videos. God bless you. ❤️
I've actually experimented with a few Rust shorts. I'm not a big fan of creating Shorts though! I enjoy making long form videos that teach new concepts. I appreciate the idea though. 😊
great!
Excellent material. Have about 8 months of Rust exposure. This helps solidify the concepts.
coding using `root` account? The man has no fear.
I have structure: #[derive(Serialize, Deserialize)] #[allow(dead_code)] pub struct KDTree <'a>{ root: KDTreeNode, state: HashMap<&'a str, usize> } and believe me, deserialization became a nightmare there, because it asks for 'de special lifetime that must be associated with 'a for state lifetime representation in order to work properly.
Very helpful. Good job.
I learned so much. Thank you
👍
This whole series is very high quality. Thank you creating and sharing this series!
nice video!
Opt = optimized ? Im not sure.
this was a great tutorial
i believe it doesnt give a warning for the 1..=36 because some part of the pattern can still be reached. only 0 and 5 are unreachable
A playlist about the stabby macro = ❤❤
You have amazing rust content🙌
Great video, concise explanation with informative examples, thank you. BTW, you should drop the "please press the like button..." suggestion. Be sure that if your content is valuable to viewers they would press that button with or without you asking them to 😉.
Awesome video!!! really learnt a lot, gave up came to YT after failing to understand docs Can anyone tell me what theme and extension is being used for Rust?
Thank you for your kind words! The theme is "outrun" by "samrapdev" and the extension is Rust Analyzer.
man , thank you so much 🥺✨
does rust make any guaruntees about channel / thread allocation? For example, can I ensure that when I spawn two threads that they are on the same cpu core?
That's a good question. Is there any reason that you wouldn't trust the OS thread scheduler to handle this appropriately? Why are you wanting to manually manage thread affinity from your Rust application? Are you building an OS in Rust?
I do see there's a crate called "core_affinity" that would be worth exploring.
@@TrevorSullivan not making an OS, but core affinity could be useful in a heavy compute (HPC) type of application. I might be wrong, but on hpc systems (while they have a control plane to manage resources over a network connection) you might want to ensure that you are not oversubscribing your resources or that a process utilizes only a certain number of cores and threads etc…?
@@TrevorSullivan oh nice! I will look at this. Thanks!
What is the commend to build solution file in c++
Hi Trevor, which theme are you using in the video? I like your purple theme.
Hey there! It's the Outrun theme by "samrapdev" in the VSCode Marketplace.
@@TrevorSullivan great, thanks!!
@28.00 for who do not understand println macro itself takes immutable reference of value it is supposed to print. hence the error
This is so good man! Love this video and your content. I personally appreciate that you have those articles of some very root sources present in you video.
top! thnaks yu mate for what yu are doing. I think yu deserve much more attention of rust community! wish yu a good luck
Thank you, Richard! I appreciate you being part of the community! I'm glad that you're learning from these videos. That's why I produce them. 🦀🦀
Excellent, great clear explanation -> Thank You!
This is making so much click for me. Thank you! SUBSCRIBED.
I'm so happy to hear that! That's why I create these videos, to help people like you. 🦀🦀
I really would like to see a video explaining the real benefit of using LXD instead pure-LXC. All those networking options are pretty simple to do on pure-LXC side, without pushing extra lines of code to the system. I easy use pure bash scripts to automate most of what LXD does... but.. the LXD project probably is much more - and very bad communicated to the community. My 2 cents.
How is your code getting auto compelete any free tool.
Yes check out my first video on Rust, where we talk about the Rust Analyzer extension for VSCode!
Kindly provide a detailed video on lifetimes. Appreciate the effort you put in to make our learning effortless.
Not going to lie this is daunting lol as i follow along i feel i know this stuff but as soon as i try to guess ahead what i should do i get a bunch of errors. what a mental gym rust is
Hi Trevor, now that you have a ui how would one publish the ui so that it's accessible on the internet as a dashboard for example as an internal app
=== 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
Crazy.. yoo Its only 2 Months ago (the vid)
Awesome but, how did you access the crab emoji so quickly lol
You can use the WIN + PERIOD keyboard shortcut to open up the emoji picker on Windows 11!
@@TrevorSullivannice one thanks. Really high quality stuff
@@jesusmtz29 Thank you very much, friend! I am glad you're benefitting from these free videos. 🙂
Did you made any video on liferimes?
Hi there! No I have not made any videos dedicated to lifetimes yet. Thanks for checking!
@@TrevorSullivan Can you please make one on Lifetimes and Futures topics
@@salaar-zj2ks I already have a video on async futures! Actually two videos. I will certainly consider making one on lifetimes. I know that some other creators have already covered this topic fairly well.
@@TrevorSullivan great thanks for your efforts
Awesome tutorials about Docs in Rust, learned a lot. However, would add 2 cents; for dynamic dispatching of animals field, Vec<Box<dyn Animal>> holds good.
Any plans on making a ratatui rust tutorial ?
I definitely want to! I have toyed around with it a little bit, but I'm not really good with it yet. It seems like an awesome framework!
@TrevorSullivan I have built a small ai navigator in rust I want visualize it so I am thinking to use ratatui but any recommendations ? It's like cave map i have to visualize
@@praveenpp2929 hmmm have you considered a 3D game engine like Bevy? That sounds like it could be a lot of work!
Great Stuff!!! Please keep on creating valuable content about Rust. Also, if you please create a video on efficient data structures in Rust.
🤗 'Promo sm'