100 Seconds of Rust | Prime Reacts
Вставка
- Опубліковано 12 тра 2024
- 100 seconds of RUST by non other than the GOAT himself, Fireship!
GO SUB!!
/ @fireship
Recorded live on twitch, GET IN
/ theprimeagen
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord - Наука та технологія
100 seconds of Rust by non other than the GOAT himself, Fireship!
GO SUB!!
www.youtube.com/@fireship
He is the bestest
Totally agree, and he makes it fun
dude kick his ass for using windows
I'd dare to say he's the bestesterest
3:21 never understood the "Hello world" thing. I swear I struggled learning coding because I didn't understand what people meant by "Hello world" and why would every damn developer in the world use the same damn sentence. Please do like Jeff and use "Hi mom!" which makes more sense. Thank you! Btw, still waiting for the LegalEagle to weigh in on the Rust copyright bomb.
Jeff is the best, never miss a video!
100 second video in 10 minutes
Need that Memeagen time :)
If your not first your last
Time... doesn't fly?
People. Let the Primeagen get paid.
I contribute for this content.
So STFU.
It's metric minutes
Pretending not to know how to spell Phoebe so you don't risk entering the letter 'P' into the address bar first. 200 play right there.
Lol I thought he quit that stuff
@@xmvziron real addiction is not black and white
@@BusinessWolf1 I didn't say anything about that, I just thought he quit that stuff since he talked about it in the past
We don't talk about the photography phase
Excuse me, what search do you use for pron? @@jonasjonaitis8571
It's hard to overstate how much I appreciate cargo, having worked with St. Dennis Ritchie's blessed language and Bjarne Stroustrup's monstrosity for years. Having a single, unified build tool and package manager (that the entire community actually uses) had me thinking that there had to be a catch.
the exact same from me. its so incredible its hard to state how good it is
Abso-f'in-lutely. Not only is it the default tool for managing and building Rust projects, it is also very well made, even for manual build scripts. And the fact that you can easily extend it with user-land modules is the cherry on top.
I've always dreaded having to install 10 different tools in order to configure, setup a project, targets and build pipelines when working with C and C++ code. Not to mention having to read, understand and modify someone's special syntax in each of those DSLs.
I think Rust could be a shitty language and cargo would still make it worth using.
As a Android/Kotlin developer, it makes me incredibly jealous. I adore Kotlin, and gradle is okay, but I really wish we had a native build tool.
Same with go
This guy is like Bill Burr , if Bill did Software engineering instead of standup routines.
He's got a similar sounding voice. I need to hear him shouting "LADY!" while moving away from the mic
His Dr. Disrespect of software engineering.
All I see is Doctor Disrespect as a 10x developer.
Bro managed to make a 10 min video out of a 2 min vid lmao.
This... Is a skill
@@ThePrimeTimeagen An admirable one, but only because ur fun to listen to.
the amazing thing was that it felt like only 2 minutes
Create Content
Any streamer worth their mettle does that, although it takes true skill to reach the Asmongold level of milking a video for content.
Making something 'mut' does not automatically put it on the heap. In the example "let mut hello = "hi mom"; the string literal would be stored in the data segment of the binary and the size of the reference to it (hello) is known at compile time and can be stored on the stack.
I don't think anybody claimed it would be allocated on the heap?
@@frydac ua-cam.com/video/APfS3vgV9pU/v-deo.html > "However, *mutable values* or objects with an unknown size at compile time are stored in the heap memory."
ua-cam.com/video/5C_HPTJg5ek/v-deo.html - Original video, and people in the comments point out that the statement is incorrect.
Yep, the compiler is smart enough to know that
Fireship uses windows a lot for video editing. I firmly believe he has like 10 computers at this point
Cant stop laughing with the Windows expose moment LOLLLLL
But he makes the Windows people scared. 😂 I hopes keeps a sharp eye at the unsubscribe count. 🤣
Actually I noticed Rust on Windows is pretty cool too! I started learning it on Arch Linux by the way, but on the Windows side there's a lot going as well, like the windows-rs projects that basically makes all old API stuff available to the programming language for which people formerly needed Visual C++.
I really don't expect see Rust replace any DotNet stuff, but all the native stuff has definitely a serious chance. Would be great to see Rust and C# both dominate the future on the operating system.
As far as C goes - since it was among the first languages I learned, the memory allocation just felt relatively natural... You just learn how to manage memory.
Yeah problem arise when you have huge projects and not necessarily precise folks working on it. 😅
I wish C was the first language I learned. I started with Java, from there memory allocation was a bit hard to understand when you've been coding with a garbage collector for almost a year.
@@loicmenard9006 So much relatable
i freaking love your channel man; grounded and just human; love you man, keep it up
Nah you shouldn't look it as just free and malloc. It's really that everything on the heap is tied to a stack variable, so the heap just falls off the stack like stack variables in C. How you keep it alive is returning the stack variables (part of the reason it's so darn functional despite being system lang).
yeah, this is a "more" correct view of it, which makes it super dooper, but its all about how much lying you do to learn. you start off by learning with max lies, then you slowly peel the onion
Technically a lot can be compared to C++ and not just C. For everything that uses the heap, the Drop trait is implemented in Rust. This compares a lot to C++ classes and their destructors. It's basically the RAII code pattern, a concept also used by smart pointers, which both languages know as well.
The idea is that you hang the memory management of the heap behind a stack based connection of a variable, which internally frees itself by going out of scope.
In C++ you can also directly use new and delete, or even the good old malloc and free, and you can do tons of things wrong, even worse than in C, but as a good habit you follow the above the above code pattern as much as possible to avoid most problems.
2:30 one thing that seriously impressed me about manual memory management with free and malloc is just how many useful things can be done with destructors as you can predict exactly when they will be called and in which order.
...which also has the side effect of encouraging some programmers to put things there just because they could, even though they absolutely shouldn't.
A lot of profesional C devs who think they know C, know relatively little of the actual language.
I’ve met people who have been working as C devs for a decade, and have not read the C standard. They had no idea of what UB was, and a lot of times they’d blame the compiler for being buggy, when they’re the ones writing incorrect C and turning up optimizations hard.
Heck, the people writing the standards are still learning how a lot of stuff works, things like pointer provenance are still in active development on C.
I just recently learned that in C++, an infinite loop with no side effects is UB... like what?
@@anlumo1 makes sense, optimizer will likely get confused
@@anlumo1 it’s so the compiler can optimisé the code. It makes perfect sense.
I’ve read the C99 standard as it was necessary to be able to do my job at the time (devops) but when other engineers find out that I’ve read it, they treat me like a lunatic with deviant interests. It’s really not that long.
@@anlumo1 I have just checked this, and I still can't belive it.
Such a weird optimization
Fireship is deeply missed... My thoughts and prayers go out to him atm with the loss he's dealing with
what happened
Wel fireship is a faceless AI so idk how you could pull this off.
"However, mutable values, objects with an unknown size at compile time are stored in the heap memory"
Incredible, every word of what you just said, was wrong
Correct
Now that you say that out loud... The unknown size part is correct, you have to make it known via a box
@@ThePrimeTimeagen I would be terrible for performance if all mutable variables were heap allocated lol
@@ThePrimeTimeagen I mean, there are instances of objects with unknown size at comptime, but the only example I can think of are trait objects, which is a fairly advanced topic. Neither mutability nor general heap allocation implies unknown sizes.
@@ccgarciab slice
@@dyslexicsteak897 you're right, but that's a counterexample. A slice doesn't need to be boxed or heap allocated
Wait a minute. malloc and free are far from simple to work with. Sure in the simple case that you malloc at the top of a short scope, do something with it then free it at the end of the scope it's easy to see what is going on. But:
1)When malloced objects are passed into or returned from functions it is not clear who is responsible for freeing them. That needs to be documented and the documentation needs to be read.
2) When malloced objects can live on outside the scope in which they are created and then perhaps passed around to other parts of the program it can be difficult to keep track of who is responsible for freeing them. Leading to memory leaks.
3) Like 2) but with threads thrown into the mix.
But this is all tied up with use of pointers...
1) Perhaps one forgets to malloc an object, perhaps thinking it was done elsewhere in the program, then we have dereferencing a null or uninitialised pointer.
2) Perhaps one forgets an object has been freed, then we have use after free errors.
One has to do a lot of bookkeeping, busy work, to keep track of all this in ones head. Or worse still the heads of a large team. Rust of course does all that tedious checking for you. What is not to like about that?
Thanks. Gonna use this when I return to writing some C code 🙂
We need a "primagen in 100 seconds"
this would be awesome lol
Yes but 10 minutes long
too long
And then have primeagen react to it.
I'm a Go engineer who's been trying to learn Rust as of a couple of days ago. I feel like even if I don't ever work in Rust, it should at least make me a better developer.
So how's this going?
How's this going?
Hey guys. my work has been really busy so I haven't really spent much more time on it. I bought two books on Amazon and have a project I've been working on to help me learn Rust. Maybe this next weekend I'll put some more hours in. I do have to say, I really like Rust but Go still is my "Go"to... heh and I'm hoping at some point to change that.
Appreciate both of you. It's something that should sound like "mute". Well-crafted introduction.
Nit only is fireship on windows, he also used the vs code built-in terminal in his vim in 100 seconds video
Fireship can explain the reason behind his statements so well
Once you start doing UA-cam, you understand how hard it is what you and fireship do.
It's unbelievably hard to communicate clearly and to explain to everyone in an easy manner.
"High Level Simplicity" lmao
that box art is just, muaww *chefs kiss*
more prime react please, there is a ton great dev content out there
I love it !!! haha .. "why ya gotta do us like this Fireship? Not Winndowws! "
At 1:00 the code is fine but he makes a mistake by saying mutable values need to be on the heap
8:54 Just so you know, he has stated he was/is on a dual-boot computer during his wsl video.
writing a berkley socket, non blocking etc.. in C yeah it is involved.. ONCE. then you have you network module and it just works. same for associative array. I have my hash module that provide half a dozen of variants, which covers all usual and unusual cases. People keep talking about C as if you had to start from scratch every time
the windows exposed caught me soo offguard hahah i laughed the shit out of me
I didn't even realize there were people who called mut "Mutt" I always pronounced as "Mewt".
I think he uses Windows for content creation. (Adobe suite)
I'm so glad my "hello world" main.exe can handle the most performance intensive system requirements.
5:25 it's google's dark theme vk dr's theme; and dark reader now has "use site theme" option
Maybe invite Jeff Delaney (Fireship) on your stream? Would be amazing!
I think the dark reader bug has something to with your os or browser color scheme, try switching off or just setting it to any color scheme. Then try switching it in dark reader.
8:45 main.exe in project root
meanwhile target: exists
fireship is amazing
2:15 I use C++ so I am familiar with new and delete, I have no problem with these functions after many years of trying, and learning, I kind of figure it out how to write very stable code that can run for decades.
is there a clip of the ‘one more’ fireship vid at the end??
Love the way you hype the people being reviewed and watch their ads rather than just leeching off them.
Rust really only works if you understand how the lower level C stuff.
Like, I find it easier to understand borrow checker errors by asking myself “How would I implement this in assembly?”
7:07 oooo Molly Rocket.
Will you upload the clip of you watching that video?
one is queued up!
@@ThePrimeTimeagen I ended up just watching it directly from the Twitch stream.
Will you be reacting to past 2 also?
Honestly its so true that Fireship is just like... the best tech utuber. friggin amazing
Fireship is a fire channel, thanks for appreciating it, that makes you firesome!!!
Hihi. That Windows bit cracked me up good. 🤣
Cordyceps bro.
The fungus from the last of us is ophiocordyceps unilateralis that spilled over to humans.
So, mut and mutt…. Do you pronounce char as ch-are or care?
The name is thehypocriteagen
@@ThePrimeTimeagen Well, atleast you’re also TheHonestagen o7
bro there are psychos that say char as in "charred"
I just pronounce it shaar
char is obviously derived from tsarakter.
I work with a guy like this, while presenting he continuously nods his head to show that he's pleased with your message, then you say the smallest thing that displeases him and he explodes into a 5 minute rant about the dumbest shit you could imagine. For example, the pronunciation of "mut". 😂
The biggest advantage and hurdle of Rust in my opinion.
Advantage: Cargo exists.... and is already way better than python's PIP in my opinion. Like you need to manually create a virtual enviroment for your python projects and initialize it every time you work on it, meanwhile in Rust, all you need to do is type cargo new (Project name) and boom, you have a project folder with a virtual enviroment to which you can install the crates, AND a local repository all set up kinda automatically. (Also I never had any problems with cargo, but I did have a few with PIP)
Disadvantage: Well, I know this is a beginner issue, and I am a beginner, so I'm sorry for this vent but LOOK AT THE INSANE AMOUNT OF SYNTAX THIS LANGUAGE HAVE, NOTHING MAKES SENSE WHAT THE HELL IS A LIFETIME? WHAT IS REALITY? WHAT IS GOING ON? (Still better than JavaScript tho, judging by my small experience with it, at least when I declare a float 32, I know it will always quack like a float freaking 32, and that the language won't try to add a string number to a float number.)
Yeah pip is really awful.
Even JS has a better environment/package management experience than pip/poetry/etc
The syntax is actually very good and compact once you learn more, like Option's "and_then", "map", if let, let else, etc.
its just super explicit about everything. Makes code longer but it's really easy to debug
I mean for JavaScript, that's why we have TypeScript, so we don't all die by "3" + 3 = "33"
lifetimes are only hard until you learn more. It is a quit moment. The only way to learn why they exist is to learn why they exist. It is painful. It is development.
Every reaction video ending with having to prove you’re subscribed on your main channel
yes the photo will break the internet I will love it tow of my fav in one frame ❤❤
windows is love
windows is life
mut or mutt, Rust still makes it harder to shoot yourself in the FUTT
sending this video to the rust foundation, DOING MY PART
i learned C way back in late 2000s in high school and from what i remember you initialize everything at the start. which makes more sense to me in terms of organizing a document. like python i can use i for iterations an infinite amount of times as long as it's in a different loop but i can also write the same program structured 1000 different ways while C might only have a few reflections that'd work
Bruh Fireship has been on windows WSL. LOL You can tell from the cursor from his vids.
Javascript [with jsdoc and nuxt/next/sveltekit frameworks] (web frontend)
Rust (web api, system, performance critical applications)
C++ [with unreal engine or godot] (game)
C++ (if project depends heavily on openCV or tensorflow)
PHP [with laravel] (web backend, web api)
Python (data science, ai)
Go (web api, system)
Dart [with flutter] (mobile)
how does his "var does not need to be mutable" show up next to the var line
Primagen: "Who uses rustc"
Me who's only used Rust for a few months: "Right? I literally only used rustc once in my life, Cargo is always a lot more practical."
What OS and/or distro are you using?
Perfect choice of meme
It's "mute" and it's not any other way
rust fungus? so leptos is the only crate following the correct naming convention.
I 1000% agree and it should be considered a crime. #StopCallingItMutt
pro tip for future streams, press K for play/pause a video :P
hey guys i am a java developer and i want to learn rust which books do you guys recommend.
Also what can we build using rust like rest APIs? microservices?
you can build anything in rust
watching this now and wondering what a "twitter" is.
The Rustiest box art!
Way back when I had a debate with friends on why the fuck isn’t Potes not short for Potions but instead its pots. No one had my back… 😔
Normal people:
Char: Care
Mut: Mute
Gif: GIFt
People who have no business in tech:
Char: CHARcoal
Mut: Mutt
Gif: JIF
Stop it... get some help.
Gif was stated to be pronounced like jiffy by its inventor, and its a different case than just shortening a word
DUDE! What's that colorscheme? 2nd time asking 😤😘
rose-pine
@@ThePrimeTimeagen muchas thank you 🫶
4:15 but somehow e-nums aren't enooms?
bro really is the hasanabi of programming
moot, not mute, not a mutt. "Rust. Because F#@_&$# Malloc."
tbf fireship was always on windows, we saw this many times already
My man watching Casey Muratori
2:30, C++ has this automated since ever.
9:20 he's not on windows, he just knows lots of people still program on windows
8:35 This is hilarious, knowing he streams on windows
i dont get what happened exactly there
@@mohamadsawan4070 just that he’s calling out fireship for using windows … which he also uses … I guess it’s not really *hilarious*
8:35 this is a huge drama!
CHARACTERISTIC --> CAR - ASTERITIC
CHARACTER --> CAR - ACTER
CHAR --> CHAR
Please break the internet. We need that photo.
0:20 i appreciate my man✌
Selfie with fireship... Do eet!
You are surprised by the operating system he uses?
Just wait till you see his terminal emulator, it's something you wouldn't even guess
how would u use adobe software without windows ?
Fireship you were the chosen one, you were that's supposed to destroy Microsoft not join them!! lol
It drives him "muts!"
We wanna Circle and Val 🎉 up top
It's "mute".
fire ❤🔥
I was not expecting to be in this video
Go windows! 😂
mutt and feebee :D golden!
concerning .exe , imagine Arch Gnome or Hackintosh runs on a monster workstation!
With an Australian accent, "mut" just feels weird rolling off the tongue.
main.exe xD
can you believe this.... MAIN.EXE???