6:48 “I don’t know exactly what 255 divided by 10 is” 😭
@luigi-fan5542 жыл бұрын
I wonder what 255 divided by 10 is, hmm, tricky question
@TheSpartacusS2 жыл бұрын
I laughed too hard at this :D
@jasongracae17802 жыл бұрын
I paused the video, exited full screen and scrolled down to the comments to type the exact same thing. 😒
@eineatombombe2 жыл бұрын
this guy is here being a software engineer and teaching us rust while not knowing what's 255/10
@bravobessa36842 жыл бұрын
😀
@m-zurowski2 жыл бұрын
jokes aside - some ppl at third year of mechanical engineering at my university need to use a calculator for exactly that sort of 'arithmetics' XD
@philaskytech2 жыл бұрын
Be easy on yourself, I like seeing the little mistakes; helps us all learn. These tutorials are amazing, and you are clearly very good at teaching and understanding CS. Thanks TIm!
@lazerpie101 Жыл бұрын
A couple notes: integer division in Rust will always round down using the unwrap_or({backup_value}) instead of just unwrap() will prevent runtime errors
@unicorn_tamer2 жыл бұрын
I can finally watch another coding video on my two monitors after almost 2 years!
@jasongracae17802 жыл бұрын
Python: int_input = int(input1) Rust: let int_input: i64 = input.trim().parse().unwrap(); Tim: We can now just print it!
@Eva-tf5ud2 жыл бұрын
This rust line does nothing without input variable (let mut input = String::new(); io::stdin().read_line(&mut input).expect(" ");) this should also be included
@someshvemula99662 жыл бұрын
As always, liked your video even before watching it.
@TechWithTim2 жыл бұрын
MVP
@tama34422 жыл бұрын
*What is the Gospel?* The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ. Ephesians 2:8-9 For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast. Romans 10:9 9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved. JESUS CHRIST can come anytime! REPENT OF YOUR SINS Just Believe ❤️ Love you and GOD BLESS
@therealworldlibrary2 жыл бұрын
@@tama3442 yeah no I don't give a damn
@michaelsciortino3385 Жыл бұрын
Damn I can bbq a whole cow with all the roasting going on in the comments here about 255/10
@gjermundification10 ай бұрын
13:26 This is most likely the smallest number allowed by i32 as fo i8::Max + 1 = -128
@introspecticon2 жыл бұрын
I'm surprised the compiler didn't catch the i32::MAX + 1 overflow. Wonder if that's intentional or an oversight
@DuskyDaily2 жыл бұрын
It's not actually i32::MAX + 1, but it's (i32:MAX as i64) + 1. I mean i64 can store i32:MAX + 1. So overflow occurred when it tried to convert it back to i32 at line 5. I guess, that's how it works.
@jasongracae17802 жыл бұрын
Tim: "So that's all really all I want to show in the video". Wow so short!
@playniuniu2 жыл бұрын
Thanks so much for this tutorial.
@lukeh70522 жыл бұрын
When printing an f64, why doesn't the floating part appear even though it is required in rust to be an f64? Same applies to f32.
@jasongracae17802 жыл бұрын
Isn't that 'INVISIBLE CHARACTER'🧙🏻♂ just a ? Or there is some other thing too?
@sirbackenbart5 ай бұрын
Yes, it is a . trim only removes "whitespaces" (prefixed & suffixed) which are defined to also include linebreaks.
@codeandtalk62 жыл бұрын
Waiting for this video
@camilo1u2b2 жыл бұрын
Prove that you don't need to be good at math to be a great programmer. what 255/10 is? min: 6:45
@gabehcuodsuoitneterp2032 жыл бұрын
What is casting with the underscore and without the keyword 'as' really doing?
@m-zurowski2 жыл бұрын
@6:51 - my brain starts singing USA's anthem
@djemi3etelminigeekandhacke34311 күн бұрын
The errors you presented in rust such as overflow or adding data of two different types, why these kind of errors are not reported in C such as adding long int with short int, or adding unsigned int with signed int ?
@marcotroster82472 жыл бұрын
Haha this kind of pedantic errors seems very familiar. It's about the same as compiling C89 with ansi pedantic and Wall Werror. Happy coding 😂
@subee1282 жыл бұрын
Thanks
@patricklittle10022 жыл бұрын
So literally, the compiler complains when doing normal overflow math and doesn't automatically promote, but runs just fine without warnings when that's the only time I would expect this strong language to catch something?
@stas41122 жыл бұрын
Im honestly surprised by the many ways that you can declare the casting of a literal. I usually don't like when languages have many ways to do one thing, and I thought rust was one of those anal languages that makes everyone better by having no alternatives
@maker._6 ай бұрын
I wonder why, if x and y were f64 and they enforce the need for decimal, why was x * y not 2550.0? 🤔
@sephalopod2 жыл бұрын
How did his "println!" work there was no semicolon
@rami_atallah2 жыл бұрын
Because it is the last thing to run. Think the semicolon in rust is same as the use of semicolon in css. (Ps: If i am wrong someone correct me)
@erfer9812 жыл бұрын
when we return something (in the last line or in a function) we dont need to type a ';' if you want to type a ';' then you can use the return keyword
@johnbennett14652 жыл бұрын
If Rust caught overflow at runtime then being so picky about types could make sense. Without that, it does nothing but annoy the programmer. C implemented a mostly reasonable set of automatic conversions for numbers half a century ago. I can see reasons for tweaking the exact rules, but no reason to not automatically do safe conversions.
@dynfoxx2 жыл бұрын
It does catch overflow in debug mode. While i agree with you its not that much harder to get conversions by just adding .into() . Rust wants to be clear that there is a conversion happening.
@tudormurariu80162 жыл бұрын
Is this assembly? :))))
@kevinwalters28875 ай бұрын
I have a feeling they named it 'rust' is bc it's the reheaded step-child you gotta tell it everything! lol
@jasongracae17802 жыл бұрын
9:10 Why would I want that?
@maxovicsteiner96462 жыл бұрын
255/10 💀
@holonaut2 жыл бұрын
it's 25 and then something, not gonna calculate the exact value
@maxovicsteiner96462 жыл бұрын
@@holonaut someone didn't go to primary school
@unixwastaken2 жыл бұрын
@@holonaut bruh for dividing by 10 you just move over the period to the left one time💀
@tag_of_frank2 жыл бұрын
need more explanation of parse + unwrap why is that needed don't get it
@pravachanpatra40122 жыл бұрын
Can you collab with tiff in tech
@mrpancakes2 жыл бұрын
255 divided by 10 is 25.5 lol
@tama34422 жыл бұрын
*What is the Gospel?* The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ. Ephesians 2:8-9 For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast. Romans 10:9 9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved. JESUS CHRIST can come anytime! REPENT OF YOUR SINS Just Believe ❤️ Love you and GOD BLESS
@murphygreen84842 жыл бұрын
*255 divided by 10 is 25.5. If you can make an easy mistake pointing this out I think we can let him make a mistake while trying to talk on camera 😉
@michealhall77762 жыл бұрын
You probably just googled that
@mrpancakes2 жыл бұрын
@@murphygreen8484 hahahahaha, watcha talkin about 😁
@kirbofn5249 ай бұрын
I think that not being able to devide 20 / 2 just because 20 is a i8 and 2 is a u8 is stupid. I get safety and all of that but still. That is stupid
@CallousCoder2 жыл бұрын
Millenials and math 😂“I don’t know what 255 divided by 10 is but is 25 point something”. I was sitting It’s 25.5! .5!!! .5!!! 😅 Or perhaps it’s because he’s American and doesn’t use decimal system and therefore didn’t see it right away. Because in decimal system you just shift the comma. Anyways I find maths in Rust very unwieldy and you get very verbose formulas. Yesterday (hence I watched this video) I created a sine table creator for some Amiga demos I’m working on in Rust. And I was amazed that I couldn’t add an int to a float because in C that’s no problem not even with warnings all in. So I kept type casting looking at my formulas and was like: “this became utterly unreadable! Is there a better way?n And ended up here.
@doropomegranate2 жыл бұрын
I miss javascript
@MountainLabsYT3 ай бұрын
255 / 10 = 25.5
@genericbinary5586 ай бұрын
I am ben tennision.
@bifidoc Жыл бұрын
this: ```rust fn main() { let x:u8=128; let z:u8=64; let y:u8=x+z+z; println!("{y}"); } ``` overflows in runtime 🤦♂
@ryan801662 жыл бұрын
finasteride and minoxidil
@ЗубайрРахимов-щ7ы2 жыл бұрын
hi Tim How old are u ? i sad my teacher that u r 19 and he replies me "FALSE"
@Hacker0972 жыл бұрын
Rust really leaves no room for ambiguity
@tama34422 жыл бұрын
*What is the Gospel?* The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ. Ephesians 2:8-9 For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast. Romans 10:9 9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved. JESUS CHRIST can come anytime! REPENT OF YOUR SINS Just Believe ❤️ Love you and GOD BLESS
@NorteXGame2 жыл бұрын
And that, in my opinion, is good. It leaves you with opinionated code, which everyone can easily read.
@webpapi11 ай бұрын
python is far simpler w/less code :/
@unitazer6 ай бұрын
My brother in christ, python is a dynamic language, which means that it gets compiled into bytocode while being executed, which makes it EXTREMELY slow. This is basically c++ if it wasnt c--
@Xylys2 жыл бұрын
how do you not know what 255 / 10 lol
@tama34422 жыл бұрын
*What is the Gospel?* The true gospel is the good news that God saves sinners. Man is by nature sinful and separated from God with no hope of remedying that situation. But God, by His power, provided the means of man’s redemption in the death, burial, and resurrection of the Savior, Jesus Christ. Ephesians 2:8-9 For it is by grace you have been saved through faith. And this is not your own doing; it is the gift of GOD, not a result of works, so that no one may boast. Romans 10:9 9 because, if you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved. JESUS CHRIST can come anytime! REPENT OF YOUR SINS Just Believe ❤️ Love you and GOD BLESS
@dyspatch85742 жыл бұрын
Are you Catholic or Orthodox?
@ohwow20742 жыл бұрын
Stop this $hit please
@dyspatch85742 жыл бұрын
@@ohwow2074 I know it's shit, I hate religion, but I asked this bot just to see if it's even responding to such comments.
@JakkeJakobsen2 жыл бұрын
Oh my fucking God, please stop.
@scottb4029 Жыл бұрын
God is Love. There is not fear in perfect love. 2nd Peter I believe or 2nd John.