@LexClips

Lex Fridman Podcast full episode: https://www.youtube.com/watch?v=tNZnLkRBYA8
Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/cv8595-sa
See below for guest bio, links, and to give feedback, submit questions, contact Lex, etc.

GUEST BIO:
ThePrimeagen (aka Michael Paulson) is a programmer who has educated, entertained, and inspired millions of people to build software and have fun doing it.

CONTACT LEX:
Feedback - give feedback to Lex: https://lexfridman.com/survey
AMA - submit questions, videos or call-in: https://lexfridman.com/ama
Hiring - join our team: https://lexfridman.com/hiring
Other - other ways to get in touch: https://lexfridman.com/contact

EPISODE LINKS:
ThePrimeagen's X: https://twitter.com/ThePrimeagen
ThePrimeagen's YouTube: https://youtube.com/ThePrimeTimeagen
ThePrimeagen's Twitch: https://twitch.tv/ThePrimeagen
ThePrimeagen's GitHub: https://github.com/theprimeagen
ThePrimeagen's TikTok: https://tiktok.com/@theprimeagen
ThePrimeagen's Coffee: https://www.terminal.shop/

SPONSORS:
To support this podcast, check out our sponsors & get discounts:
Invideo AI: AI video generator.
Go to https://lexfridman.com/s/invideoai-cv8595-sa
Shopify: Sell stuff online.
Go to https://lexfridman.com/s/shopify-cv8595-sa
NetSuite: Business management software.
Go to https://lexfridman.com/s/netsuite-cv8595-sa
BetterHelp: Online therapy and counseling.
Go to https://lexfridman.com/s/betterhelp-cv8595-sa
AG1: All-in-one daily nutrition drinks.
Go to https://lexfridman.com/s/ag1-cv8595-sa

PODCAST LINKS:
- Podcast Website: https://lexfridman.com/podcast
- Apple Podcasts: https://apple.co/2lwqZIr
- Spotify: https://spoti.fi/2nEwCF8
- RSS: https://lexfridman.com/feed/podcast/
- Podcast Playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4
- Clips Channel: https://www.youtube.com/lexclips

SOCIAL LINKS:
- X: https://x.com/lexfridman
- Instagram: https://instagram.com/lexfridman
- TikTok: https://tiktok.com/@lexfridman
- LinkedIn: https://linkedin.com/in/lexfridman
- Facebook: https://facebook.com/lexfridman
- Patreon: https://patreon.com/lexfridman
- Telegram: https://t.me/lexfridman
- Reddit: https://reddit.com/r/lexfridman

@gobdovan

Prime explains Rust: 4 minutes video
Prime explains Neovim: 26 minutes video
LOL

@richardgeddes630

The Prime was unusually well behaved!

@RenatoRaeffrayBarbosa

What's cool about rust in a nutshell: it has a great compiler that points you what's you're doing wrong and gives great tools to fix or workaround it. those are points that really stands out

@sivan_j

You have to suffer in C to appreciate Rust.

@joebulfer

Learn C or C++ first, then learn why Rust was created, only then decide if it is the language for you or your team.

@oconnor663

> This prevents common programming errors like null pointer dereferencing and memory leaks. 

Two things that the borrow checker does not prevent! Null pointer dereferencing is prevented by mostly just not letting you create them (enum layout optimizations aside). And memory leaks are actually legal in safe Rust, though they're not easy to do accidentally.

Better examples of things the borrow checker prevents are dangling pointers and data races.

@ratpacked99

I'm excited for prime to dive into Jai metaprogramming, it's metaprogramming is in a whole another dimension. There's no limits to what it can do, you can literally run a full game at compile time. And just like Zig, it's just regular code, there's no special metaprogramming language.

@Pharzaud

on memory protection, umm, how about using cpp containers like vectors? they auto-delete the memory they hold when they go out of scope. also, on mutability, I mark everything that must be const in c++ const. and I hate it when people don't do that. rust just does it the other way around.
anything else sir?

@deeplearningexplained

I love it when obviously talented technical people refuse to talk about or give strong opinion on a topic they aren't familiar.

@christianm4906

He doesn't program in Rust anymore.

@gzoechi

3:35 Calculating prime numbers at compilation time is done with const in Rust, not with macros. Macros are for code generation. Does Zig comptime also generate code?

@NighthunterNyx

Proc macros are done in pure rust modulo some annotations and requirement to use own crate.

@CruxDiaries

Erm, c++ had const, variables allocated on stack by default (where appropriate) and Turing-complete template-based metaprogrammming for years. So looks like we can dump rust and zig? Maybe there is more to both than what Primegen highlighted.

@johanngambolputty5351

Calling macro syntax its own language is a bit overblown, its much more limited in scope, you're not learning two languages, you're learning like 1.025 languages, less if you are already familiar with something like regex (basically just specifying capture groups for repeated arguments). Safety is nice for ease of maintainability, but people really don't talk about the tooling and helpful error messages enough, for me they're a bigger deal.

@MeanwhileLauraPalmer

All I know is that people over the age of 40 despise Rust. Especially those who love C.

@uoweme5grand

I did not watch the whole interview yet but does Lex also give Prime an opportunity to rant about async in rust lol

@hagaiak

Resource Acquisition Is Initialization (RAII), or a more sane name like Scope-Based Resource Management was already available in C++, which Rust adopted.

Of course Rust does many things much better, but it's worth mentioning the credit still goes to C++ for this one.

@SalmanKhan-ze3zh

constexpr and consteval. Using them in C++ you can also calculate prime numbers at compile time.

@mukunda9g

linking with C/C++ libraries is a pain. More pain when you do cross platform development for a embedded systems. It's too much pain for too little gain.