I Tried to Learn Rust (w/ Advent of Code)

preview_player
Показать описание

I tried to learn the Rust programming language. These are the first 4 or so days, where I start off in the Rust book, get bored because I don't like reading that much, then do some Advent of Code. I dive into the docs and a multitude of online resources to figure out how to do these things in Rust. I've done more than what this video shows, but it's already 1.5 hours long and I didn't fee like editing the rest lol. My plan is to actually get into building something now. I want to build Neofetch, but in Rust, and for NixOS. Sure, there are plenty of CLI tools that already do this, but that's not the point. I thought this would be a fun project, and so far it is. So once I finish it, I'll make a video about the entire build that hopefully isn't this long. But we'll see. Enjoy the video!

0:00 i'm learning rust
0:40 rust book - introduction
1:28 rust dev tools & legacy code jabs
3:04 error messages w/ Ferris
3:38 starting my rust journey!
6:33 hello world
9:33 hello cargo
12:44 cargo recap
12:58 building for release
14:11 variables and mutability
16:45 shadowing
18:01 data types
19:58 aoc in rust - day 1 part 1
39:45 aoc in rust - day 1 part 2
49:10 aoc in rust - day 2 part 1
1:06:28 aoc in rust - day 2 part 2
1:11:37 some thoughts on aoc & rust
1:15:03 rust ownership
1:15:59 aoc in rust - day 3 part 1
1:28:32 i'm going to learn more by building

A portion of this video was sponsored by Micro Center.

Don't know why you'd want to follow me on other socials. I don't even post. But here you go.
Рекомендации по теме
Комментарии
Автор

Interesting to watch someone else's learning curve. I come from JS/TS land for about 10 years, and man has it been a brutal but amazing experience learning Rust. I've noticed that it makes me think in terms of memory usage and performance a lot more often, rather than nulls and edge cases and undefined behavior. The clone() method is there when you need it, but it feels like a bandaid in most cases, whereas that's standard behavior in garbage collected slop languages. Great video!

CaseyFronk
Автор

1h 30min video and it's really well edited. Great job as always!

Intervampir
Автор

So cool to see your experience with Rust! I do recommend reading more about how Rust for works and how it integrates with collection types and iterators and learning more about Iterators it helps a lot. Happy learning!

ericshimizukarbstein
Автор

I’ve been learning rust for the past 3 months coming from JavaScript/C# and I’m not sure what it is but it’s oddly satisfying, and you can compile it into web assembly to insert it into JavaScript. Shoot I only use JavaScript for dom manipulation at this point

doriancerutti
Автор

Looks like you've learned how to program java in rust. Look forward to seeing some rust code! ;)

You started to touch on them later, but you really need to utilize iterators more often. Get rust analyzer running in your ide, it can be vim or vscode. Personally I only add type declarations when needed. If rust can figure out what the type is by the right hand side of an initial assignment, you don't need to add it yourself. Though I have vim setup to show the types as though they existed explicitly in the source.

Hope you have a good rust journey!

jamesnewman
Автор

I'm just dropping this here in case it is useful to you, though it is a polarizing topic. If you like the vim style of coding, but you're not sold on vim itself for whatever reason: have a peek at helix. There's very clear pros and cons to each (vim can pretty much do whatever you want, if you put the time into configuring it, helix comes with a ton of nice tools out of the box), but it is highly subjective which people prefer. I happen to really like helix, but it's definitely not for everyone :)

Psoewish
Автор

Great video. Now rust seems more approachable than before watching this. Have a great week.

Dis-Trackted
Автор

What a great watch! Learning Rust sure is a unique experience

jvcmarc
Автор

Trait inheritance definitely one of the cool features of rust

ronaldossai
Автор

I think learning Rust with Advent of Code with no prior experience of either Rust or Advent of Code might be a lot all at once. Rustlings or 100 Exercises To Learn Rust might have been a better first step just to learn some idomatic Rust patterns before diving into AOC.

not_ever
Автор

Love it, I am learning some rust with you. Mainly a Java dev myself

HarpreetSingh-xgzm
Автор

Hi boss.After learning this RUST. I wrote a production server db backup where using Rust, Tokio, Tokio Schedule and s3. Hosting via kubernetes and docker which is very interesting for me. Thanks from BD.

shakibahmed
Автор

Embracing iterators is probably my favourite part about rust. I hate writing for loops. Just too messy

lorenzvo
Автор

That clone to just pass the vec to the function kinda hurts. XD

bloody_albatross
Автор

That’s one of those videos that I am sad because the only thing I can do to help is to “Like” it.

JoãoPedroFavoretti
Автор

I wonder, is this the first time you used regular expressions?

bloody_albatross
Автор

Please stop using indexing in for. Just iterate over things :)
Iterators in Rust are the first thing you need to know for AoC.

scipetr
Автор

Whey I started learning Rust, boy I felt stupid. I like it very much now though

kc
Автор

08:08 - great ❤ where is the master class tripple A+ course and the link to your Rust WhatsApp Group 😂😂😂

karameht
Автор

I recommend neovim instead, LSP and treesitter is a breeze

igorsilvestre
welcome to shbcf.ru