Rust makes cents

  Переглядів 111,659

No Boilerplate

No Boilerplate

Рік тому

Today I'm going to explain a feature of Rust that doesn't get a lot of attention.
If you would like to support what I do, I have set up a patreon here: / noboilerplate Thank you!
All my videos are built in compile-checked markdown, transcript sourcecode available here github.com/0atman/noboilerplate this is also where you'll find links to everything mentioned.
Corrections are in the pinned ERRATA comment.
Start your Rust journey here: doc.rust-lang.org/stable/book/
CREDITS & PROMO
My name is Tris Oaten and I produce fast, technical videos.
Follow me here / 0atman
Website for the show: noboilerplate.org
Come chat to me on my discord server: / discord
If you like sci-fi, I also produce a hopepunk podcast narrated by a little AI, videos written in Rust! www.lostterminal.com
If urban fantasy is more your thing, I also produce a podcast of wonderful modern folktales www.modemprometheus.com
Special thanks to my patreon sponsors:
- Affax
- JC Andrever-Wright
And to all my patrons!

КОМЕНТАРІ: 502
@NoBoilerplate
@NoBoilerplate Рік тому
ERRATA Tauri hasn't yet release mobile app bundling, though its in their roadmap. Desktop only for now! 2:31 Though the "80%" header is right, the table below is only for 128MB lambdas 4:53 The heading reads "Hander" instead of "Handler"
@redcrafterlppa303
@redcrafterlppa303 Рік тому
Then for now we will just write it in wasm and use a webapp infrastructure. Rust has always a way ; )
@FinaISpartan
@FinaISpartan Рік тому
We do have Rust in our kernels now too.
@AceofSpades5757
@AceofSpades5757 Рік тому
Can't wait. Really wanted to check out Rust's mobile feasibility, but couldn't find anything particularly easy to get the feet wet.
@rumplstiltztinkerstein
@rumplstiltztinkerstein Рік тому
Plus we can write Python dynamic libraries in Rust using PyO3
@DJenriqez
@DJenriqez Рік тому
yeah, I'm really waiting for it because it will cover all my project needs with it (windows, android, linux, ios, macintosh, oculus quest (I hope)).
@DoomKaiserGliders
@DoomKaiserGliders Рік тому
"oxidizing your entire stack" what a great line, cheers
@NoBoilerplate
@NoBoilerplate Рік тому
Here's another, if you've not heard of it: Rust is named so because it's close to the metal!
@EdissonReinozo
@EdissonReinozo Рік тому
This is becoming a must watch channel. I don't even read the title anymore. I know it is my reliable rust content.
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you! Keep checking the ERRATA comment to make sure it's actually accurate!
@wihma97a
@wihma97a Рік тому
Completely agree. Started watching just a couple of weeks ago and now I click as fast as I can when I see a new video
@Kiaulen
@Kiaulen Рік тому
Same, this channel is always amazing
@BikramKumar-uy8nl
@BikramKumar-uy8nl Рік тому
@@NoBoilerplate The fact that you mention this also makes you worth the praise. Thank you for the content.
@PandaNuker
@PandaNuker Рік тому
oui
@tuskiomisham
@tuskiomisham Рік тому
I read that energy efficiency paper. The reason Java is so high up is because they used Java to execute the power analysis function, and instead of launching the program externally like they did for literally every other language, they just ran the Java program inside the same VM, cutting corners significantly.
@NoBoilerplate
@NoBoilerplate Рік тому
Rude!
@tuskiomisham
@tuskiomisham Рік тому
@@NoBoilerplate indeed, but so is academically misleading many people
@NoBoilerplate
@NoBoilerplate Рік тому
@@tuskiomisham oh I'm so sorry, I meant that them misleading people is rude, not you!
@pixelsam123
@pixelsam123 Рік тому
Public static void main string args amirite
@natew4724
@natew4724 11 місяців тому
@@pixelsam123 say it again, public static void main string args also you forgot the class
@foobar3770
@foobar3770 Рік тому
These videos convinced me to write my latest project in rust. At first I thought the project was too big, too many states to model and too many breaking changes. But having written something once, it never broke. Whenever I added a new thing, I first extended the valid states by changing the type of a variable from String to a parsed struct - and the compiler told me where I had to fix stuff. When there were no more compiler errors, I was done. It's fun to write code like this.
@NoBoilerplate
@NoBoilerplate Рік тому
"When there were no more compiler errors, I was done." this is my experience every time I write Rust too! Isn't it relaxing!
@keashavnair3607
@keashavnair3607 Рік тому
Can you please explain what do you mean by “added a new thing”. It’s so hard to understand what you are working on.
@guigazalu
@guigazalu Рік тому
Oh! The same for me! I rewrote an old project that never leaves my mind, and now it works at a decent speed and memory usage, while doing what I want it to do. It was strange at first, seeing errors and warns I didn't even know the meaning, but with time (just 2 days), once there were no more errors, it was beautiful (actually, as it's image processing, and I have a bad taste, it was ugly, but conceptually working)!
@enque01
@enque01 Рік тому
The production quality of this is so high. The message is a complex thing made simple, using rudimentary graphics done well, overlaid with a voice that is so pleasant this guy should voice audiobooks. Very much appreciate the level of quality in this!
@NoBoilerplate
@NoBoilerplate Рік тому
You're too kind! I honed my production skills on a hopepunk, scifi podcast, and I'd love to know what you think! ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@laundmo
@laundmo Рік тому
i mean, he does a fiction podcast, so audiobooks kinda. it's also really good
@raymanovich3254
@raymanovich3254 Рік тому
@@NoBoilerplate I always wondered why you opted for calling it a podcast.
@NoBoilerplate
@NoBoilerplate Рік тому
@@raymanovich3254 what, Lost Terminal? Isn't it a podcast?
@iippari7
@iippari7 Рік тому
@@NoBoilerplate It is - but the meaning of _podcast_ has been lost over time - I certainly found it surprising that a podcast meant _any_ digitally distributed programme, and did not specifically refer to the format of several hosts having a recorded conversation... P.s. Lost Terminal is amazing! It's the first podcast I've listened to in a long time (read: ever) and I love it.
@LukaSauperl
@LukaSauperl Рік тому
That feeling when he says "Hi friends" and for a moment you feel like you actually have a friend ... and then the video ends.
@NoBoilerplate
@NoBoilerplate Рік тому
Plenty of friends on the noboilerplate.org discord :-)
@The88shrimp
@The88shrimp Рік тому
Just program a friend in Rust.
@somedooby
@somedooby Рік тому
Rust is my best friend
@NoBoilerplate
@NoBoilerplate Рік тому
@@somedooby honestly it feels like that when working with the compiler - amazing!
@jameslugenga9454
@jameslugenga9454 Рік тому
will he ever make a video that isn’t amazing probably not
@NoBoilerplate
@NoBoilerplate Рік тому
You're too kind! I'm always improving.
@nicolashumbert8344
@nicolashumbert8344 Рік тому
@@NoBoilerplate This one is right. You seem to just not be able to not be amazing. Your videos are a real source of inspiration for a lot of us.
@voidvenom7452
@voidvenom7452 Рік тому
No, his type system doesn't allow unamazing videos :]
@NoBoilerplate
@NoBoilerplate Рік тому
@@nicolashumbert8344 Thank you so much, I'm so grateful!
@znefas
@znefas Рік тому
@@NoBoilerplate As others have said, the quality of your videos is high, and I feel like that's also part of why you love Rust so much, because you too care about correctness. And with such, you keep your videos correct, which in the context of YT vids would be considered videos that achieve their goals well and nothing else, and since you're teaching us about Rust, you're fast, concise, and to the point with no meaningless detours. This video quality is amazing, and I'm very thankful to have stumbled onto this channel. Thanks for your amazing work!
@the_kovic
@the_kovic Рік тому
You've mentioned execution time and memory usage but there is an area you didn't mention: disk usage. Rust's compiler is a powerful tool that does a lot of checking for you. This takes a lot of time. The first build in Rust takes a long time, easily in the order of minutes. The authors knew this and so, just like C's object files, the compiler produces a lot of artifacts to remember its progress. And this is where the cost of Rust manifests because nothing in the world is ever completely free. Rust consumes a lot of persistent memory on the developer side to power its magic. Even a simple hello world project will take a couple hundred megabytes, real projects easily number in gigabytes of compile-time artifact data. There is a argument to be made that persistent memory is pretty cheap today and that this single-time, developer-side cost of space is a small price to pay for all the good stuff - and I would agree with that. But I felt it necessary to mention it for the sake of completeness.
@NoBoilerplate
@NoBoilerplate Рік тому
Very good take, it's certainly an are that could be optimised more isn't it? Running a Rust CI pipeline is very different to other languages for this particular reason!
@pexoto5093
@pexoto5093 7 місяців тому
wait kovic? the_kovic, the one that made the doom eternal ost remaster? You a rustacean too? life is crazy! cheers m8
@angeldude101
@angeldude101 Рік тому
In exchange for making code fast, you generally have to sacrifice some space to hold the compiled binary. While your code may not get to the size of a shell-script one-liner, Rust has plenty of tools available that let you get down to an absurdly small binary, even forgoing the entire C runtime, while still being confident that things won't break.
@NoBoilerplate
@NoBoilerplate Рік тому
17k on windows, is the record I've seen!
@Heater-v1.0.0
@Heater-v1.0.0 Місяць тому
I'm not sure what you mean by "In exchange for making code fast, you generally have to sacrifice some space to hold the compiled binary." Whilst it is true that sometimes one can optimise a compilation for speed and get a bigger binary as a result or vice-versa, I would say that in general the differences are not very big. More common is things like Java, Javascript, Python where one gets extra memory usage, thanks to the way they maintain variables and use garbage collection and at the same time slow performance, for much the same reasons. That's before we have added on the memory consumed by their run-rime systems/interpreters. Anyway, yes, Rust can produce binaries that are as small and performant as C or C++ can, there are many embedded projects running on micro-controllers to test to that. By the way, what do yo mean "forgoing the entire C runtime, "? C pretty much does not have a run time beyond what is needed to initialise the stack and such before jumping to main(), but even that is not running once your program is started.
@angeldude101
@angeldude101 Місяць тому
@@Heater-v1.0.0 That comment was largely in reference to replacing a shell invocation that took a few dozen bytes with a 2kiB binary (which was optimized for size). And yes, C _does_ have a runtime and Rust by default links to it, and the dynamic linking alone actually increased the size of the binary more than reimplementing the necessary parts myself.
@Heater-v1.0.0
@Heater-v1.0.0 Місяць тому
@@angeldude101 Well certainly it nice to be able to write one line of shell to get some quite complex task done. The comparison with a 2K compiled binary is of little relevance usually. I mean, that line of shell script can be dependent on millions of lines of code, in the shell interpreter, in the commands it is invoking, in the libraries they depend on, in the operating system the whole thing runs on. Perhaps if you wanted to do that same task on a memory constrained system, like a micro-controller, the 2K compiled binary would be the way to go. No, C does not have a run-time. Sure your C code may depend on library functions defined in the standard library. Or it may depend on other libraries. Or it mat depend on syscalls to the operating system. It mat even achieve all that via dynamic linked libraries. Non of that is a language run-time. That is just library dependencies. After all consider the kernel of your operating system, often written in C, there is no language run-time underneath that, it is running on the bare metal. In fact that kernel provides run time facilities that all your applications need. Yeah, I know there is often something called "crt" something or other, as in "C run time" that is typically very small and only initialises the stack, processor registers, static variable, etc before jumping to your main(). It can be as small as a handful of instructions. It's also not running when your C code is. Whilst it is true that Rust links to the standard functions provided by lib C on Linux, Windows, Mac etc, that is not actually necessary to run Rust programs. Many people are using Rust on bare metal systems that have none of that.
@shreyasjejurkar1233
@shreyasjejurkar1233 Рік тому
As Mark (CTO of Azure) correctly tweeted, C/C++ should be declared as retired languages and instead use Rust. Am pretty sure, going forward most of the cloud services and data centre infrastructure code will be written in Rust. Fast, energy efficient and of course cheap!
@NoBoilerplate
@NoBoilerplate Рік тому
All that is required is for people to understand the power that we have today with rust. I'm making progress on that goal 😊
@tayustgemil9285
@tayustgemil9285 Рік тому
Rust is very new to me, and I wonder: Do you use unwrap()s if you are certein that a variable is Some or Ok?
@cylian8422
@cylian8422 Рік тому
Can we get a complete Rust tutorial for begginers? You have an amazing writing style and your voice is very pleasant to listen. I'd love to see a good Rust tutorial series
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you! I did that once, have you seen this ukposts.info/have/v-deo/mqJke3-AiJuWx40.html My focus for the moment is shining a light on all the incredible features of Rust. Once you're excited, The Book is all you need to learn, it's written brilliantly! doc.rust-lang.org/stable/book/
@zakstephens9297
@zakstephens9297 Рік тому
@@NoBoilerplate This is low value and high effort, but the Rust Book with your radio voice would probably come out like a fun bedtime story.
@TheShadowmanInc
@TheShadowmanInc Рік тому
@@zakstephens9297 It's ridiculous to call the rust lang book "low value", meanwhile learning any language is going to be high effort if you want to be fluent in it. The rust lang book is probably the single highest quality resource I've come across learning ANY language, with an imbedded compiler and multiple examples and explanations for every single rust concept.
@zakstephens9297
@zakstephens9297 Рік тому
@@TheShadowmanInc Nah, I mean getting old mate to read it out is low value. The Rust Book is fantastic, I have a copy on my desk right now.
@yasintonge823
@yasintonge823 Рік тому
@@NoBoilerplate The Book is my bible for the past month.. What an amazing doc is that!
@dixaba
@dixaba Рік тому
When I first tried Rust in 2016, I was repelled by its weird syntax and borrow checker - C++ seemed much more familiar. Later (in 2019) I decided to try it once more, maybe write something small and simple. And it clicked. Since then I'm using Rust for all my personal projects. I don't remember last time when my program crashed NOT on my own unwrap(), which is just quick dirty hack to make program compile. But unlike said C++, I know that I can just grep for unwrap()s and replace them with proper error handling, not re-reading whole code 50 times.
@NoBoilerplate
@NoBoilerplate Рік тому
THIS IS EXACTLY IT Rust can panic like other languages, but you can SEE when it's going to. Fantastic!
@defnlife1683
@defnlife1683 Рік тому
“5x faster… If you single thread them.” Vito Corleone “ Look at what they did to my boy.”
@yey0072
@yey0072 Рік тому
You can definitely see the improvements in information quality by the number of items in ERRATA decreasing each video. Keep it up!
@NoBoilerplate
@NoBoilerplate Рік тому
That's the plan!
@piguyalamode164
@piguyalamode164 Рік тому
Another thing about rust that makes it very good for writing code: I often find that if I understand what a struct is, I can very often tell what a method does just by its name and type signature. I can also very often find the method I want quickly by looking through the autogenerated documentation
@NoBoilerplate
@NoBoilerplate Рік тому
This is something you find in Haskell too, rich types are amazing!
@SimGunther
@SimGunther Рік тому
Jean Young's talk on Strange Loop was amazing for bringing attention to system rationality and not just saying "your local program is the only system you ought to be concerned about" knowing there's plenty of tooling for proving local state to not only be correct, but for invalid state to not be representable. Proving that our code can be glued together to talk to other systems correctly would be a huge win in my book for engineers everywhere! :)
@NoBoilerplate
@NoBoilerplate Рік тому
Nice! I'll watch, thank you
@joachimfrank4134
@joachimfrank4134 Рік тому
Some projects use pact for this when the language is JavaScript. It is used to shard type definition, test cases and mock code between systems. Ones systems mock code are the expected values for the test cases of the other system. This shows that a rich type system together with sharing the type definition goes a long way to securing compatibility. Perhaps there's something like pact for rust, which would also share the tests.
@LowestofheDead
@LowestofheDead Рік тому
You can see the full talk here: "Building Observability for 99% Developers" by Jean Yang (Strange Loop 2022) ukposts.info/have/v-deo/jXpyaIZ-gqSqk58.html
@NoBoilerplate
@NoBoilerplate Рік тому
@@LowestofheDead Nice, thanks for the link!
@SochetraNOV
@SochetraNOV Рік тому
The voices, the script is so fascinating to watch & listen. 😊😊 you are the one who inspire me to try rust.
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much! If you want something relaxing to listen to in my voice, I recently started season 10 of my hopepunk scifi podcast, Lost Terminal ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@miguelguthridge
@miguelguthridge Рік тому
I've been learning Rust for a few weeks now and one of the things I've spotted is how well the type checker helps you prevent errors you didn't even realise were possible. For example, I recently got a compiler error because converting a character to uppercase returns an integrator of characters rather than a single character - it turns out that in some languages, converting some letters to uppercase gives two letters as a result. Without Rust's type checker and its spectacular support for Unicode I never would have considered that edge case, which for some kinds of code is going to lead to massive bugs - you've probably heard of all the crashes on iOS and Android due to text rendering issues (if not, Tom Scott has great videos on it). I wonder how many crashes would have been prevented if the text-rendering engines for our operating systems were written in a safe language like Rust.
@NoBoilerplate
@NoBoilerplate Рік тому
Right! The whole community cares about correctness, this is SUCH a huge force!
@penguindrummaster
@penguindrummaster Рік тому
Everytime I see your videos, it inspires me to push forward with Rust. It beats me up everytime I try to journey forth, but I'm sure it'll all click eventually. Some of the development experience with Rust isn't perfect. An example is the examples.provided with Yew, where I spent 2-3 hours debugging a framework I had never used before to just get their example (written for an older version) working with the latest. Ultimately, I'm hopeful for the future of Rust, but I'm also held back by my colleagues that are scared away by the unfamiliar nature of Rust. I'm hoping I can forge a new chapter in my company's history, and move to a bright future in which much of our infrastructure is written in Rust.
@sumofat4994
@sumofat4994 Рік тому
Sound like Stockholm syndrome to me. Getting beat up and coming back for more.
@NoBoilerplate
@NoBoilerplate Рік тому
You and me both my friend! Yeah, I hit that problem with Yew too, their documentation could be better :-( But once I got it working, I LOVED hot-reloading in-browser. That was an unexpected treat!
@enque01
@enque01 Рік тому
I too had this experience, with all the tutorials being so simple it gives you the idea that all will be simple from now on. But then when you try making your own thing that is not a tutorial, the compiler beats you up! It is frustrating - "I just wanna use the thing I just created! Why can't I even REFER to it, you silly compiler?!" But I find, now after a while, that stops happening. I kind-of just started placing things in memory more consciously, more deliberately, and when I mutate things i tend to do it in a more structured way than before. And slowly the compiler stopped being an annoying brat. Now I even prefer doing "quick and small" tools in Rust, over Python.
@leegeorg08
@leegeorg08 Рік тому
I'd love to see how one might take formal specification (such as TLA+/PlusCal) and bring it over to the invariants and typing of Rust
@NoBoilerplate
@NoBoilerplate Рік тому
Write the macro!
@IronCandyNotes
@IronCandyNotes Рік тому
"The human cost of writing Rust" 😆
@NoBoilerplate
@NoBoilerplate Рік тому
hehe
@michawhite7613
@michawhite7613 Рік тому
The compiler demands a sacrifice
@user-qw9yf6zs9t
@user-qw9yf6zs9t Рік тому
the rust compiler is a real friend, instead of hiding things from you, it shows your mistakes in a comprehensible way.
@NoBoilerplate
@NoBoilerplate Рік тому
A true friend!
@sadikkadom9566
@sadikkadom9566 Рік тому
Currently in the process of learning speed (coming from a Javascript background). I do find it quite challenging, but I hope it'll all pay off in the end. When I do get something write, I feel like I just wrote a magic spell.
@NoBoilerplate
@NoBoilerplate Рік тому
It's a tough start, you're doing well so far! I recommend: - fasterthanli.me/articles/a-half-hour-to-learn-rust - My rust series (10 other videos) - The Book doc.rust-lang.org/stable/book/ Good luck! Ask for help on my discord if you need it, loads of nice people there! links on noboilerplate.org!
@sadikkadom9566
@sadikkadom9566 Рік тому
@@NoBoilerplate Thank you very much for the recommendations. I'll stick with it. I know I'll be turning to nice people like you when in need of help!!
@xXJM01Xx
@xXJM01Xx Рік тому
"Oxidizing your entire stack" I like that! :) Great channel, just found this today. I have been looking to see if any languages out there have been picking up traction in the coding space and Rust keeps popping up for me. I will definitely be learning Rust as soon as I can.
@NoBoilerplate
@NoBoilerplate Рік тому
Fantastic! Do check out my other videos for incredible features to get excited about. You'll need that to get over the initial learning curve! 😁
@eboubaker3722
@eboubaker3722 Рік тому
It's a good day whenever he uploads 😀
@vildemare
@vildemare Рік тому
Yep, always feels such a long wait for the next one..
@NoBoilerplate
@NoBoilerplate Рік тому
I feel the same! So nice to chat to everyone :-)
@NoBoilerplate
@NoBoilerplate Рік тому
Currently it's fortnightly, but if the Patreon takes off...!
@PaleyBlog
@PaleyBlog Рік тому
Thank you for the video. The style of your videos feel like a breath of fresh air. Interesting topics presented in a simple to understand and short enough format. No boilerplate indeed. I wish other content creators would learn from you
@NoBoilerplate
@NoBoilerplate Рік тому
You're very kind! I try to make it as good as I can.
@atreusduvelll600
@atreusduvelll600 Рік тому
Another great video! I love that "oxidization of the stack" is a term. Very clever :D
@NoBoilerplate
@NoBoilerplate Рік тому
Rust is close to the metal XD
@vildemare
@vildemare Рік тому
Great and exciting vid! Really like the channel format!
@encapsulatio
@encapsulatio Рік тому
Roc language is probably going to be in 3-4 years my main "productive language" while still being "safe enough". Every time Feldman makes a new video about it's progress I am quite amazed. He takes ELM unrivaled developer experience and "faster than GO" as his main objectives for his pure functional language. My hope is that he can go in terms of speed more to rivaling C# and Java. Then it's truly going to be an incredible language. His full type inference approach is very interesting. - Richard Feldman, Pushing Boundaries with Roc - latest talk is the reason I'm so excited about it. Most of the comparisons in his video are with Rust and Typescript.
@NoBoilerplate
@NoBoilerplate Рік тому
Very impressive! But, so is Haskell, and as you say, Elm. I'm excited by Haskell not just because of it's technical qualities, but because it's *popular* and I can hire a team and get working with it TODAY. When Roc passes Common Lisp (dead center) I will start to pay attention. redmonk.com/sogrady/2022/03/28/language-rankings-1-22/
@DaxSudo
@DaxSudo 9 місяців тому
Listening while at Costco this is fun. I love these videos.
@NoBoilerplate
@NoBoilerplate 9 місяців тому
Thank you so much!
@mika2666
@mika2666 Рік тому
Another great video, I always look forward to the next video!
@1XXXJoker
@1XXXJoker Рік тому
God i love these videos! One of the few channels for which I come back every now and then to UKposts, even though I have basically quit.
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much! If you want to avoid YT, I post about the new videos on twitter, patreon and discord!
@somegeneralist
@somegeneralist Рік тому
Another great video - one of my favorites yet! I mainly write of Typescript for work, but have to admit that you got me to read up on Rust and I love it. Starting Rust for Rustaceans now. Just wish GCP had integrations with rust (apart from running containerized in Cloud Run or GKE).
@NoBoilerplate
@NoBoilerplate Рік тому
Google back Go, of course, and have made a carbon copy of Rust, called Carbon. I'm deeply suspicious of their motives there! -.-
@somegeneralist
@somegeneralist Рік тому
​@@NoBoilerplate 😆😆
@rajm.5819
@rajm.5819 9 місяців тому
The best Rust videos live here. Great accented voice over. ❤
@NoBoilerplate
@NoBoilerplate 9 місяців тому
Thank you!
@picklypt
@picklypt Рік тому
You got me into rust and now I'm building two project with it. Thank you so much!
@NoBoilerplate
@NoBoilerplate Рік тому
I'm so pleased! This is why I started this series!
@youpie
@youpie 3 місяці тому
no boilerplate is the not just bikes of the programming world
@frazuppi4897
@frazuppi4897 Рік тому
I just want to say, I love your content man. Cheers from Switzerland
@NoBoilerplate
@NoBoilerplate Рік тому
Hey, thanks!
@JohnnysaidWhat
@JohnnysaidWhat Рік тому
Ok damn that answers my question about aws. Thanks for linking this in your comment!
@NoBoilerplate
@NoBoilerplate Рік тому
My pleasure!
@jordixboy
@jordixboy 9 місяців тому
"You can trust compilers" Meh, debatable, I've read a very interesting paper that was saying that compilers could inject malware or bad code into your code, take care of what compilers you download. But I get the point! great vid as usual
@NoBoilerplate
@NoBoilerplate 9 місяців тому
Oh sure, everything is possible, but I'll take my chances with an extremely well-reviewed piece of open source software ;-)
@Dominik-K
@Dominik-K Рік тому
Very interesting and actually the main reason I'm learning Rust currently. If I need a highly efficient language, especially as cloud providers will charge you for all inefficiencies too, for critical code it's imperative to be efficient. Otherwise the whole system can become unnecessarily slow or Ressource hungry
@NoBoilerplate
@NoBoilerplate Рік тому
That's it! And, unlike C++, we get this with a pleasant to use high-level language too!
@BsktImp
@BsktImp Рік тому
This man's delivery could convince you night is day.
@NoBoilerplate
@NoBoilerplate Рік тому
I promise to only use my powers for awesome
@noblenetdk
@noblenetdk Рік тому
Short precise and to the point - hard to be anything than Impressed.
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you!
@wChris_
@wChris_ Рік тому
Rust in the kernel is really exciting, to finally see another language in the kernel that is memory safe! But there are still a lot of problems, mainly the use of unstable features in kernel rust. That is to say that rust is not yet mature enough to be stable for kernel needs. But what is most exciting is the comparison of the NVME driver which is just as fast the C implementation, thwarting any concerns about speed!
@NoBoilerplate
@NoBoilerplate Рік тому
"mainly the use of unstable features in kernel rust." I'm not sure that's quite right there. Unsafe isn't any worse than C, it just means you can defeference a raw pointer, plus 4 other pointer-related superpowers. (see the book for them). ...C can do all these unsafe operations with no oversight already, and we already write the linux kernel in that XD
@wChris_
@wChris_ Рік тому
@@NoBoilerplate Im not talking about unsafe, i mean feature like 'global_asm' or 'allocator_api' which are currently unstable that means the build could break in any verison which is a huge nogo. There are talks of having a dedicated kernel rust version, but that would lead to stagnation, like with C, where they had C89 for the longest time as the kernel C version, they only updated it because of a speculation bug, which couldnt be fixed in the version they had, so they went straight to C11 Wich is also a decade old but its atleast more modern than what they had.
@NoBoilerplate
@NoBoilerplate Рік тому
@@wChris_ oh! sorry I read 'unstable' as 'unsafe'. My bad! Unstable features get stabilised pretty quickly, even in the short time I've been following things. The Editions system perhaps could help here?
@PandaNuker
@PandaNuker Рік тому
I just looove your channel so much. I wish I could work with Rust in my day-to-day job. The reality I've gotten used to is that for fullstack web dev (+ serverless), using e2e typescript in a monorepo saves incredible amounts of time: shared types, strong generics (close to rust), linters, shared libs, and one language design. But ngl I just love rust and wish I could use it professionally
@NoBoilerplate
@NoBoilerplate Рік тому
I too take what I've learned from Rust into my day job to improve the Ruby we write!
@AceofSpades5757
@AceofSpades5757 Рік тому
Another eloquent video. Thanks for the excellent work!
@NoBoilerplate
@NoBoilerplate Рік тому
My pleasure!
@J0R1AN
@J0R1AN Рік тому
Thanks for motivating me to keep learning rust :)
@NoBoilerplate
@NoBoilerplate Рік тому
You can do it!
@benjacook3771
@benjacook3771 Рік тому
Like how you mentioned Neovide I've been using it recently it's so awesome :)
@NoBoilerplate
@NoBoilerplate Рік тому
Nice! Did you see my setup video for it? (my 'lightsaber' video)
@hc1770
@hc1770 Рік тому
After using Rust for a project and spending the time to understand new concepts like borrowing, lifetimes, I started to enjoy coding in Rust. The start was frustrating as the compiler just doesn't compile! It was very different with how development was with NodeJS. Which even if the code or syntax was wrong, NodeJS compiles and only when you execute that function it fails. I can totally relate with the narrative in the video whereby in Rust, if the compiler compiles, it just works. Unfortunately I'm working on a NodeJS project (not typescript) and always thinking about the type system, enums and lifetime. Writing in Rust really changed the way I handle my codes now.
@NoBoilerplate
@NoBoilerplate Рік тому
Rest is good for our mental health isn't it!
@TheEvertw
@TheEvertw 4 місяці тому
While Rust forces you to prevent errors, the compiler usually tells you exactly how to fix the problem, and gives pointers explaining the problem very clearly. The problem with learning Rust is on the level one up from getting the syntax right. It is getting rid of unsafe constructs that other languages advocate. Like callbacks or back-pointers etc. But it are exactly those structures that make our software so brittle.
@NoBoilerplate
@NoBoilerplate 4 місяці тому
Agreed, and rust's unsafe system makes this process as easy as it can be!
@doktoracula7017
@doktoracula7017 Рік тому
5:42 This makes me wonder, how many things we could automate and improve to make dev lives better, but we never thought about doing it? Automated upgrade of code to new library versions? Maybe graph based documentation that is compile time checked, so it's never out of date? Maybe automated scaling where code works without changes no matter if it runs on one cpu, multiple cpus, multiple local network machines or cloud? There are many ideas coming to mind, though most are taken from "Features of a dream programming language 2nd draft"
@NoBoilerplate
@NoBoilerplate Рік тому
If you made just one of these, I'd buy it :-D
@fabiobregasi5290
@fabiobregasi5290 Рік тому
I'm currently learning Go as I think it has more appeal on the market right now, but I can't wait to start writing some Rust, your amazing videos really convinced me to buy the Rust book. I will ASAP
@NoBoilerplate
@NoBoilerplate Рік тому
Go's a great language too, you'll have a good time! Absolutely no harm in learning both, as developers, that's what we do! The book (also in epub) is free, don't forget doc.rust-lang.org/stable/book/ (dead tree formats don't have working links ;-) )
@fabiobregasi5290
@fabiobregasi5290 Рік тому
@@NoBoilerplate I agree 100% :) thanks for the link!
@NoBoilerplate
@NoBoilerplate Рік тому
@@fabiobregasi5290 HAVING SAID THAT here's two features that you can't get in Go ;-) ukposts.info/have/v-deo/iKV-jI2aZ66jrGQ.html
@porky1118
@porky1118 Рік тому
8:45 "Look how simple a hello world" is in Rust. At least compared to more popular languages like Java/C#. No need to use classes, static methods, string arrays, return types. In the beginning you wouldn't need to know static, arrays, string types, and any class specific stuff. You only want to know functions, maybe. And that's basically what a "hello world" in Rust looks like. Just a function, and a macro. No types at all. I still think, a simple hello world has some value.
@CristiNeagu
@CristiNeagu 8 місяців тому
Now compare that with Python...
@porky1118
@porky1118 8 місяців тому
@@CristiNeagu Same for scopes. Probably shorter. It's just this line: print "Hello World"
@bruhe_moment
@bruhe_moment Рік тому
This channel is the reason I finally decided to learn Rust. Since then, every new project I have language choice over has been in Rust and I could not be happier! Coming from primarily Python, I tend to echo your statement that the language's simplicity causes more problems than solutions at scale
@NoBoilerplate
@NoBoilerplate Рік тому
And the less we talk about the GIL the better!
@asdfghyter
@asdfghyter 6 місяців тому
The downside I can see with the "correct now" principle is that it can harm velocity when prototyping and iterating. You often don't know what product you need to build, so it's important to get some kind of prototype in the hands of a user as quick as possible, so you don't waste time building a product that no-one needs. In those cases it usually doesn't matter if there are bugs in edge cases, since you just want to know if the entire idea is crap or not. There are of course still shortcuts you can use in Rust like using unwrap and clone liberally and there's also the risk of prototypes ending up in production, but I still think this is a real downside to using languages like Rust and Haskell, which forces your programs to be correct from the start.
@NoBoilerplate
@NoBoilerplate 6 місяців тому
I don't think your concerns actually manifest in practice. Once you know Ruby on Rails, you can rapidly prototype, once you know React you can rapidly prototype, and once you know Rust, you can rapidly prototype. A newbie in any of these would be slower at first. And even on top of that: Compiler-driven development has the potential to be FASTER than iterating in traditional tools because so much more is checked for you by the compiler. I've got a draft video on this topic coming soon!
@SeresHotes25
@SeresHotes25 Рік тому
Your channel is just a giant Rust advertising. And it's working freaking well!
@NoBoilerplate
@NoBoilerplate Рік тому
This is intentional. I've noticed a lack of clear, well-explained introductory videos to Rust topics. There's loads of people making really great technical tutorials, but not stuff to get EXCITED about. I crashed out of writing Rust TWICE in 2020, and I only came back because I had a mentor to help me. Most people don't have this luxury. Rust has a BRUTAL learning curve, compared to other popular languages (though not as bad as Haskell et al), and so you need to know ALL of the great features that you simply can't get elsewhere, in order to push yourself through the initial learning period. Have you tried Rust? Thanks for your comment!
@SeresHotes25
@SeresHotes25 Рік тому
@@NoBoilerplate I actually started learning because of you. Moreover, I watch your videos sometimes when I lose my motivation. It really helps! :3
@NoBoilerplate
@NoBoilerplate Рік тому
@@SeresHotes25 I'm so pleased, thank you 🙂
@mwanikimwaniki6801
@mwanikimwaniki6801 Рік тому
​@@SeresHotes25 And imma start because of this guy
@dylanstrudwick1226
@dylanstrudwick1226 Рік тому
hi friends. my name is tris and this is no boilerplate, focusing on fast, technical videos.
@NoBoilerplate
@NoBoilerplate Рік тому
you should have your own show! :-D
@DavidsKanal
@DavidsKanal Рік тому
Hey, awesome content as always. Was just wondering: I have a hard time differentiating your videos from afar when I see them appear in my recommended, mainly because they're so similar visually (thumbnail). I'm sure you're aware, so have you thought about how you could have more diversity in your thumbnails apart from keeping the same icon and changing the text? I mean, your thumbnails *are* recognizable, I immediately know it's your video, so I guess that's good, and given they're not really about any visual topic, I also struggle to come up with a good alternate design without making them annoyingly clickbaity or cluttered. I don't know! What are your thoughts?
@NoBoilerplate
@NoBoilerplate Рік тому
My rust series won't go on forever. I will eventually run out of features to hype up! :-) And then, I might try a different colour logo. It's entirely possible I'll need to figure out the art of a YT thumbnail later on, and you might find big changes! I'd welcome any and all suggestions.
@maxpursian
@maxpursian Рік тому
Your Videos always make me want to try Rust out even more! I started a lot of smaller tests with rust here and there, but I still need to work myself up to work through the Rust Book to get fully started with the language. What is your stance on "the right tool for the job" with Rust? Would there still be Projects you wouldn't recommend Rust for?
@NoBoilerplate
@NoBoilerplate Рік тому
I think the biggest category where Rust wouldn't be the right choice is applications where having a big runtime is an asset, not a feature. The one that comes to mind first is Data Science. Playing around with datasets in a repl is a huge part of doing data science, and it's not the types that matter but the values, so a rich compiler won't be as much help as building a larger app. Julia is a language i'm excited about for this sort of work!
@maxpursian
@maxpursian Рік тому
@@NoBoilerplate Oh absolutely, especially doing Uni work, it’s nice to just script things and play around with data. I’m using Python for that :) But Julia or R are also present in some fields. There’s really a lot of languages to choose from haha
@OoXNikoXoO
@OoXNikoXoO Рік тому
Can you talk about the implications of adding Rust to the Linux Kernel and how it affects code safety e.g. when a kernel panic occurs from whatever cause could Rust handle that better than existing C implementations?
@NoBoilerplate
@NoBoilerplate Рік тому
I too am looking forward to the discussion on this topic. I'm not a kernel developer, so I'm not the right person to talk about it I'm afraid!
@lucky-segfault4219
@lucky-segfault4219 Рік тому
rust doesn't inherently handle panics better, but it does require programmers to clearly mark everywhere where a panic can occur using the `panic!()` macro, the `.unwrap()` method, or something similar. In theory, if a programmer can replace all `panic!()`s and such with code that compensates for the issue, you code can become panic-proof. You can even use a macro called `no-panic` to make sure a method is incapable of panicking or it will fail to compile. In practice, I suspect panics will still happen sometimes, but they may be so rare as to only effect driver developers with non-rust languages and the like.
@NoBoilerplate
@NoBoilerplate Рік тому
@@lucky-segfault4219 Indeed, I did a video on this very topic! ukposts.info/have/v-deo/q5KHrKdupYSlyKM.html
@olestrohm
@olestrohm Рік тому
I haven't looked at the latest iteration in detail, but as far as I'm aware the kernel doesn't panic. That's not a thing it wants to ever do. In light of this one of the things that were required to put rust into the kernel was to provide better support for non-panicking data structures/functions. For example Box::try_new tries to allocate a new Box, but if it runs out of memory and the allocator can't do that, then it gives an Err instead. So Rust's normal enum and rich type system actually makes the same patterns even better. In C you would perform the allocation and simply receive a null pointer in the cases where it runs out of memory, and it's up to the developer to check each pointer returned by malloc. In Rust that's as easy as ?
@olestrohm
@olestrohm Рік тому
In fact Asahi Lina (whose live streams are on youtube) has just written a GPU driver for the M1 mac in Rust, which is where I saw these patterns
@ameypendokhare3832
@ameypendokhare3832 Рік тому
Hello Mr.Tris , here's a thing for you : when Joe Armstrong said Erlang is 'write once, run forever' and as Erlang's main strength is support for concurrency (also its functional ❤️) . And as far the journey had we knew Rust⚙️ is known for the FEARLESS CONCURRENCY ⚡. Could you please make a next video on concurrency and the parallel stuffs ... taking Rust and other buddies in comparison.
@NoBoilerplate
@NoBoilerplate Рік тому
Love it, good comparison topic erlang-rust. Thank you!
@billy-boobs
@billy-boobs Рік тому
does anyone remember Flash? The slowest, least efficient, least energy efficient, but that hasn't stopped the creation of a huge number of legendary games. It can be said that it is not speed that makes a language great.
@NoBoilerplate
@NoBoilerplate Рік тому
Absolutely - all these other incredible features of Rust in the video make me excited for it! Speed is fine, but I wrote python for 15 years, so I know that it's not essential XD
@Honken
@Honken Рік тому
Building a large project with any Rust framework is extremely energy intensive though. Just the initial Yew/Rocket/what have you build downloads ~400-500 dependencies, spinning all cores at 100% for 5-15 minutes depending on how new your computer is. That number shoots insanely high once you get everything else you need (db drivers, auth, caching etc). I would use Rust a lot more if it wasn't for tiny one off projects taking ~6 gigabytes of storage after draining my battery by 20% before I even get to open my editor.
@NoBoilerplate
@NoBoilerplate Рік тому
Compile times are a huge focus for the core team. And maybe you're a little out of date? I remember such compile times when I first started using Rust in 2020, but every version they get faster and faster! I just tried the Rocket hello world demo, and it uses ~100 crates. On an M1 mac this takes 10s to compile cold, and 0.1s to recompile. Do try the same and let me know how you get on!
@Honken
@Honken Рік тому
​@@NoBoilerplate I don't know about Rocket now, I used it around the same year you mentioned. Yew however comes at this size, presumably for all the wasm deps. Following the Yew tutorial, it took me ~30 minutes before I could open my editor, downloading and install trunk, wasm, bindgen, yew and what not. Those 30 minutes were 80-100% CPU usage on all cores, and drained a fifth of my battery. This has been my experience with all Rust frameworks 2019-2021 (ish). But happy to hear! I know there's been some fuzz around linkers and debug builds coming down. That is awesome news.
@NoBoilerplate
@NoBoilerplate Рік тому
@@Honken Yeah, do try out Rocket again, you'll be pleasantly surprised! Yew did take a lot to set up didn't it? Trunk was especially weird too when I set it up, downloading some binary blobs that I wasn't keen on . HOWEVER I don't actually mind those setup costs - they're one-time. They should be faster, you're right, and they're getting better, but at least they're one time. Once I got yew installed for the last video, and started playing around with it, the experience was SO FAST, even hot-loading code into the browser when sourcecode changed and compiled. WOW! Please don't let the long compile times put you off, and if they still do, just try again in 2 months, they're getting better every release 🙂
@Honken
@Honken Рік тому
@@NoBoilerplate Thank you for always being so positive and encouraging in your comments. I'll take you up on that, and subscribe :)
@NoBoilerplate
@NoBoilerplate Рік тому
@@Honken My pleasure! I'm trying to help people out with the videos, it'd be weird if I didn't also do that in the comments 🙂 There's 10 other videos in the series right now, have you seen them? Here's the playlist ukposts.info/have/v-deo/iWNynLB_qG6gyKc.html
@retrodad9390
@retrodad9390 Рік тому
Like u sad, I created my own structures in code (like custom result objects) when getting more mature as an engineer. To get rid of logical error's and to be expressive. Rust seems to fit perfectly in my head with all the default build-in functionality and with its performance. Some context (I created many distributed backend systems (no embedded) in the past in c++ (also modern) and c# for more than 20 years.) I still like the other languages but only for the huge liberary of tooling, documentation, SDKs. Thanks for the video.
@NoBoilerplate
@NoBoilerplate Рік тому
My pleasure, thank you for your nice words. The huge library of tooling documentation and SDKs is coming, and coming fast, and it's already there for many fields
@tsalVlog
@tsalVlog Рік тому
I urge the Rustaceans to give Lost Terminal a try - it's gonna be up the alley of most of you!
@NoBoilerplate
@NoBoilerplate Рік тому
You're too kind! I also think so!
@serioustr
@serioustr Рік тому
The podcast? Not sure if I am looking at the right thing
@NoBoilerplate
@NoBoilerplate Рік тому
@@serioustr This is Lost Terminal, written by a geek for geeks 🙂 ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@fischi9129
@fischi9129 Рік тому
I still can't see the advantages of lifetimes. I can def see the need for them considering how the compiler overall works, but I still can't see a single scenario where the lifetime allows me to do something I wouldn't be able to do without. Something that should be told, till you aren't proeficient in rust, rust is a headache cause you spend 20 hours on compiler errors for every 1 hour without. But once you are fluent in it, everything you said is pretty correct.
@NoBoilerplate
@NoBoilerplate Рік тому
No denying the learning curve, but that's why I'm here to get you (and me!) excited enough to push through to that point you mentioned, where you're fluent in it. It's a hard road initially, though. I crashed out twice in 2020. Glad I pushed through! The benefit of lifetimes (to us, not to the compiler) I can't yet explain clearly enough, though I'm nearly there. I'm writing the video, stay tuned! The tldr is that if your type system has lifetimes, you can model not just what your data is, but WHEN. (what sequences of your data are valid). Come ask on my discord, links on noboilerplate.org, and those smarter than me may give a better answer!
@fischi9129
@fischi9129 Рік тому
@@NoBoilerplate Thx
@mehtubbhai9709
@mehtubbhai9709 10 місяців тому
you have convinced me to learn rust
@NoBoilerplate
@NoBoilerplate 10 місяців тому
Wonderful! Honestly this language sells itself! Have you seen my video on how to learn Rust? ukposts.info/have/v-deo/apiJgpptr2-ku6c.html
@sputnick1
@sputnick1 Рік тому
Can we get a video describing your workflow when creating a video like this if you have time? what software do you use. Why and how do you do things?
@NoBoilerplate
@NoBoilerplate Рік тому
Have a look at the middle of my 'lightsaber' video - I use obsidian.md!
@theninjascientist689
@theninjascientist689 Рік тому
@@NoBoilerplate Rust and obsidian! Tis a beautiful way to live
@tordjarv3802
@tordjarv3802 Рік тому
Just to clarify, it is very possible to write logic errors in rust that will compile. Just because the types match in a statement doesn't mean that it is logically sound. You can for example accidentally write "or" instead of "and", the compiler wouldn't be able to see that that one is incorrect just from the types, it would have to know the programmers intention, which it do not.
@NoBoilerplate
@NoBoilerplate Рік тому
Very true, of course. It's much easier to find these errors, when you don't have to wade through the marsh of uncertainty that other languages have, however!
@adamd0ggg2
@adamd0ggg2 Рік тому
Was able to write a rust rocket app today. It was 100% a challenge but I learned a lot. What advice do you have for writing good idiomatic rust? I find myself cloning strings and objects often to get it to compile. It works, but it feels like I'm taking the easy way our or not thinking rusty enough.
@NoBoilerplate
@NoBoilerplate Рік тому
Adam, you're doing it right, cloning strings and objects is absolutely fine when you are getting started. Rust is 80x faster than Python, you'll get fine performance XD Come ask questions on the noboilerplate.org discord - there's a channel #newbie-advice just for this!
@NoBoilerplate
@NoBoilerplate Рік тому
"most apps should be written in a higher level language until you can no longer do so" Telling a newbie this is very mean and closed-minded. Please learn more.
@NoBoilerplate
@NoBoilerplate Рік тому
​@Christopher Grant Chris, look at the context of your statements: You're commenting in a thread where a newbie is excited about Rust and has written a simple web app and is starting to ask intermediate questions about cloneing. You're too late with all this advice! Adam is excited about Rust and has already breezed past the problems that that paper's authors seem to think are too difficult. They're not, ownership is easy. Python's a fine langauge to learn to code in, so is javascript or ruby. For me, Python was my boat. It's got me to the other side of the river, but I'm not taking it with me as I climb the mountain.
@SharukhKhan-sd7xg
@SharukhKhan-sd7xg Рік тому
Hi it was such a great video man loved it 🤙 I have a question🙋 I am a web developer more specialized in frontend development and nodejs( I love js/ts 😄) I am thinking about learning rust but confused between rust and go. What do you think I should go with that will help in my career. Thanks in advance. 🙏
@NoBoilerplate
@NoBoilerplate Рік тому
Both! Go is a fine language that if rust didn't exist, I'd be writing. These are not the last two languages you'll be learning in your career either, so start today 😊 Try rocket.rs and yew.rs, and go through Rustlings and the Book. Hit up my discord and ask for help in there. Good luck!
@m.hosseinmahmoodi
@m.hosseinmahmoodi Рік тому
I agree that rust is “Good Fast Cheap” but as an C\C++ I have 2 problems that make it hard for me to use rust: 1. No support for C++ libraries (as far as I know) 2. Rusts syntax is just too different, and I don't know, for me, it feels weird to write a type of variable right of it instead of left. Thing that I probably would like if I switch: 1. Compiler errors 2. More memory protection BUT in my case, “no support for C++ libraries” out weights every other thing.
@NoBoilerplate
@NoBoilerplate Рік тому
1. You're right, though Rust's C support is excellent (doc.rust-lang.org/nomicon/ffi.html) calling C++ functions requires a C wrapper. This is how C++ libraries are wrapped (such as GTK crates.io/crates/gtk) So it's not impossible, certainly easier than with Python, it's not as direct as with C. Check crates.io, you may find that someone has done the work for you for the library you want to use! 2. Syntax is syntax. Some people prefer type on the left, some on the right. Many people have it even harder, and are coming from dynamic languages and ask me why it needs to be there at all! This is a matter of style, and one you may have to get used to if you want to try new languages, as it appears to be the prevailing style. My take is that the NAME of the variable is something I look at much more often than the type. Because the Rust compiler does type inference based on both sides of the = sign, in most cases, only the function signature needs to be typed. I am sure that you will have no problem learning Rust, coming from a C++ background you're already familiar with many of the low-level features I had to learn (My background was Python). This article was revolutionary for me fasterthanli.me/articles/a-half-hour-to-learn-rust.md So much so that I got permission from the author to make a video version ukposts.info/have/v-deo/mqJke3-AiJuWx40.html (though the article is better) I have written about 10 other Rust videos showing the remarkable features of this language. The playlist is here ukposts.info/have/v-deo/iWNynLB_qG6gyKc.html I'd give them a watch, and I hope you will see that small differences in syntax will seem like a small price to pay :-)
@NoBoilerplate
@NoBoilerplate Рік тому
Oh! I just found cxx.rs - which seems to do what you want! There's also bindgen, but I don't know much about that. Come and chat to me and the community on my discord if you like, the people over in #programming would be delighted to talk C++ / Rust integration discord.gg/mCY2bBmDKZ
@cerulity32k
@cerulity32k Рік тому
11:08 Flesh is unpredictable, silicon is certain.
@NoBoilerplate
@NoBoilerplate Рік тому
You've been listening to Lost Terminal haven't you XD ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@edems131
@edems131 11 місяців тому
Nice video, i hope now I can finally convince my boss to use Rust in the next project after i will force him watch this video :D
@NoBoilerplate
@NoBoilerplate 11 місяців тому
This is EXACTLY why I made this video! I have a few others that are also very boss-compatible too, check them out!
@edems131
@edems131 11 місяців тому
@@NoBoilerplate Nice :D, good job!!!
@edems131
@edems131 11 місяців тому
​​​@@NoBoilerplate it would be nice if you made playlist called something like "For boss" where in right order all reletad videos would be to convince him :D
@NoBoilerplate
@NoBoilerplate 11 місяців тому
@@edems131 DONE ukposts.info/have/v-deo/bJSnmmyihG1h0oE.html
@edems131
@edems131 11 місяців тому
@@NoBoilerplate :D awesome
@CODEDSTUDIO
@CODEDSTUDIO Рік тому
Great videos always
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much!
@lectromoe
@lectromoe Рік тому
great video, as always!
@danyldavidiuk9507
@danyldavidiuk9507 Рік тому
with your videos i feel myself as some rust aristocrat... thank you for video
@NoBoilerplate
@NoBoilerplate Рік тому
Excellent!
@dr-maybe
@dr-maybe Рік тому
I’m already convinced that rust is amazing, and use it for pretty much all of my new projects. Still I really like these videos, as they help me articulate why I actually like rust as much. Great content!
@NoBoilerplate
@NoBoilerplate Рік тому
My goal is to get as many people excited about rust as possible, and while they're learning, to stay excited 😊
@mankaranbedi8927
@mankaranbedi8927 Рік тому
Alright you got me. I'm learning Rust today
@NoBoilerplate
@NoBoilerplate Рік тому
Fantastic! Do watch my other videos on Rust, there's astonishingly good features there that you'll NEED to know about! Start here fasterthanli.me/articles/a-half-hour-to-learn-rust Then hit The Rust Book, and Rustlings. Good luck!
@JBBell
@JBBell Рік тому
Great stuff. Keeps this cranky old Python programmer motivated to continue learning Rust and to use it. There's something especially optimistic and soothing about the delivery, too.🙂
@herrpez
@herrpez Рік тому
Just don't buy into the "70x more efficient" part from right at the beginning. It's perhaps 70x faster to run, but what are Python scripts generally for? The language not meant for heavy lifting, so those comparisons are unfair, so to speak, unless you do come across a Python script that ends up crunching numbers at max speed for minutes (or higher) on end. But yes, do learn Rust! It's a great language. Just don't forget about scope and scale.
@NoBoilerplate
@NoBoilerplate Рік тому
"python scripts" is not what we call the second most popular language in the world. Despite what you or I think about Python's applicability, people are using it for EVERYTHING! Also 70x slower than C speed, is Python's pure cpu single-threaded benchmark. It utterly crumbles in multithreaded benchmarks due to the GIL. Yes speed doesn't really matter. But when it's HUNDREDS of times slower, it starts to matter. As I said in the video, unit tests are 100% cpu with no waiting for IO, so it's especially noticeable there.
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much! Perhaps you'd like my delivery of Lost Terminal too? ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@herrpez
@herrpez Рік тому
@@NoBoilerplate No, python scripts are what you create with Python. And if you want more performance with similar ease, Nim is a fine alternative. If you want actual performance you go for a more suitable language. I don't think we'd disagree on this. I write Python for things where bash doesn't cut it, but still in the same domain as bash scripts. Beyond that, other languages are far more suitable.
@NoBoilerplate
@NoBoilerplate Рік тому
@@herrpez I am aware of nim, I am a maintainer of inim, the most popular repl ukposts.info/have/v-deo/iZGQbaysq2qF24U.html Please understand most people don't use python in the way you do. It's not the second most popular language in the world because people write scripts "where bash doesn't cut it".
@konga8165
@konga8165 Рік тому
Love your videos!
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you!
@YDV669
@YDV669 Рік тому
I honestly don't get it, but is this video extolling the virtues of static typing vs dynamic typing and compiled languages vs interpreted languages?
@NoBoilerplate
@NoBoilerplate Рік тому
I didn't set out to do so. Perhaps I make assumptions that the audience has watched the previous videos in my rust series? There's far more to Rust than static typing: ukposts.info/slow/PLZaoyhMXgBzoM9bfb5pyUOT3zjnaDdSEP
@YDV669
@YDV669 Рік тому
@@NoBoilerplate Well, the thing about prevoius videos is that it's entirely reliant on the UKposts algorithm. It recommended this video to me without telling me there were others. From what I can tell after spending 10 minutes with an installed compiler, it's a convoluted language combinging the arcane syntax of C++ with an extensive pythonesque library. I mean, that's not necessarily a bad thing, but I have to wonder if it's a gatekeeping language intended to scare away new developers with its unnecessarily complicated syntax.
@NoBoilerplate
@NoBoilerplate Рік тому
@@YDV669 I should make it clear that these are part of a Rust series! Good point, thank you. Oh it's TOUGH isn't it! I also hated the syntax when I started learning in 2020, I gave up twice, but luckily had a mentor that put me back on the right track! Here's the way to think about it: C or Python or other popular languages don't have all this syntax because they don't support the FEATURES that rust has that they don't. Three clear examples of this are the Result type, often seen in return values, lifetime annotations (which state that reference x must live at least as long as reference y), and references themselves. A recent video where I showed an example of why this extra syntax is needed was Rust on Rails ukposts.info/have/v-deo/q5KHrKdupYSlyKM.html I'd love to know your thoughts after watching this.
@YDV669
@YDV669 Рік тому
@@NoBoilerplate Book follows. :) So I watched your video, and I still don't really agree that such syntax complexity is necessary, despite all the things Rust seems to do for you at the compiler level. let mut x = 1 let y = 1 Why force the use of two keywords for almost every single variable? Mutable function variables would normally be the default, with immutables the exception, wouldn't they?. mut x = 1 let y = 1 Or to more clearly identify the immutables, let x = 1 imm y = 1 The constant abuse of the exclamation mark(!). The apparently forced use of the question mark(?) to unwrap the actual result from a return payload. "Your code will never crash." That's like the worst thing to tell companies. Maybe it won't crash, but is it correct? It's bad enough remembering having a manager with the unshakable belief that code is production-ready the moment it cleanly compiles and after a few sanity-check runs(yes, even batch update cycles). This kind of thought corrodes development budgets. I have no problem with the language enforcing safety at compilation time, but does it need to be so needlessly and thoughtlessly convoluted? It sounds great at the "I designed a language to impresse my girlfriend" stage, but when you're debugging a program at 3am(or even compilation errors) after already being awake for 20 hours, the ivory tower intellectualism embedded in the core of this language isn't going to win you any friends due to issues with arcane syntax potentially obscuring critical logic errors with badly placed question marks or somesuch. I say all this as someone who grew up on a language that literally did not believe in division by zero being any sort of error, where string comparisons were all essentially right-trimmed(empty string is equivallent to ' '*x where x is any integer from 0 to MAXINT). None of this is intended in any way as a criticism of you personally. Your videos are well-written and narrated, and I appreciate learning about Rust.
@NoBoilerplate
@NoBoilerplate Рік тому
@@YDV669 Thank you for a very coherent comment! I'm DELIGHTED to help you here, you're on the right track, but have misunderstood a few things, I think. If that's due to my video, my apologies. You wrote me a book, I'll write one for you: 1. Mutability. Mutable variables are indeed the default for most languages. Rust chose to make immutability default because it's *better*. Immutability is the default in functional languages, you'll see this in Haskell and similar. Rust is a functional language. Look at any modern javascript tutorial, you'll find more `const` declarations than `let`. For instance, here's the first React tutorial reactjs.org/tutorial/tutorial.html the first code blocks that have variable declarations in use const. There are more `const`s on that page than `let`s My understanding is that in JS, the advice is is "use const by default, if you need mutability, use let". And why is this? One reason is Immutable variables are much easier to reason about and debug, we can't accidentally shadow them and mutate them, causing surprises. 2. "Constant abuse of exclamation mark." The compiler enforces that macros must end with a question mark, and nothing else may. If you see a !, you are looking at a macro, simple as that. Macros are STAGGERINGLY powerful, they can: 1. Rewrite syntax at compile time, and 2. Execute arbitrary code at compile time (even disk and network access) You'll never have come across this power before, except if you've use lisp. Other languages have things they call macros (or templates or comptime etc) but they are very rarely able to do both the above superpowers. Macros have a bang ! at the end because it's important we know where they are so we aren't surprised. 3. "Forced use of question mark to unwrap" Functional error passing is very different to exception handling and I understand why you are confused. It's not forced, nor does it unwrap the errors. My video on Rust's error handling is here, and I'm very proud of it, do take a look ukposts.info/have/v-deo/q5KHrKdupYSlyKM.html 4. (related) "Your code will never crash" I think after you watch the above video about error handling, you'll understand why I say this more. Rust CARES about not crashing at runtime (it is this feature that made it perfect for Linux kernel development, something that is THIS WEEK official), and has the complex syntax and compiler to find nearly every case where it could. (edge cases that require more care to handle are OOM errors and unchecked maths, but they both have simple solutions for if you need them, say in an embedded environment) 5. "arcane syntax potentially obscuring critical logic errors" I understand the syntax is unfamiliar, I really do. I hated it for the longest time, I kept crashing out of learning Rust. But I came back for the world-leading features that you simply can't get anywhere else. If you want a hard, realtime language that doesn't use a GC, and you ALSO don't want manual memory management, you're going to NEED the borrow checker. There's simply no other language available! The good news here is that the syntax is there for a reason. Other languages don't have borrows, so we need two symbols for a read-only borrow, and a mutable borrow [& and &mut]. OK, and now the compiler needs to know how long the programmer wants these borrows to live for, when can they be cleaned up? let's use ['a 'b 'c], name the lifetimes with simple names, you can use 'longer 'names, but most of the time there's only one or two lifetimes in a function, if any, so 'a and 'b are fine. Types are annotated with HashMap angle brackets as normal. The way I learned Rust's syntax was by reading the BRILLIANT Amos's blog post: fasterthanli.me/articles/a-half-hour-to-learn-rust I was so impressed by this post I made my own video version (after asking permission) ukposts.info/have/v-deo/mqJke3-AiJuWx40.html Depending on if you are a reading person, or a watching person, you could try either of these to grok the syntax fast? (I'm, ironically, a reading person!) I wish Rust had simpler syntax too. Just as I wish for proper self-driving cars. For now, I'll have to drive a normal car, and program using a bit more syntax! Both get me where I want to go. It's worth noting that the rust core team add more and more places where lifetimes don't need to be explicitly stated - the goal isn't to have zero lifetimes, but to have as few as possible, while being unambiguous. Thanks for reading all this and chatting with me, I think this video of mine, doing a deep-dive into unsafe and macros explains these two features pretty well - and you simply can't get them anywhere else, AND THEY'RE SO GOOD I didn't know I wanted these features when I was writing Python! ukposts.info/have/v-deo/iKV-jI2aZ66jrGQ.html Thanks friend!
@ex0ja
@ex0ja 9 місяців тому
What do you actually use rust for yourself, do you use it for work? Hobbies? What kinds of projects do you work on?
@NoBoilerplate
@NoBoilerplate 9 місяців тому
I built critical national infrastructure in it while working at the Government Digital Service, here in the UK, in 2020, that was my first taste. The experience was really profound for me: the whole first day nothing was compiling, and I thought the language was insane, but at 4pm we got it compiling and then no further changes were required and it's currently sitting in production, receiving dependabot security updates, code passing tests in CI and building with no changes. I genuinely think it could run for ever, this language is so focussed on uncompromising rock-solid backwards and forward compatibility. This commenter said it better than I ever could: ukposts.info/have/v-deo/knZ1pZ5qqqKCx4k.html
@ujjawalsinha8968
@ujjawalsinha8968 Рік тому
What are your thoughts of Clojure, a dynamically typed functional programming language that runs on JVM. Rich Hickey, the creator of Clojure, have very strong opinions about why to not use static typed language. I am curious. What are your thoughts?
@NoBoilerplate
@NoBoilerplate Рік тому
Love it. Before I discovered Rust, I was a professional clojure developer for 2 years, I even made a video about it! ukposts.info/have/v-deo/o49lpoKwqIeWonU.html Rust has taken so many of the features i love from Clojure: - Expression-based language - Real lisp macros - fluent interfaces everywhere - Instant feedback (albeit from the compiler instead of repl) I searched for years for a way to make typing work with clojure. Typed clojure just never clicked for me, it was so much overhead, no-one really uses it, and it wasn't very powerful, clearly an after-thought. Finding Rust (which is Lisp in C's clothing with Haskell's type system) has been revolutionary!
@clicker9534
@clicker9534 Рік тому
"Our web frontend could be written in you" - 12:20
@NoBoilerplate
@NoBoilerplate Рік тому
Homophones are fun!
@1337cookie
@1337cookie Рік тому
When you said there is nothing to stop you oxidizing your entire stack I realized why its called Rust; It's inevitable...
@NoBoilerplate
@NoBoilerplate Рік тому
Oooh! that's a good one. I heard recently that 'rust is close to the metal'
@ericng8807
@ericng8807 Рік тому
Was that blue line at the bottom always there? I can't unsee it anymore
@NoBoilerplate
@NoBoilerplate Рік тому
It's a progress bar for people who watch in full screen. Reveal.js has it as a feature, and I quite like it!
@Funcijej
@Funcijej Рік тому
How does rust targeting arm on lambda compare to rust targeting wasm-wasi. I think I remember a blog post saying wasm was way faster
@NoBoilerplate
@NoBoilerplate Рік тому
I don't understand your question, this sounds like Apples and oranges. Do explain more?
@magfal
@magfal Рік тому
How does rust and native compiled dart code compare on arm for performance? My company's Flutter app is already fast enough to not appear on our heavy users' battery monitors.
@NoBoilerplate
@NoBoilerplate Рік тому
Most languages are fast enough. Even Python's 80x slower than C doesn't hold it back from being the #2 language in the world! I don't know of ARM benchmarks, but according to the paper referenced in this video, Dart is 6.67x slower than C, just behind Javascript. For comparison, Rust is 1.04x slower than C, and C++ was 1.56 slower. So your dart app uses probably a similar amount of power to a javascript app, but the CPU-bound parts use 6x more than Rust. This is only pure cpu tasks, most app time is waiting for IO, which is why most languages seem fast enough - they're not executing most of the time!
@magfal
@magfal Рік тому
@@NoBoilerplate Flutter projects are compiled to native arm machine code for mobile devices. It also leverages GPU acceleration a lot for the GUI layer The near JS performance is likely when it's transpiled from dart to JS for use as a JS alternative like typescript. We're actually doing a lot of heavy lifting in the Flutter client.
@magfal
@magfal Рік тому
By the way your videos are great!
@NoBoilerplate
@NoBoilerplate Рік тому
@@magfal Oh cool! I didn't know that. I hear only good things about Flutter.
@NoBoilerplate
@NoBoilerplate Рік тому
@@magfal Oh thank you so much! I'm learning every day 🙂
@Daveiac
@Daveiac Рік тому
As a rust learner I am always happy to see a new vid from you because I know it'll be worth the watch! Keep up the great content! 👏👏🦀🦀
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much! How is your learning going?
@Daveiac
@Daveiac Рік тому
It's going very well, thanks! I don't have much free time, but when I do I solve programming puzzles with rust. It has been a breath of fresh air after years of enterprise Java. Thanks for taking the time to reply. Good luck with your channel, you are awesome.
@bjugdbjk
@bjugdbjk Рік тому
lov u man .. i am fellow Rustacian !!
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you! Did you check out my other 10 videos in the Rust series? I'm trying to cover in a high-level all the cool features of rust!
@cerulity32k
@cerulity32k Рік тому
Rust's learning curve is about the same learning curve it takes to write safe C++ code on/near the level of Rust, only it's steeper due to the language enforcing safety onto you. You need to know ownership, borrowing, lifetimes, etc. before you can write a sizeable Rust project, while in C++, you need to learn pass by value, reference or pointer, null checking properly, and lifetimes. However, because it's not required, you don't need to do it, making the learning curve for general C++ code much shallower, at the large cost of possibly segfaulting/crashing code.
@KohuGaly
@KohuGaly Рік тому
The way I like to put it is Rust has V-shaped difficulty curve. It's hard to learn, easy to get proficient and hard to fully master. With C++ it's an ever-steepening hill all the way up.
@NoBoilerplate
@NoBoilerplate Рік тому
Ooh, that's very interesting. I think of it like this: In most languages Easy things are Easy, and hard things are possible. In Rust, Easy things are possible, hard things are Easy.
@akiko8102
@akiko8102 Рік тому
Looks like a good written promotion) but honestly, everything you are saying is totally true imo
@NoBoilerplate
@NoBoilerplate Рік тому
I should hope so! I'm certainly making hype videos
@OJeyjunior
@OJeyjunior Рік тому
"what does a developer do?" -- made me waste 5 minutes wondring... found out 90% of my mental stamina goes to waste into dealing with the anxiety of not knowing what I don't know yet but will get me stuck mid project. For I quite enjoy thinking about the problem and the route I will approach it, but I cringe to the thought of everything crashing in front of me
@NoBoilerplate
@NoBoilerplate Рік тому
Developers are paid to think, managers are paid to worry.
@frittex
@frittex Рік тому
Amazing
@tudbut
@tudbut Рік тому
YOO another wonderful video
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you!
@arthurpenndragon6434
@arthurpenndragon6434 Рік тому
As a complete newcomer to low-ish level languages from python who doesn't even know what the use cases for Rust are, is the Rust book still a good place to start, or do I build my beginner level experience elsewhere first? I want to be future-proof, since I hear a lot of buzz about Rust replacing C++ in the years to come.
@NoBoilerplate
@NoBoilerplate Рік тому
You've got a very similar background to me! I'd recommend: - fasterthanli.me/articles/a-half-hour-to-learn-rust (or my video made on this article) - github.com/rust-lang/rustlings and the book. Come ask in #newbie-advice on my discord server, there's a thousand lovely people who can help! (me too!)
@Hohmlec
@Hohmlec Рік тому
Could you guide me for building microservices with rust?
@NoBoilerplate
@NoBoilerplate Рік тому
Come chat to the community on the discord, links in the description!
@kelvinpraises
@kelvinpraises Рік тому
Can someone please explain what the (c) (v) (i) before each language mean in the table at 1:20 sure looks like roman numerals but without context.
@NoBoilerplate
@NoBoilerplate Рік тому
Oh good spot. My guess is Compiled, Interpreted, and ... something else. Check my markdown sourcecode for the link to the paper!
@kelvinpraises
@kelvinpraises Рік тому
​@@NoBoilerplate Thanks! I couldn't find a free version of the paper to check the reference so I did the next sensible thing-pasted each language and a trailing v into Google search and they ended up having virtual machines in common. Java should have been a dead giveaway😄
@NoBoilerplate
@NoBoilerplate Рік тому
@@kelvinpraises Genius!
@TehGettinq
@TehGettinq Рік тому
Anyone knows what's the font used in the examples?
@NoBoilerplate
@NoBoilerplate Рік тому
It's defined in the first line of the source code. (it's FiraCode Nerd Font)
Rust Is Boring
10:37
No Boilerplate
Переглядів 187 тис.
Rust is not a faster horse
11:37
No Boilerplate
Переглядів 314 тис.
Історія загиблого Назара Небожинського
00:54
Суспільне Рівне
Переглядів 995 тис.
Rust makes you feel like a GENIUS
10:48
No Boilerplate
Переглядів 396 тис.
The Truth about Rust/WebAssembly Performance
29:47
Greg Johnston
Переглядів 167 тис.
Rust Data Modelling Without Classes
11:25
No Boilerplate
Переглядів 156 тис.
ADHD: A Left-handed Brain
19:36
No Boilerplate
Переглядів 106 тис.
Hack Your Brain with Polyphasic Sleep
11:02
No Boilerplate
Переглядів 1,2 млн
Rust's Witchcraft
9:18
No Boilerplate
Переглядів 168 тис.
Hack your brain with Obsidian.md
11:53
No Boilerplate
Переглядів 1,8 млн
The Unreasonable Effectiveness Of Plain Text
14:37
No Boilerplate
Переглядів 567 тис.
The Cult of Done: How To Get *Started*
9:10
No Boilerplate
Переглядів 580 тис.
Rust for the impatient
10:43
No Boilerplate
Переглядів 637 тис.