- 41
- 118 975
Thomas 🏕
United States
เข้าร่วมเมื่อ 31 ก.ค. 2006
🏕Hello! 👋
I am a software developer (programmer) and I work on infrastructure monitoring, dashboards, analytics and systems programming. I also scuba dive 🤿 and game 👾 in my spare time.
This channel is dedicated to learning how to program in Rust Language with a mix of various tech stacks I’m interested in.
I like to learn by doing things so expect a lot of exercises, exploring computer science theory, projects ideas, game dev, and systems programming. Most tutorials cover just a “a how to” on the API, but I like to start with the problem and work backwards. I like building things and discovering how things work, find out what’s relevant, efficient and idiomatic to solve problems.
I also will occasionally post live coding sessions where I just try to learn something new - or it’s me coding a project or working through a book.
If you have ideas for my channel please leave a comment in the video and give them a like 👍 Thanks for following me through this journey.
Thanks! 🍻
I am a software developer (programmer) and I work on infrastructure monitoring, dashboards, analytics and systems programming. I also scuba dive 🤿 and game 👾 in my spare time.
This channel is dedicated to learning how to program in Rust Language with a mix of various tech stacks I’m interested in.
I like to learn by doing things so expect a lot of exercises, exploring computer science theory, projects ideas, game dev, and systems programming. Most tutorials cover just a “a how to” on the API, but I like to start with the problem and work backwards. I like building things and discovering how things work, find out what’s relevant, efficient and idiomatic to solve problems.
I also will occasionally post live coding sessions where I just try to learn something new - or it’s me coding a project or working through a book.
If you have ideas for my channel please leave a comment in the video and give them a like 👍 Thanks for following me through this journey.
Thanks! 🍻
Rust Programming Exercises: Markdown Blog with Tide
In this video we create our own markdown based blog in Rust with the Tide web framework. We explore each of the necessary minimal dependencies to get our project working including: an async runtime (async-std), markdown parsing (pulldown-cmark), converting into json objects (serde, serde-json), working with http types like Request/Response/Status Codes/Body (http-types), the http protocol layer used by tide (async-h1), rendering templates with handlebars. We also look at client side dependencies such as the parcel build tooling, tailwind css and typography, postcss, and highlight.js for code syntax highlighting. I go over each dependency in brief detail, how the tide framework is put together as we explore what it supports and how we might build our own web framework using similar concepts and single purpose minimal dependencies. By the end of this you should be able to use these concepts to build any number of simple web applications.
↠ Write-up:
Blog Post: nyxtom.dev/2022/06/26/tide/
↠ References:
http-rs/tide: docs.rs/tide
http-rs/async-h1: docs.rs/async-h1
http-types: docs.rs/http-types
pulldown-cmark: docs.rs/pulldown-cmark
async-std: docs.rs/async-std
async-std book: book.async.rs/
tailwindcss: tailwindcss.com/
parcel: parceljs.org/
highlight.js: highlightjs.org/
serde: docs.rs/serde
handlebars: docs.rs/handlebars
routefinder: docs.rs/routefinder
↠ Dotfiles: github.com/nyxtom/dotfiles
↠ Twitter: @nyxtom nyxtom
↠ Channel: th-cam.com/users/nyxtom
Cheers! 🍻
🦀 #rust #rustlang #rustprogramming #exercises #programming
↠ Write-up:
Blog Post: nyxtom.dev/2022/06/26/tide/
↠ References:
http-rs/tide: docs.rs/tide
http-rs/async-h1: docs.rs/async-h1
http-types: docs.rs/http-types
pulldown-cmark: docs.rs/pulldown-cmark
async-std: docs.rs/async-std
async-std book: book.async.rs/
tailwindcss: tailwindcss.com/
parcel: parceljs.org/
highlight.js: highlightjs.org/
serde: docs.rs/serde
handlebars: docs.rs/handlebars
routefinder: docs.rs/routefinder
↠ Dotfiles: github.com/nyxtom/dotfiles
↠ Twitter: @nyxtom nyxtom
↠ Channel: th-cam.com/users/nyxtom
Cheers! 🍻
🦀 #rust #rustlang #rustprogramming #exercises #programming
มุมมอง: 4 860
วีดีโอ
Async I/O in Depth: Futures and Implementing an Async Runtime
มุมมอง 6K2 ปีที่แล้ว
In this presentation I discuss Futures in Rust and implementing our very own async/await runtime. We start out by reviewing our current implementations, discussing state machines, generators, threads, forking architectures and various approaches we have taken thus far. We take a look at how Futures and async/await code is compiled by the Rust compiler. Looking at HIR and MIR compiled rust code,...
Async I/O in Depth: State Machines, Event Loops and Non-Blocking I/O System Calls
มุมมอง 9K2 ปีที่แล้ว
In this presentation we revisit the HTTP Web Server by looking at other system call apis that allow us to perform non-blocking calls. We look at various event based / queue based apis such as epoll, kqueue, poll, iocp, io_uring, wepoll. To build for these apis I cover the implementation of a State Machine and its use in working with a client request over time. We learn about the Reactor Pattern...
Programming in Rust: Enums, Tagged Unions, Memory Layout and Pattern Matching
มุมมอง 3.1K2 ปีที่แล้ว
Continuing in the short series on beginner's guide to programming in rust, we cover if enums and match expression logic in Rust. This video will show you the underlying memory representation of an enum, how it corresponds to type theory tagged unions. We will also cover the use of match expressions and pattern matching on variations of enums and values. I take a look at the Option enum and the ...
Programming in Rust: If Statements, While Loops, Conditions, and Boolean Logic
มุมมอง 7162 ปีที่แล้ว
Continuing in the short series on beginner's guide to programming in rust, we cover if conditions, boolean logic, loops and while/if let statements. This video will show you how to use a while loop, for loops, perform boolean logic, create conditions, and understand basic iterators with a range. I also briefly cover the use of a library crate where we can create tests for our functions. ↠ Refer...
Programming in Rust: Functions and Let Statements
มุมมอง 7282 ปีที่แล้ว
Continuing in the short series on beginner's guide to programming in rust, we cover functions and statements in Rust. This video will show you how to declare a function, pass around parameters, specify types for those parameters, specify types for our variables, and perform basic calculations. We learn about the *let* keyword, the ways you can return values from statements and expressions, and ...
Programming in Rust: Basic Types and Primitives
มุมมอง 4662 ปีที่แล้ว
Continuing in the short series on beginner's guide to rust, we cover basic types. This video is meant to show you all the basic fundamental primitives in Rust from signed and unsigned numbers, floating points, booleans, arrays, and more. I discuss some of the common pitfalls in arithmetic and casting to look out for in Rust as well as pointing out basic memory layout and bit size of each type. ...
Getting Started with Rust
มุมมอง 1.1K2 ปีที่แล้ว
This is a quick overview of Rust, how to get started in it, where it comes from (in terms of the type systems, raii, type theory (affine types / linear types), trait abstractions, monomophization from the compiler and general syntax introduction). I also provide links to various resources for getting started as well. ↠ References: Rust Cheatsheet: cheats.rs/ Rust Playground: play.rust-lang.org/...
Async I/O in Depth: Thread Pools, Radix Trees, Channels and More - High Performance HTTP Web Servers
มุมมอง 10K2 ปีที่แล้ว
In this presentation I'd like to cover a complete overview of our HTTP Web Server in Rust. We start by implementing a basic TcpListener that accepts sockets in a for loop. We build a request router using a radix tree that accepts rust closure functions that we later define to handle responses. The router will take care of initially reading from the socket of a client using a BufReader. By readi...
Async I/O in Depth: HTTP Web Server
มุมมอง 3.6K2 ปีที่แล้ว
With this video we create an HTTP Web Server in Rust using the TcpListener and TcpStream. We implement several variations of async architectures to work with our web server. Iterative Sync requests, forking multiple processes, pre-forked processes, and a threaded model. We cover the use of a Radix Tree to implement the router for our web server. We also cover sending and reading static files as...
Async I/O in Depth: Iterative TCP Echo Server
มุมมอง 3K2 ปีที่แล้ว
This series explores Asynchronous I/O in Rust. With this video we implement a simple TCP Echo Server and Client using the TcpListener and TcpStream structs. We start out by covering system architectures, working with the operating system, differences between blocking and non-blocking operations, system calls, computational vs I/O bound applications. We also take a look at libc crate to perform ...
Rust Programming Exercises: Strings Search and Replace
มุมมอง 2K2 ปีที่แล้ว
In this video we explore several String utilities, regular expressions, search and replace, capture groups, find, splitting strings, and various string manipulation techniques in Rust. We make use of the Regex crate, glob for finding files with a glob wildcard path, reading in a file from fs, reading from stdin. We also briefly cover the rope data structure for more efficient string manipulatio...
Rust Programming Exercises: Bloom Filters and Bit Vectors
มุมมอง 4.7K2 ปีที่แล้ว
In this video we implement a probabilistic data structure known as a Bloom Filter. We use a simple Vec to store u8 numbers and use bit manipulation to set and get values within the data structure. We also use the fasthash crate in order to take advantage of the murmur3 hash function and we discuss various hashing functions that are commonly used in popular libraries and applications such as Red...
2D Pixel Framebuffers, Event Loops and Syscalls (in Rust)
มุมมอง 3.5K2 ปีที่แล้ว
In this video we go in depth with event loops and system calls in Rust. We start out with a simple 2D Pixels Window built on top of WGPU and Winit. We dig into what sort of system calls are being made in order to create our event loop for the window and what layers of abstraction and libraries such as mio and libc are doing underneath to communicate with the operating system. We learn a little ...
Rust Programming Exercises: Autocomplete with Tries
มุมมอง 2.3K2 ปีที่แล้ว
In this video we implement a Trie data structure to efficiently store words in a dictionary and phrases to be used for fuzzy search and autocomplete search results. We make use of the Default trait to help us generate a default node, a recursive Node in the Trie will store a vector of children, and we store the count for the frequency of the words along the tree. We discuss the inversion of the...
Double Ended Iterators and Linked Lists (in Rust)
มุมมอง 1.3K2 ปีที่แล้ว
Double Ended Iterators and Linked Lists (in Rust)
Rust Programming Exercises: Double Linked List
มุมมอง 8K2 ปีที่แล้ว
Rust Programming Exercises: Double Linked List
Rust Programming Exercises: Find All Duplicates in an Array
มุมมอง 2.5K2 ปีที่แล้ว
Rust Programming Exercises: Find All Duplicates in an Array
How Serde Parses JSON with Derive Macros (in Rust)
มุมมอง 2.5K2 ปีที่แล้ว
How Serde Parses JSON with Derive Macros (in Rust)
Debugging References Counters in Rust (in Vim)
มุมมอง 6402 ปีที่แล้ว
Debugging References Counters in Rust (in Vim)
Tree Traversals with Reference Counting and Interior Mutability (in Rust)
มุมมอง 1.4K2 ปีที่แล้ว
Tree Traversals with Reference Counting and Interior Mutability (in Rust)
Tree Traversals with Iterators and Lifetime Annotations (in Rust)
มุมมอง 1.4K2 ปีที่แล้ว
Tree Traversals with Iterators and Lifetime Annotations (in Rust)
Binary Tree Inorder Traversal Algorithm (in Rust)
มุมมอง 7332 ปีที่แล้ว
Binary Tree Inorder Traversal Algorithm (in Rust)
Binary Tree Level Traversal Algorithm (in Rust)
มุมมอง 2.1K2 ปีที่แล้ว
Binary Tree Level Traversal Algorithm (in Rust)
Binary Tree Insertion Algorithm (in Rust)
มุมมอง 6K2 ปีที่แล้ว
Binary Tree Insertion Algorithm (in Rust)
Rust Programming Exercises: Reverse Linked List
มุมมอง 1.4K2 ปีที่แล้ว
Rust Programming Exercises: Reverse Linked List
Rust Live Coding: HTTP CLI with Reqwest, Tokio, Async (no talking)
มุมมอง 1.5K2 ปีที่แล้ว
Rust Live Coding: HTTP CLI with Reqwest, Tokio, Async (no talking)
What’s the audio visualiser you use at the bottom?
Hi, can you tell me the editor and the theme you are using?
I knew when i saw 3k subs this would be gold. Thank you sir.
Bro what theme are you using?
This is really cool demo, thanks!
World-class. Could this be done
Hello witch tools do you use to create your vid and illustration.?
I have also made an echo server. It is only for Windows. The Windows thread pool and synchronous objects cannot be ported to Linux. The front server that accepts connections from the client accepts 15,000 connections. The front server has a small connection to the echo server. The limit is 16000 connection per 1 interface due to Windows specifications. The client checked the consistency of echo data while connected. I still measured the delay.
Nice presentation but the title is a bit misleading. Expected to learn something about async (futures, await, etc...) but there's only info about parallelism based on OS threads.
Can you share the source code you write in these videos?
Hey! Can you share the slides pdf?
Thanks a lot for your explanation. I tried this code and found that the case when L equals R is not handled. I guess this case is possible.
4:57 instead of unwrapping the option, you can do `let current = current?;` or `let Some(current) = current else { return None; };`
Good one! Thanks
00:12 It says quick recap of the last few videos. This is the first video in the playlist that I see. Where are the other videos that precede this one?
Same question, could not find the previous video.
What is this... a new framework...?
I'd like to have separate libraries for input handling, windows and GPU. Now it is all so interleaved
This series is very helpful, answers lots of questions that confused me for a long time, thank you!!!
thought you were making a GUI.........
If you are here you are no longer in the Rust for beginner TH-cam algorithms lol 😂😂😂
Another mistake is saying a char is 4 bytes because of UTF-8. In Rust, strings are UTF-8 but individual chars are UTF-32. A string in Rust is *not* stored as a series of chars, though if you iterate over it the iterator will return chars to you, decoded from the UTF-8.
My implementation was miserable until i finally stumbled across refcell. Wish I found this video hours sooner lol! Great job! ty
nice video again!
amazing
Appreciate this work!
How is sorting or calculating means over millions of records CPU bound? Are you running a JSON file as your database?
Great video! May I ask what your theme is?
I don't think there is any null pointer optimization for Rc or Weak. It lists right there in the documentation you pointed to what types have NPO and neither are listed.
There is. println!("{}", core::mem::size_of::<Option<u128>>()); // 24 (not optimized) println!("{}", core::mem::size_of::<Option<Box<u128>>>()); // 8 println!("{}", core::mem::size_of::<Option<Rc<u128>>>()); // 8 println!("{}", core::mem::size_of::<Option<Weak<u128>>>()); // 8 Anything that contains a raw pointer or reference within it is usually optimized println!("{}", core::mem::size_of::<String>()); // 24 println!("{}", core::mem::size_of::<Option<String>>()); // 24 println!("{}", core::mem::size_of::<Vec<u8>>()); // 24 println!("{}", core::mem::size_of::<Option<Vec<u8>>>()); // 24
Great video! Do you have any suggestions on blogs / books that dive deeper into this?
Oh man, I've been battling with Rust implementing a BST the last 2 days and it's funny how every single error you mentioned I went through, and I saw the same exact thought process take place. Very funny experience for me haha
💛💚🦀
heap sort, thanks
Thank you so much for your videos. I am starting on rust and i am learnign a lot from your videos. I sincerely hope you can continue making more. one small thing to call out, probably also needs double checking from you is that, when we define the input parameter as `AsRef`, we need to be cautious that the function still takes ownership from the input parameter. So in this case, using the function you have defined in the video, once a vector is used for binary search, it is no longer usable. I think if that is right, then from the design perspective, it may be better to make the input parameter simply &[T]?
Best channel ever, please keep doing videos!
You are really awesome!
best video!
Hey, really liking your videos. Thanks for being descriptive rustic person against exist ones. I just wonder what is that presentation tool that you used. (th-cam.com/video/yfcJGEISsLc/w-d-xo.html)
Thanks for this, doing god's work.
Is that neovim?
Is the code codes available on some repository i can access?
nevermind, i found it
thank you 🙏 😊
I always get the creeps of long arrow functions, more than 2 lines and I need to make a function. I am also allergic to man { { { but that formatting was really nice!
You deserve more subs pal ...such great content.
Is there no way to create a helper push_helper(self, value, a, b) and then push_front(self, value) calls push_helper(self, value, head, tail) and push_back(self, value) calls push_helper(self, value, tail, head)?
Hello, very good videos by the way! But your example at 4:17 is broken. (compiler error) You are writing : let operator = Token::Operator(Operator::Add); but this should be let operator = Token::Op(Operator::Add); Token::Operartor does not exist ;-)
Really appreciate your detailed tutorial on the underlying mechanism! Thank you so much.
Thank you so so much for sharing your knowledge on Rust and backend in general. I've learn so much besides Rust but also the general backend / network programming. You are in my view very underrated.
Thank you so much for this video, it helped me learned a lot more about Rust than I have ever expected But I got to say programming a linked list in Rust in this safe version is way harder than other programming languages that I've used, C++ for example is so quick and easy, but I'm going all in for the safetyness Rust provides
Wow, your vim setup is badass.