Stop writing Rust

  Переглядів 259,109

No Boilerplate

No Boilerplate

Рік тому

A lightning talk explaining my observations of how in other languages it's easy to START projects, but in rust, it's easy to FINISH them.
If you would like to support what I do, I have set up a patreon here: / noboilerplate Thank you!
Start your Rust journey here: doc.rust-lang.org/stable/book/
Transcripts for all videos here: github.com/0atman/noboilerplate
All corrections are in the pinned ERRATA comment.
CREDITS & PROMO
My name is Tris Oaten and I produce fast, technical videos.
Follow me here / 0atman
If you like sci-fi, I also produce a hopepunk podcast narrated by a little satellite, videos written in Rust! www.lostterminal.com
If urban fantasy is more your thing, I also produce a podcast of modern folktales www.modemprometheus.com

КОМЕНТАРІ: 1 000
@NoBoilerplate
@NoBoilerplate Рік тому
ERRATA - The code at 4:10 is not showing safe concurrency, but normal move semantics. (An example with threads would have been better) - 4:20 the lower line should not have `match` in it, it is supposed to be a straightforward assignment. - 2:48 There IS an exception to the backwards compatibility rule, in Rust Editions, which overlay optional backwards-incompatible fixes on top of the core rust language. HOWEVER you do not have to use these editions, and libraries from different editions work fine: doc.rust-lang.org/edition-guide/editions/index.html
@spicybaguette7706
@spicybaguette7706 Рік тому
4:20 the lower line has match in it, thats not correct syntax right?
@NoBoilerplate
@NoBoilerplate Рік тому
@@spicybaguette7706 Well spotted! Yep, another error slips in, I'll add it to the ERRATA
@xanri7673
@xanri7673 Рік тому
At 4:36, you cannot use methods like `.display()` inside of a formatting parameter.
@Winnetou17
@Winnetou17 Рік тому
@@NoBoilerplate tsk tsk tsk, and you said that you can go outside and play...
@w1keee
@w1keee Рік тому
@@NoBoilerplate you should make testable videos! :D
@jvcmarc
@jvcmarc Рік тому
"they're not abandoned, they're done" is such a powerful expression that more people should think about
@NoBoilerplate
@NoBoilerplate Рік тому
RIGHT? This was such a revelation to me
@SkyyySi
@SkyyySi Рік тому
Thinking about it, it's actually pretty ridiculous that we just sorta... agreed that "not updated" and "abandoned" are the same thing, when they're really not. If I see a project that had no commits and almost no issues or PRs, I just automatically assume that it's dead. Because it's so rare that a library truly is just "done".
@WouterStudioHD
@WouterStudioHD Рік тому
I was scared to find so many crates that look abandoned. It looked as if Rust was being left in the dark. This makes so much more sense…
@yakupturkan300
@yakupturkan300 Рік тому
After npm packages I was having the same idea. "They must be legacy let's see what people use these days"
@eritert
@eritert Рік тому
Yep that would never work in projects using npm lol
@broimnotyourbro
@broimnotyourbro Рік тому
“They’re not abandoned. They’re done.” What a great line. This one statement is the most compelling argument I’ve ever heard for a language.
@NoBoilerplate
@NoBoilerplate Рік тому
Right? This was a huge realisation for me. There must be plenty of abandoned projects,still, that's just human nature, but there's so many clearly DONE projects out there, far more than any other language I've seen!
@RenderingUser
@RenderingUser Рік тому
dude your pfp is making me read your comment sarcastically XD
@trejkaz
@trejkaz Рік тому
@@NoBoilerplate _Especially_ in the corporate world, try teaching management that changing requirements guarantees that a project will never get finished and that we can never move onto new things. And then people wonder why we only sell one application. In my experience, open source projects often get to "done", while corporate stuff is always either "still changing" or "abandoned".
@lememz
@lememz Рік тому
just realized how genius the video title is, I clicked the video expecting: "stop writing rust because it's bad", but it actually means: "stop writing rust because your project is already finished"
@NoBoilerplate
@NoBoilerplate Рік тому
It's a bit clickbaity isn't it. my hands are tied: I will work the yt meta to get rust's popularity up!
@lememz
@lememz Рік тому
@@NoBoilerplate I would say it's the best kind of clickbait, the one that breaks your expectations but in a good way
@rotteegher39
@rotteegher39 Рік тому
@@lememz So true... This video is like an trailer for a Rust as it was a movie
@aventurileluipetre
@aventurileluipetre 7 місяців тому
clickbaits are annoying, but I still risked clicking and now I appreciate Rust more
@pixalquarks4623
@pixalquarks4623 Рік тому
Man rust is really hard to learn. But the only thing that keeps me going are those exact and accurate compiler error messages.
@NoBoilerplate
@NoBoilerplate Рік тому
STAY STRONG FRIEND! You're nearly there, and once you get through to the other side of the initial learning curve, you're gonna have SUCH a superpower!
@pixalquarks4623
@pixalquarks4623 Рік тому
@@NoBoilerplate That superpower is the reason I'm going to stick with it
@NoBoilerplate
@NoBoilerplate Рік тому
@@pixalquarks4623 FANTASTIC!
@pixalquarks4623
@pixalquarks4623 Рік тому
@@dougrudolph5400 Right now, my primary way of learning rust is the book itself. And as you suggest, I'll join the discord channel.
@PeterNjeim
@PeterNjeim Рік тому
@@dougrudolph5400 I use Microsoft Edge's Read Aloud feature, and let the TTS read the Rust Book to me at the fastest speed, which is similar to 2x speed on UKposts. Much better than using lots of bandwidth for a video that I don't even need to watch.
@devinda_me
@devinda_me Рік тому
Rust Lang dev team needs to put this guy on their home page ! I've been combattting JS fatigue by learning Rust cuz of your videos !
@NoBoilerplate
@NoBoilerplate Рік тому
YES! I sure have js fatigue too. Have you seen yew.rs?
@liftingisfun2350
@liftingisfun2350 Рік тому
What's js fatigue? Maybe I have it since I was too lazy to Google it? Lol
@sael40
@sael40 Рік тому
​@@NoBoilerplate have you tried TypeScript with a really annoying (complainy) set of ESLint rules? It'll make a BIG difference in terms of compile-time validation. Not the same as the rust compiler, but it's much better. The problem is convincing your team that is used to plain JavaScript (where you can write anything you'd like and it won't complain and break silently in runtime), that getting tons of compile-time errors is preferable. 😞
@Kiaulen
@Kiaulen Рік тому
@@liftingisfun2350 getting tired of JS's BS. Like needing triple equals, trying to remember which values are falsy, or reason about which of your (required) 10 closures is the one leaking memory constantly.
@sael40
@sael40 Рік тому
​@@Kiaulen if you don't want to remember which values are falsy, don't use them: use strict-boolean-expressions I doubt you need the 10 closures. let ESLint help you: eslint-plugin-no-closure 😉
@geeshta
@geeshta Рік тому
"they're not abandoned, they're done" that's such a foreign thought nowadays but it feels so right! I still need some time processing it though but it feels like a long lost friend.
@NoBoilerplate
@NoBoilerplate Рік тому
I just wanna build new stuff and move on without such a huge maintenance burden!
@flipperiflop
@flipperiflop Рік тому
Yeah, so used to see packages with "last updated 3 years ago", and to think that they have been abandoned and no longer maintained. This notion of "done" feels so damn foreign...
@NoBoilerplate
@NoBoilerplate Рік тому
@@flipperiflop SOME of them must be abandoned, of course, we are but human. However the trend is to finished libraries, which is SO refreshing!
@rusticbear195
@rusticbear195 Рік тому
I'd been thinking about the line "They're not abandoned, they're done" for the entire rest of the video. Looks like everyone else was too. Another great one as always. Thanks
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much! It's an odd realisation!
@HyperFocusMarshmallow
@HyperFocusMarshmallow Рік тому
I can still remember the surprise I felt when writing my first semi advanced rust program in a challenge with pre-made tests and I messed through lots of pieces of code in one go without being careful to unit test and after straightening out a couple of compiler errors it suddenly compiled and passed all tests immediately. It actually just worked. I was really expecting to have to check it in 15 different ways afterwards. Nope. And it was a type of program that I had never written before in a domain that was outside of my comfort zone. It made me feel like a genius. I’m not btw.
@NoBoilerplate
@NoBoilerplate Рік тому
YES! I literally wrote a video called "Rust makes you feel like a Genius" to try to explain this feeling!
@HyperFocusMarshmallow
@HyperFocusMarshmallow Рік тому
@@NoBoilerplate Yup, my comment is inspired by that =) but the experience was real. I felt more surprised actually but your words describe it better.
@NoBoilerplate
@NoBoilerplate Рік тому
@@HyperFocusMarshmallow What a wonderful world!
@tylerbloom4830
@tylerbloom4830 Рік тому
Rust does help you finish projects!!! I recently finished a port of a Python project to Rust. As I was writing the Python code, it was becoming legacy code because I was too scared to mess with it. So many things could go wrong, and it felt like the language was gleefully handing me footguns. With Rust, the project is expanding and growing far more than I could have dreamed. I don't have to work in fear of the code I've already written.
@NoBoilerplate
@NoBoilerplate Рік тому
That's such a good way of explain it. I'm so FEARFUL of code written in other languages!
@lqlaliut897
@lqlaliut897 Рік тому
Man that is something I have been facing off late in my python projects. I always try to complete my Python projects only to come back to them due to errors every now and then. With this revelation on Rust code, I am certainly switching over to rust, just so that I can breathe easy on the code I have completed.
@tylerbloom4830
@tylerbloom4830 Рік тому
@@lqlaliut897 This is 100% the thing that I love most about Rust. Because the language gives you an abundance of great tools to avoid problems, it makes just the code you write but the code you import SOO much less nerve-wracking. Consider Rust's Option enum. There isn't anything too special about it. You can make a decent spoof of it in most languages, and that spoof would help you avoid errors... in your code. The tools that the Rust ecosystem gives are ease, ubiquity, and safety. In most languages, the first two are wholly separate from the last one.
@kelvinpraises
@kelvinpraises Рік тому
"They are not abandoned they are done" man that's a whole other level!
@NoBoilerplate
@NoBoilerplate Рік тому
It's pretty special.
@neilfisher5593
@neilfisher5593 Рік тому
It's astonishing that you've replied to almost all 459 comments on this video. Thanks for making these, I have been wanting to learn rust for a long time but never got around do doing it. Watching these videos makes me confident that I can write some great Rust code in the future!
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you! Well the commentators are nearly all SO nice (after I ban all the transphobes, why are they even here?!). Rust has a tough learning curve, I am writing these videos to give people the motivation to keep going!
@ladyViviaen
@ladyViviaen Рік тому
@@NoBoilerplate it may be 3 months later but i just want to say that you banning transphobes from the comments is so amazing and that i and many others appreciate you for creating a safe space on such a saturated platform!
@NoBoilerplate
@NoBoilerplate Рік тому
​@@ladyViviaen It's a challenge every day, I'm sad to say, but it's one I rise to with infinite energy. It's much easier on the NB discord (discord.gg/mCY2bBmDKZ) I have a great team of volunteer mods covering all time zones and a healthy banlist of stupid words, be lovely to see you there!
@bram_dingelstad
@bram_dingelstad Рік тому
Absolutely love these videos, as a gamedev I've been struggling to add Rust to my arsenal for low-latency problems, but these videos have inspired me to take it on again. If I ever use some of those skills for a commercial game, i'll be sure to credit you ;)
@NoBoilerplate
@NoBoilerplate Рік тому
You are too kind - we all owe our teachers much! I'm so glad to have inspired you - that's my goal here. Rust is SO HARD to get started with, but if you just push through the few unfamiliar topics there's a GOLDMINE of great features for us!
@zweitekonto9654
@zweitekonto9654 Рік тому
Plot twist: hes actually the lead creater of rust and is using a voice change
@NoBoilerplate
@NoBoilerplate Рік тому
@@zweitekonto9654 I wish! I'm just an idiot who doesn't really know Rust, trying to stay one lesson ahead of his students :-D
@BigYoshi826
@BigYoshi826 Рік тому
I've heard Rust is terrible for game development
@Speykious
@Speykious Рік тому
@@BigYoshi826 it is if you keep an object oriented approach. Rust is better suited for data-oriented programming and ECS, which are great paradigms for game development (Unity uses ECS for instance).
@thestemgamer3346
@thestemgamer3346 Рік тому
Rust feels like the proper love child of Haskell and C. Both share a lot of similarities at a language level. Traits are just TypeClasses, ? emulates a monad, the pattern matching is and let bindings are textbook Haskell. Some of the main benefits of Rust definitely outweigh Haskell. Rust is much faster than Haskell, and it's documentation and package management is extensive and way better than whatever cabal is trying to be. That said, at a programmer level, Haskell is still better in a lot of ways. It has higher kinded types, which allows for even more expressive and composable code. Haskell allows you to define infix operators and has a built in way to build monads. It also just feels good to write. Although Rust also feels wayy better than any other language. I will always prefer Rust over anything else, however to me, Haskell is still my personal favorite language. Would be cool to see if Rust's type system adapts to support HKTs and maybe some language extensions.
@lophyre1380
@lophyre1380 Рік тому
The crossover!
@NoBoilerplate
@NoBoilerplate Рік тому
Totally agree, my research in 2020 put Haskell Go and Rust neck-and-neck for what I was looking for. Haskell and Rust have better type systems, Go and Rust are more popular... I split the difference and now we're here!
@thestemgamer3346
@thestemgamer3346 Рік тому
@@NoBoilerplate I'd rather write Rust in production than Haskell, but Haskell is still my favorite. There are definitely opportunities for both, I am glad we're at a point where the choice doesn't always feel like Java vs. C++ vs. JavaScript
@Virbox
@Virbox Рік тому
I knew you watch this channel haha!
@NoBoilerplate
@NoBoilerplate Рік тому
@@thestemgamer3346 Agreed, we're in a very exciting time!
@samjingwen
@samjingwen Рік тому
“Talk to your local data scientists to learn more” 😂😂😂
@NoBoilerplate
@NoBoilerplate Рік тому
I'm super excited to use Julia for my next data science project!
@itellyouforfree7238
@itellyouforfree7238 Рік тому
@@NoBoilerplate nowadays i only use rust and julia for my new projects. they complement each other very well. surprisingly, on several aspects julia is quite the opposite of rust, for instance safety. julia always gives you the feeling that things could go horribly wrong in unanticipated ways
@BosonCollider
@BosonCollider Рік тому
@@itellyouforfree7238 Yes. Julia is the language of ultimate freedom. Other than being memory safe by default via GC, it really gives you no tools to constrain yourself. It has a very elaborate type system, but it is primarily there for expressiveness, not safety. Also, Julia programs tend to be so generic by default that it is boring and routine to use a library for usecases it was not designed for, and for whatever reason it seems to all work. It's basically the opposite of Rust in terms of mentality, and yet both are amazing languages to work with.
@iamwithinyourhome
@iamwithinyourhome Рік тому
it’s so interesting to watch these Rust videos made by someone who started as a Python dev, meanwhile I’m a C dev who’s just here thinking “yeah i wouldn’t mind less segfaults”
@NoBoilerplate
@NoBoilerplate Рік тому
I find it wild that you can reasonably (perhaps even easily) wrote code that has no runtime crashes
@Virbox
@Virbox Рік тому
I don't know why, but videos like this make Rust similar to the religion, where you talk about the *end of the **-world-** code* (segfaults, legacy code etc.) and the *rescue* (but only Rustaceans will be saved)
@ronaldweasly561
@ronaldweasly561 Рік тому
Video maker gets rust erection
@NoBoilerplate
@NoBoilerplate Рік тому
That feeling of my soul being saved is the same as the feeling of not getting paged at 4am by another nullpointerexception XD
@laundmo
@laundmo Рік тому
I don't think that's bad. Its marketing, not paid advertisement but still similar in goal. its kinda needed for something to be successful, imo.
@nishanth6403
@nishanth6403 Рік тому
"EnD oF tHe CoDe" Man u people sure like to blow out of proportion the dangers of writing in C inorder to see your favourite prog lang gain momentum. And no, legacy code isn't going to be replaced even if it's rewritten several times. The very creation (and rather quick popularity?) of Zig reminds and enforces that current software has to adapt to existing written drivers and apis (zig's intended, almost C++ level compatibility with C) rather than go crazy about rewriting everything (a solid portion of the rust coderbase).
@Virbox
@Virbox Рік тому
@@nishanth6403 I don't even code Rust by now, but later if I will choose a new lang, I will prefer Rust over Zig (really, who uses Zig?) And while C++ will stay for next 50+ years, you can use Rust for your projects - what's the problem here?
@ipajewski
@ipajewski Рік тому
As mechanical engineer, may I offer a small point of criticism regarding your analogy? While I appreciate what you are trying to say, once you look 'under the hood', you'll find the Royal Albert Bridge hasn't simply been 'complete' for over 150 years. From Wikipedia, the track gauge has been changed, extra reinforcements have been added at multiple times, and my favorite: "In 2011 Network Rail began a three-year £10 million refurbishment involving replacing 50,000 bolts". This doesn't include the regular cleaning and painting that are required to keep corrosion at bay. It stands today because we've decided it's a cool enough thing to be worth the time and investment to keep it around. All mechanical systems will fail over time without regular maintenance, either catastrophically or just being unable to perform their function anymore. In essence, you might say they are NEVER finished until they aren't used anymore. This may not quite convey your message the way you think it should.😉
@NoBoilerplate
@NoBoilerplate Рік тому
You're right! My example was a bit contrived really...
@Gelo2000origami
@Gelo2000origami Рік тому
@@NoBoilerplate maybe something like the Egyptian or Latin American pyramids would've worked better
@NoBoilerplate
@NoBoilerplate Рік тому
@@Gelo2000origami Shame they're not made of metal that would rust XD
@after_alec
@after_alec Рік тому
Just to refute the first point about Pick Three, if fast means “get done fast” instead of “runs fast” - I do think this is a trade off of Rust; it takes more time on balance against other languages to write but is more complete/reliable (and runs faster) as the benefit of the tradeoff
@NoBoilerplate
@NoBoilerplate Рік тому
Good point Alec, when people talk about Fast, they mean runtime speed, rather than development speed. And while Rust is ABSOLUTELY a tougher language to learn than other popular languages, I find once you've gotten over that initial hurdle, you can be WILDLY productive in Rust. For me "get done fast" doesn't mean "get SOMETHING done fast" It's "Get exactly what I wanted done fast", and no surprises in production or scaling.
@dorktales254
@dorktales254 Рік тому
I think it's usually way easier to manage a large rust codebase than most fast(to write) languages. Sure it takes longer to get proped up, but a solid foundation takes time anyway
@NoBoilerplate
@NoBoilerplate Рік тому
@@dorktales254 This is my take too.
@leddoo
@leddoo Рік тому
> I find once you've gotten over that initial hurdle, you can be WILDLY productive in Rust this is not my experience *at all*, but i also mainly do "experimental" projects. meaning i change my mind a lot while writing the code, so i need very high flexibility. and rust is not all that flexible - by design, that's how you get reliability. > Sure it takes longer to get proped up, but a solid foundation takes time anyway (oops, i read that as "takes time away [in the long run]", but the exploration before foundation point still applies) yeah that makes sense, but why not use something more flexible to figure out what that foundation should look like? (unless you already know that) for me, prototyping comes before building a solid foundation.
@NoBoilerplate
@NoBoilerplate Рік тому
@@leddoo Very good points. For very malleable code, I'm getting more and more interested in Julia these days
@ericng8807
@ericng8807 Рік тому
Great video as always! This channel hits the perfect sweetspot between not going too in-depth (Jon Gjengset comes to mind) but also not so high-level where the content is too vague to be useful (avg tech influencer who don't program much). I primarily use python so most people I know are using dynamic languages as well, and it's sometimes hard to explain why I put time into Rust despite not rlly using it on the job. Altho mostly unintentional but Rust really does seem like this gated community sometimes due to the upfront difficulty and I just happened to be one of the lucky ones to find someone willing to provide 1:1 mentorship to get me past the rough parts. Your videos do a great job at explaining why the upfront difficulty is worth overcoming
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much. You're exactly right: Rust is hard, but it is VERY ATTAINABLE if you have the right motivation (or mentor!). Love Jon Gjengset, I watch all his talks.
@CunningBard
@CunningBard Рік тому
I thought the guy who told me to write in rust just told me to stop writing rust, he's actually just telling me to touch grass
@NoBoilerplate
@NoBoilerplate Рік тому
Congratulations for being the first person to make this connection! An early draft title of this video was 'Touch gRust'. But I changed that as extremely dumb XD
@a097f7g
@a097f7g Рік тому
Loved it, thank you! Did not quite get your jump from prototyping in a REPL to "conversations with the compiler", though. Both seem like very different things? Would be cool to see you potentially elaborate on this in a future video.
@NoBoilerplate
@NoBoilerplate Рік тому
They're both examples of fast feedback mechanisms, which allow you to prototype quickly. One requires constant observation of output (repl) the other constant feedback from the compiler (rust). I do love both!
@leddoo
@leddoo Рік тому
> Both seem like very different things? i would agree. working with a live program (repl) means you can add code to the program *while it is running*, no matter what weird, messed up state it is in. the closest thing to that would be fast compile times. but when you recompile, you have to stop the program, so you lose the state and have to reproduce it (which can be tricky and/or repetitive/annoying). compile errors are a completely different tool. they let you check if your code is (somewhat) consistent, before running it. but compilers are conservative, meaning they reject some valid programs. the stricter the language (rust is pretty strict), the harder it is to write code that compiles. and that obviously makes it harder to prototype. a common counter argument is that "if it compiles, it is correct", implying that without the type cheker your program would crash. but that's simply not true due to the conservative nature of type checkers. one of the primary reasons it is hard to write rust code is the borrow checker and ownership semantics. they solve at compile time what a garbage collector solves at runtime (roughly). so if you used a managed language, almost all of those errors *wouldn't actually be errors*. i'd very much advise against using rust for prototyping. i've messed around with creating an animation tool. my initial rust "prototype" took almost a week to write and was ~1000 loc. i then ported that to lua in about a day and it shrunk to 300 lines. yes, the lua version protects against fewer errors, but that's not the point of prototyping. you don't want things that are super robust, you want to sketch out the idea and do that quickly. writing rust code is simply slower than writing lua code. and that's good, because rust catches more errors at compile time, so you can write more robust code. my main problem with this channel's presentation of rust is the "use rust for all the things" attitude. rust is a tool, and it is good for writing fast and reliable software. it is not that great for messing around.
@NoBoilerplate
@NoBoilerplate Рік тому
​@@leddoo This is a very reasonable, and common, take. I should explain more in a whole video, but here's the gist of what I mean: If you have already mapped out the state/environment of your app, you can have a really rich conversation with the compiler that FEELS like fast experimentation. How do you get to that initial state? You use a framework, rather than building from the ground up: crates.io/crates/aws-sdk-rust crates.io/crates/windows crates.io/crates/rocket These crates are three examples of these: If you are building a Lambda in AWS that takes data from S3, parses it, and puts it onto a kinesis stream, you can prototype that inside a pre-written environment. If you're writing windows apps interacting with the windows system apis, you can use the windows crate to guarantee your data is in the right format, and if you're presenting data to the user in a web browser, Rocket will enforce that you are returning valid json inside valid requests. From this point forward, it is up to you to tell rust the state of the world, build the valid states of your program, and transform state using functions - the compiler can only help you if you tell it how the world works.
@elliotalderson7823
@elliotalderson7823 Рік тому
This is one of the most underrated programming channels. Your videos are so clear, so dedicating, so inspiring. Thank you for your work!
@NoBoilerplate
@NoBoilerplate Рік тому
You're very kind! I worry about painting myself into a box - I have more to talk about than just programming, that's why I say "fast, technical videos" because at some point I'm gonna talk about OTHER STUFF!
@elliotalderson7823
@elliotalderson7823 Рік тому
@@NoBoilerplate Then I'm definitely looking forward to your videos about other topics if you are going to present them like these!
@NoBoilerplate
@NoBoilerplate Рік тому
@@elliotalderson7823 That's great to hear! Yes, this is very much my style: Fast, technical videos with text on screen where needed, and very little on screen if not.
@GavinFreeborn
@GavinFreeborn Рік тому
Was pretty impressed when you actually mentioned lisps. I'm a pretty big lisp fan but also have a soft spot for languages with powerful type systems. Rare to hear people in communities lust rust actually knowing anything about lisp other than parentheses.
@NoBoilerplate
@NoBoilerplate Рік тому
My lisp opinions are well documented - I worked as a clojure developer in a startup bank for 2 years, 5 years ago, and you can find one of my old videos loving the language. I've also spoken at ClojureX here in London. HOWEVER as you can tell, my new love is Rust, not just because of the expression-based language or macros, but because they've brought these things I love into a language that doesn't feel too unfamiliar with regular developers. I'll always have a soft spot for Lisp (I'm playing with janet-lang.org at the moment) but for getting work done, I choose Rust. Oh, also I can choose both crates.io/crates/macro_lisp
@mrjack08722
@mrjack08722 Рік тому
"They're not abandoned, they're done" Honestly i didnt even know that was a possibility.
@NoBoilerplate
@NoBoilerplate Рік тому
This is a huge deal right?
@SimGunther
@SimGunther Рік тому
On the topic of fast prototyping, Bret Victor has lots of talks about interactive development in which there is a bidirectional relationship between code/sliders and the program itself changing in REAL TIME. In all my years listening to programming talks, I had never heard such an audible gasp since Victor's talk on "Inventing on Principle". No wonder spreadsheet programming is still cited as one of the most important innovations in computer science history even after the concept had been introduced in the 1970s with Visicalc! Kato/Goto's work on Live Tuning and the K semantic framework are also worth checking out for this sort of "future in programming" that we keep craving, but continue to miss for some reason.
@NoBoilerplate
@NoBoilerplate Рік тому
That's extremely cool! Have you seen the Eve programming language? Reactive realtime programming there, too.
@SimGunther
@SimGunther Рік тому
@@NoBoilerplate I've looked at Eve a while back, but it has not under active development for a few years now. Love to see some practical examples of enterprise/game software written in Eve that isn't vaporware or toy examples ;)
@NoBoilerplate
@NoBoilerplate Рік тому
@@SimGunther Yeah, it FELT like it was going to be vaporware :-/
@kellybmackenzie
@kellybmackenzie Рік тому
This is AWESOME. I love this. I'm a CS student and C# and Javascript are my main languages right now, but I already know what I'm gonna be learning next. Thank you so much, this is so good!!
@NoBoilerplate
@NoBoilerplate Рік тому
My pleasure! Do watch my other videos for more details on Rust's incredible features - you'll need this excitement to climb the steeper learning curve than either C# or JS. But I hope you will agree that it is worth it! Do read everything here fasterthanli.me/articles/a-half-hour-to-learn-rust
@yashashav_dk3766
@yashashav_dk3766 Рік тому
You never cease to make me smile! Thank you!
@NoBoilerplate
@NoBoilerplate Рік тому
You're too kind! New video next week (It's about LIGHTSABERS, don't tell anyone)
@JeffHykin
@JeffHykin Рік тому
Agreed, and this is why we should be skeptical of crates with system dependencies. They can easily, so easily, carry baggage that prevents projects from ever being done. I think the golden "Done not abandoned" can only be given to Rust projects that use nixpkgs (or something as good as nixpkgs) to handle the dependencies.
@joey199412
@joey199412 Рік тому
Greatest argument I've heard yet in favor of Rust over languages like C/C++ at 3:10 "Code you build today benefits from all future optimizations that the rust toolchain will receive without you having to change the code". Everyone that has been long enough in C/C++ development knows that compilers in 2022 will compile your 20 year old code WORSE now compared to back then because the compiler is optimized for newer features which the old language standard didn't have. Rust can be the very first language where old code actually gets to run faster with time as the toolchain develops due to their stance on absolute backwards compatibility.
@NoBoilerplate
@NoBoilerplate Рік тому
That's a really great insight!
@kyrylmelekhin2667
@kyrylmelekhin2667 Рік тому
nonsense
@kebien6020
@kebien6020 Рік тому
What? One of the selling points of C++11 was that your old code would run faster without modifications due to move semantics. As in, code that returned a string potentially compiled to copying the string data to a new allocation and then destroying the old string, deallocating the old data, whereas with move semantics, the code is at least guaranteed to compile to a move, where the pointer to the data is the only thing that's copied over and the destruction is a no-op. That is, until C++17 where guaranteed copy elision will omit even that, given the right conditions. If you do have an example of code that compiles to worse assembly in a more recent compiler, please do show the compiler authors that example with the benchmarks, as that is a compiler bug.
@askeladden450
@askeladden450 Рік тому
I don't think I understand this properly. isn't that also an argument AGAINST rust? instead of prioritizing new code, you are prioritizing code written a decade ago?
@MAP233224
@MAP233224 Рік тому
That makes no sense. Go to godbolt right now to check how GCC and Clang have evolved, play with the optimization flags, etc. You pretty much only get improvements, no regressions, from newer versions.
@evangelosspyromilios5994
@evangelosspyromilios5994 24 дні тому
It would be so obvious to say that I enjoy your videos and actually learn from them (I just learn rust on my ‘free’ time) but what I also much appreciate is that little blue line at the bottom feels like you actually respect my time. I know it’s just a visualization but still, thank you!
@AminD0
@AminD0 Рік тому
Love the content as always. Keep up the good work! Your voice is so soothing. Idk but you sound like the narrator from "Headspace" app.
@NoBoilerplate
@NoBoilerplate Рік тому
That actually makes sense because I produce a scifi mental health podcast called Lost Terminal, you might like it! ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@rafaeldeconde8148
@rafaeldeconde8148 Рік тому
I gotta be honest, I gave Rust a shot because of your videos, I just want to congratulate you, this is gold work!! I personally think you oversell the language a bit, but it's in a health way. but you surely have a talent for presentation. Rust is trully an intriguing language, the design choices of the language made me think again about the concepts of programming. TBH, I think that getting away from OOP was a good choice, it usually makes things overwhelming. BTW, do you plan on making Rust tutorials? OMG, I just saw that you got a Oxiding little crab beside your GitHub profile picture, how did you do it? I want it too!!!(I think I got it, it's the status, right? I've never seen the GitHub Status before hahahaha)
@NoBoilerplate
@NoBoilerplate Рік тому
STALKER! (kidding!) Yeah, it's a status, you can chose any emoji there too! SO pleased there's no OOP in Rust, I think we're starting to realise that OOP isn't the silver bullet it seemed in the 90s! Have you followed the official book? How about Rust by Example?
@Ma1ne2
@Ma1ne2 Рік тому
I am very new to Rust and for a university project I had to do, I wrote a mutlithreaded UDP Server that accepts values and sends them to a http server to be displayed in a vue Frontend. I wrote 3 UDP Servers running in 3 sockets concurrently, and when I was done, it just worked! Flawlessly! I was so amazed! So yeah, fearless concurrency, I can 100% agree!
@NoBoilerplate
@NoBoilerplate Рік тому
Fantastic! I remember having to do that exact same exercise in C in 2005 IT WAS SO HARD!
@NithinJune
@NithinJune Рік тому
I love how your video background *exacly* matches the color of youtube web dark theme. I haven’t seen anyone else do it, and I really like it.
@NoBoilerplate
@NoBoilerplate Рік тому
Though that was an accident in the first video, I'm keeping it! Dark mode everywhere!
@fabyao
@fabyao Рік тому
Great content! You have articulated the Rust philosophy with compiling demonstrations. Thank you!
@NoBoilerplate
@NoBoilerplate Рік тому
My pleasure! I'm still learning Rust, so every video I hope gets better and better! I'm up to video 14ish now, have you seen the playlist? ukposts.info/have/v-deo/oZaSgKFsrWmImmQ.html Would love your thoughts if you check out more :-)
@inomo
@inomo Рік тому
How exactly is compiler experimentation a substitute of the repl? Could you make a video with a detailed example?
@NoBoilerplate
@NoBoilerplate Рік тому
I sure could, that's a great topic. The trick is to build up your state first. Build a rich hierarchy of structs modelling the initial state of your application. Then build the final state. Then whatever states need to be in between. Now when you write the functions to move between those states, the compiler knows more than you do about how to get there! Though Fred Brooks was talking about databases, I think it applies to Rust: "Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowcharts; they'll be obvious."
@Elliot.2591
@Elliot.2591 Рік тому
Saw this title and thought "well this just contradicts everything you've taught me"
@NoBoilerplate
@NoBoilerplate Рік тому
IKR. How was the video for you?
@emoutraspalavras-marloncou4459
@emoutraspalavras-marloncou4459 Рік тому
It is so beautiful and inspiring that I am about to cry:) thank you so much!
@NoBoilerplate
@NoBoilerplate Рік тому
I'm so glad!
@Zihad
@Zihad Рік тому
I'm new to Rust and I was wondering why many crates haven't been updated in a long time, now I see why, thanks! Can't wait for the video on lifetime superpowers 😄
@NoBoilerplate
@NoBoilerplate Рік тому
oof! I'm on it, but that's a tough video for me to write. I'm learning so much! Soon though!
@eZU4nQsWN9pAGsU38aHj
@eZU4nQsWN9pAGsU38aHj Рік тому
Its also what I love about Elm. If it works it works. It doesn’t matter if it hadn’t been updated for two years
@NoBoilerplate
@NoBoilerplate Рік тому
Such a good feature right? So relaxing 😁
@LastExceed
@LastExceed Рік тому
as much as i love these videos, i cant help but giggle every time i hear someone literally called "no boilerplate" start all his videos with a boilerplate intro
@NoBoilerplate
@NoBoilerplate Рік тому
HEY HEY WHAT'S POPPING IT'S ME YA BOI NO BOILERPLATE BACK AT IT AGAIN WITH ANOTHER VIDEO ABOUT HOW JAVASCRIPT SUUUUUUUCKS! DON'T FORGET TO SMASH LIKE, SUBSCRIBE, RING THE BELL AND LEAVE A COMMENT BUT BEFORE WE START HERE'S SQUARESPACE
@NoBoilerplate
@NoBoilerplate Рік тому
I shouldn't make these jokes I would love squarespace money. Squarespace, if you are reading this call me
@LastExceed
@LastExceed Рік тому
lmao
@gaiusjuliuscaesar9296
@gaiusjuliuscaesar9296 Рік тому
Your channel has inspired me to learn Rust. I am enjoying the book so far, it is very well-written and comprehensive
@NoBoilerplate
@NoBoilerplate Рік тому
Well done! It's a great book isn't it? Very thoughtfully written. I also love Rust By Example, you can read them both simultaneously, they're written in a similar order, so bounce between them if you like. Also check out fasterthanli.me for incredible articles on Rust.
@gaiusjuliuscaesar9296
@gaiusjuliuscaesar9296 Рік тому
@@NoBoilerplate thanks for the extra resources!
@NoBoilerplate
@NoBoilerplate Рік тому
@@gaiusjuliuscaesar9296 GOOD LUCK!
@anj000
@anj000 Рік тому
Ok, I'm not even 1/4 into the video and I'm sold. I've heard about rust many times. That it is safe, it is fast etc. But in none of this occasions I really appreciated it and considered learning it. Well done. And I'm not commenting well done on a youtube video very often.
@NoBoilerplate
@NoBoilerplate Рік тому
You're too kind. Do check my other videos for more exciting Rust features, but this one is my favourite - it's like the language and community care about not paging me at 4am!
@troglodytto
@troglodytto Рік тому
The more I learn about Rust, the more I feel like it is literally, the most perfect language ever. Never have I ever, seen such a beautiful piece of art P.S Please add this video to the Rust Playlist (Thanx)
@NoBoilerplate
@NoBoilerplate Рік тому
Woops! Added, thank you!
@SolomonUcko
@SolomonUcko Рік тому
I feel like there are some small design decisions I disagree with, such as the design of range types around iteration and copying and many parts of the async internals, but overall it gets most things, especially the important things, right, and nothing else comes close on more than a small subset of things. Not perfect, but most perfect, as you said.
@NoBoilerplate
@NoBoilerplate Рік тому
@@SolomonUcko yeah, doesn't have to be perfect to be perfect for me
@Fusselwurmify
@Fusselwurmify Рік тому
"they're not abandoned, they're done" - mind blown
@NoBoilerplate
@NoBoilerplate Рік тому
It's a big realisation
@crowlsyong
@crowlsyong Рік тому
I like that you use the same dark color as youtube dark mode. Super clean look.
@NoBoilerplate
@NoBoilerplate Рік тому
This guys gets it
@JoniniTheChickenNugget
@JoniniTheChickenNugget Місяць тому
The last train analogy really hits it home, rust is like get a bespoke pair of scissors that last generations instead of a plastic pair that breaks in 4 years
@changelingpovs
@changelingpovs Рік тому
i wrote a kubernetes operator in rust at work. it's working flawlessly so there's no need to continue working on it beyond keeping dependencies up to date. i guess i'm done writing rust
@NoBoilerplate
@NoBoilerplate Рік тому
Works really nicely for aws Lambdas, too.
@ruthlessadmin
@ruthlessadmin Рік тому
Fairly compelling video. Definitely going to check it out now. Mostly unrelated: I feel like the performance figure for Python is a little exaggerated. Unless you're overusing/abusing convenience features and/or not taking proper advantage of libraries written in C, it should not be that much slower than C. Certainly still one of the slowest, but not that bad, in my experience.
@NoBoilerplate
@NoBoilerplate Рік тому
Agree, I've primarily written python for 15 years and the performance is "good enough". However that figure is based on a pure single threaded numerical benchmark (check the sourcecode for link) If we compared concurrent programming, Python's benchmarks fall of a cliff (I've seen 300x slower than C) due to the GIL.
@dinodubin9241
@dinodubin9241 Рік тому
i heared about rust in 2018 when my highschool teacher told me to give it a look because he saw i had great interest in c and c++, i was still learning how object oriented and in general programing worked so i didnt give it much thought. Now, a few years later i remembered the talk we had, i decided to stay up a bit later than usual, skipping one class in uni to check out rust and see how interesting and fun it can be, and boy oh boy, i was not prepared for the amount of awesome that had hit me, im addicted and i apsolutelly love it, i havent felt this good about programing in a long while and i dont know why
@NoBoilerplate
@NoBoilerplate Рік тому
Welcome to the cargo cult! Make sure you know about: - The Rust Book - Rustlings - Rust By Example - Fasterthanli.me - (also all my videos!)
@dinodubin9241
@dinodubin9241 Рік тому
@@NoBoilerplate thanks a lot
@mithradates
@mithradates Рік тому
I love how we started out with speed and safety and fearless concurrency and all the rest, and only then started looking at the various nice things that make it a better first experience for the new user. Non-lexical lifetimes were the first big example of this type that I can remember and now for 1.63 we're on the verge of a bunch of new things like Mutex/RwLock made in const contexts (ergo less reliance on lazy_static and OnceCell) and scoped threads. And of course compiler speed. Add to that a steadily growing user population and in a few short years I think we won't hear much of Rust's famed difficulty anymore.
@NoBoilerplate
@NoBoilerplate Рік тому
Totally agree. I think we're at the tipping point. Rust's only getting faster and easier to use. Time to get on the train!
@skrux9707
@skrux9707 Рік тому
I've been recently learning Rust and I love its strictness, it's a really beautiful thing. I came from Python and I always felt like I wasn't really able to learn the language because of how open it was (if that makes sense), was I using the code in the most efficient way? I love learning why Rust is fast and efficient, and having that be a rule when writing code.
@NoBoilerplate
@NoBoilerplate Рік тому
I've come from from Python too - it's a breath of fresh air!
@Cyklanlps
@Cyklanlps Рік тому
I haven't even started writing Rust, so I guess the title says I won't ever do it /s
@NoBoilerplate
@NoBoilerplate Рік тому
Oh you should totally try it! It's dead easy to get started, head over to rustup.rs and install with one line!
@galitan5881
@galitan5881 Рік тому
I loved this video soooooo much ! Great job !
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you!
@doktork3406
@doktork3406 Рік тому
I may be 2 weeks late but it's fine, i have to say i'm convinced. I'm a beginner, heard of rust, never really paid any attention to it, got some spare time i could spend learning more outside of what i learn for work, i'm going to pick rust up as i go. To any who are in a similar position, i found it works best if you have something to do on the spot with a new skill (this reinforces your learning and gives you incentive via immediate returns on investment). What i've always done is: i had an idea about a thing i wanted to do (be it software or hardware) and i went ahead and did it using the brand new skills i'm trying to acquire. Nothing fancy, just a couple of progressively more interesting, complicated and useful tools for myself, over a period of time. My first go at this was C#; i was clueless and decided i'm going to try and apply the aforementioned steps. I wanted a simple desktop application that would be a resource monitor and task manager. Did it. Then i wanted a database viewer, did it too. If you're having trouble sticking to learning new skills, give yourself work that would actually bring you utility and/or enjoyment.
@NoBoilerplate
@NoBoilerplate Рік тому
Exactly! I've hear people call this "scratching your own itch". No need to guess what your user will want if you are your first user!
@blinded6502
@blinded6502 Рік тому
And I like writing in BeefLang. It doesn't punish you when you take "shortcuts". It instead focuses on helping you write and debug code with ease. It was also partly inspired by Rust.
@NoBoilerplate
@NoBoilerplate Рік тому
Wow, a language I'd never heard of! How fun! It seems to be very windows-focussed for now, but I'm always happy to learn about new languages. It looks a lot like C# or Java, what does it do differently? It's important to learn new fun languages, but do keep popularity in mind, its a real force in building a team or googleing for solutions to problems, which is why I'm so excited about Rust - it's got all these unique features AND is popular! redmonk.com/sogrady/2022/03/28/language-rankings-1-22/
@blinded6502
@blinded6502 Рік тому
@@NoBoilerplate Unlike them, it doesn't have garbage collection. It instead has a (very!!) good leak detection, and it allows you to easily declare destructors for both classes and class fields. Beef's syntax mostly looks like C#, but it's shorter and more concise than that. Constructors are declared with "this" instead of the typename. "new" keyword is only used for allocating reference types onto heap (be it class, pointer, or delegate). "scope" keyword allocates references on the stack. You can declare variable either by typing "vec a = vec(1,2,3)", or "var a = vec(1,2,3)", or "let a = vec(1,2,3)" (makes it const/readonly), or "vec a = .(1,2,3)". That last syntax also works when passing arguments into functions, or when doing typecasts ("(.)" operator). There is also an operator ".." for chaining methods together or for overriding function return with argument that was passed in. Metaprogramming is done via file generators, custom attributes and generics. And there's a ton more stuff like that in there. Including few concepts borrowed from Rust, like Result, or Span. And one of the more important features with Beef, is that it has a good interop with C. Overall, I'm in love with this language, even if it's not widely known. I wish that Rust had similar syntax clarity and naming conventions.
@NoBoilerplate
@NoBoilerplate Рік тому
@@blinded6502 How fun!
@Welank
@Welank Рік тому
Interesting video! I haven't written any Rust yet, but it does have a reputation of being hard to finish large projects in online. It is interesting to hear the opposite take.
@NoBoilerplate
@NoBoilerplate Рік тому
Fascinating! I did not know that. Where could I read about this?
@Welank
@Welank Рік тому
@@NoBoilerplate There was a lot of debate on the pros/cons of Rust, especially 2-3 years ago, on Hacker News and Lobsters. One project that blames Rust for its failure to finish was wlroots-rs. Look up the blog post entitled "Giving up on wlroots-rs" for more details. (Sorry if this comment is a repeat, I included a url in the first comment and now I don't see it, so it might have been flagged. I don't comment on UKposts often, so I am not sure.)
@NoBoilerplate
@NoBoilerplate Рік тому
@@Welank How interesting! That was before my time, I picked up Rust in 2020. I wonder if those problems exist today? Certainly, we've seen an explosion of big projects written in Rust.
@gangov
@gangov Рік тому
lol, that spin at the end, love it
@NoBoilerplate
@NoBoilerplate Рік тому
It's a dumb example, but hit me!
@MrJozefleo
@MrJozefleo Рік тому
Hey! Just wanted to say thanks for these videos, they have been great to watch on my rust journey!! Also Modem Prometheus slaps, it’s so good!!
@NoBoilerplate
@NoBoilerplate Рік тому
Oh thank you so much! x2! I'm delighted to help you in a small way in your Rust journey - Rust's not the most familiar language, and folks need excitement to get through the learning experience! Modem Prometheus is so exciting, We've got big plans for it this year! A little peak behind the screen: We recorded the first episode of Season 2 last week! It's HORRIFYING! You'll LOVE IT!
@mergenstudios8779
@mergenstudios8779 Рік тому
havent watched the video yet but the title seems promising
@NoBoilerplate
@NoBoilerplate Рік тому
It's a bit UKpostsY but I really do love Rust because I can finish projects!
@alexzander__6334
@alexzander__6334 Рік тому
cant wait for the ABI to be stable and to make dynamic linked libraries to use with rust binaries to make the binary size smaller.
@NoBoilerplate
@NoBoilerplate Рік тому
What's the advantage of the established ABI? I come from a high-level language background, so this is all new to me! In my opinion the binary size is already small enough. If you've just been reading old articles, you might not have realised this. A Hello World debug binary is 3.7MB, but with just 5 optimisation feature flags in Cargo.toml, I just built a 271kB binary without even trying. If I try harder I can get a 16kB hello world on Linux (using no_std and externing to printf), and a 4kB hello world on Windows (using windows magic). But honestly, even 3.7MB is fine, I visit web pages with larger images than that!
@malbacato91
@malbacato91 Рік тому
@@NoBoilerplate the Rust ABI isn't really defined to anything. apart from a few key promises that are important for working with unsafe code, the compiler is free to reorder structs and enums, move function arguments and return values around and through registers/stack/references, do all kinds of unholy operations on closures and in general do (almost) whatever it pleases in the name of optimization. in practice it is quite restrained I think. it even isn't guaranteed to produce the same ABI for the same crate on the same compiler version, although without changing flags and settings I don't think it does currently. for a different compiler version? all bets may be off. this is in contrast to C, which guarantees that code written and compiled today will have the same ABI as code written and compiled 30 years ago on the same toolchain. naturally this means it can't do any optimisations that weren't in place way back when. you can achieve the same behaviour in Rust by marking a type #[repr(C)], or a function extern "C", but if you want an efficient ABI you kinda have to type it out by hand. what I think many people want is an option for an ABI that implements all of repr(rust)'s most important optimisations, while also guaranteeing stability for future compiler versions like the rust team likes to do. would be useful for linking against other rust code without compiling it, while avoiding some of the many gotchas around the rust-C ABI: ZSTs, pointers to DSTs being twice the size (unguaranteed), field-full enums that had only been formalised 4 years ago (to the already existing implementation - github.com/rust-lang/rfcs/pull/2195), discriminant elision and niches, etc. ideally it would also support closures and other future type kinds. maybe other languages will start speaking (some of) it too, instead of always dropping back to C for FFI. IDK if there's any significant work in the area by the core maintainers of the project, but I think they have said _some_ things on the matter
@Haiderali-qd1jy
@Haiderali-qd1jy Рік тому
Spreading the word man. Love ya videos keep it up. People need to use rust
@NoBoilerplate
@NoBoilerplate Рік тому
Gotta do it!
@distrologic2925
@distrologic2925 Рік тому
Thank you for putting my love for Rust into words
@NoBoilerplate
@NoBoilerplate Рік тому
I'm still trying to do it justice, thank you!
@replikvltyoutube3727
@replikvltyoutube3727 Рік тому
I think the bridge analogy is more in favour of something like C than Rust, but nice video
@NoBoilerplate
@NoBoilerplate Рік тому
It's not PERFECT is it, feels a little waterfall-y to me
@jbird4478
@jbird4478 Рік тому
I think it's perfect. There a new bridge that's already Rusting next to that historic monument :P
@NoBoilerplate
@NoBoilerplate Рік тому
@@jbird4478 it's the other way around actually.thebhistoric monument was safely rusting, and the new concrete bridge is crumbling !
@chrs-wltrs
@chrs-wltrs Рік тому
Hey Tris, as someone moving from the "outside" world into computer science, I often have ideas for software that solves average user problems, rather than problems for developers or power users with a CLI. Which means that inevitably, I'm going to need to create a graphical user interface. Is Rust suitable for that kind of software development? I've seen a few different options for cross-platform UI, but none of them seemed like a "major contender" in the same sense as JavaFX, .NET, Tkinter, or _gestures distressedly at all of Javascript_
@bartmanus
@bartmanus Рік тому
.net? Not sure about that one. The most popular desktop framework for webdevs is Electron since it allows one to use the same tech. True portable native desktop Frameworks are hard. You may want to at least check out GTK and QT, these give you great cross platform consistency.
@NoBoilerplate
@NoBoilerplate Рік тому
It's hard to comprehend how much of a powerhouse .net is when you're outside the windows walled garden. I too sometimes forget it's influence!
@NoBoilerplate
@NoBoilerplate Рік тому
I have great news, it's a really good time to be asking these questions in the Rust world. I'd first look at tauri.app, which went 1.0 just a few weeks ago. It's like a safer, faster electron. I've also heard good things about github.com/emilk/egui
@NoBoilerplate
@NoBoilerplate Рік тому
But honestly? The web IS the interface.
@chrs-wltrs
@chrs-wltrs Рік тому
@@NoBoilerplate I've heard about Tauri, and it looks promising! Once I know a bit more, I'd like to start contributing to the mobile options. I've also come across articles about using Rust with Flutter via FFI. But web... "Web is the interface?" 🤢 I can think of few things more unwieldy and slow than a Javascript UI framework. Browsers just *aren't* well-suited to the kinds of things they're asked to do now.
@martinmassera
@martinmassera Рік тому
Thanks. I didn't get the fast prototyping part, though...what's the relationship with compiler feedback? and you mentioned that you can tell "when" the data is, but did not explain this later
@NoBoilerplate
@NoBoilerplate Рік тому
the temporal type system is based on rust's lifetime annotations. Lifetime annotations are in rust to ensure that references live long enough, so a variable isn't cleaned up before it is used. It's part of rust's memory safety. HOWEVER you can use this clever feature to model your data. I'm sorry that I've not yet made a video on this, it's because I am still learning. I understand it for my own code, but not enough to make a video about, and I refuse to teach something I don't yet understand. Here's the chapter to read for yourself, if interested! doc.rust-lang.org/rust-by-example/scope/lifetime.html
@Rudxain
@Rudxain Рік тому
5:00 I have a crate where I'm still using unwrap, it kinda works like a To-Do list of unhandled potential errors. I even have a GitHub issue about it, but there's no need to remember _where_ are the potential panics/errors by using a checklist, instead I just tell the text editor to search for "unwrap" and I know where to start
@NoBoilerplate
@NoBoilerplate Рік тому
You just pitched a VSCode plugin (or a github action?) my friend!
@theodorealenas3171
@theodorealenas3171 Рік тому
@@NoBoilerplate ouch. Shouldn't rustc, the rust compiler, get an argument for listing these unwraps? It doesn't sound like the text editor's job.
@NoBoilerplate
@NoBoilerplate Рік тому
@@theodorealenas3171 you're gonna love the "unwrap_used" lint rule et al. I just learned about it and it's getting featured in this week's video. I think it should be default, but failing that I can make it default for MY projects!
@Rudxain
@Rudxain 14 днів тому
@@NoBoilerplate Yes! I prefer to enable it as `deny` only for modules and `lib`s, not `main`. If I use it in `main`, I prefer `warn`
@justcodingjumperbot_
@justcodingjumperbot_ Рік тому
There's only one thing hampering me from learning any low-level language, and that's managing memory by myself. Yes, it's not the learning curve, but the "actually doing something right with the memory" part. The languages closest to the machine that I've tinkered with is _x86 Assembly and C, all I did was shoot myself in the foot. It does look like Rust is the way to go and it definitely is built to be ready for literally anything from the very start. I will learn it once I get to the point where writing "sub-millisecond to about 10 milliseconds runtime" Java code starts to suck. One thing's for sure, future me is disappointed for not learning Rust right now- or even, the time that I decided to learn Java.
@NoBoilerplate
@NoBoilerplate Рік тому
I've got great news friend, Rust has automatic memory mangament WITHOUT a garbage collector!
@blackflan
@blackflan Рік тому
I checked the source for the benchmarks used to conclude/support the statement that "rust is the fastest high level language of the planet", but I noticed that in many of those benchmarks Julia is being reported as running slower even than python. That makes me think that whoever did the benchmark didn't understand properly the JIT compilation cycle that Julia follows (due to it's multiple dispatch and peculiar type system) and was counting the compilation time inside, at least, some of those benchmarks. That being said, I really think better benchmarks must be done since, from personal experience alone, I have the impression that Julia is, for many general computational tasks, faster than Rust just by its ability to extra specialize with its type system, and it also probably can be considered a "higher level language" than Rust. I love Rust btw :)
@NoBoilerplate
@NoBoilerplate Рік тому
Benchmarks are a nightmare right? I think we all could agree on which languages are faster than others - but the empirical data to support our conclusions is SO TOUGH to get right. I note that python is only 80x slower than C in single-threaded tests. Once you add multi-threading it gets crushed down to 300x + slower. Poor python! I would be interested to learn your take on Julia's specialised type system - my understanding was that Rust's algebraic type system with lifetimes was more sophisticated?
@tomaspecl1082
@tomaspecl1082 Рік тому
I started programming in Java if I remember correctly. I was learning from a UKposts series and when I got to file IO it was really confusing for me because the try-catch block seemed so weird to me. The Rust way of error handling seems just so much better and cleaner. I wonder how would it have been if I started with Rust (assuming that it was available back then).
@NoBoilerplate
@NoBoilerplate Рік тому
Haskell probably was available back then, you could have got your fp fix 😁
@porky1118
@porky1118 Рік тому
I often came across packages not updated for some time. Then I always think about why it's not been updated. Often I find some dependent crates, which are updated more regularly, so I assume them just not to need any updates currently. It was never as clear to me as stated in this video ("they are done").
@NoBoilerplate
@NoBoilerplate Рік тому
This was a big realisation for me last year.
@sadhlife
@sadhlife Рік тому
I'd have to disagree on the "It's like you've already scaled up 72 times" point. Not a single production application exists that simply does raw compute. If you account for network and database latency, a python app will be ~maybe~ half as fast as a rust app, that's also a stretch. I don't consider that enough reason to not have to scale in the future.
@NoBoilerplate
@NoBoilerplate Рік тому
That's absolutely fair, and your estimate is matched by benchmarks web-frameworks-benchmark.netlify.app/result?asc=0&l=rust,python Though the slowest rust frameworks (except for one outlier) are faster than the fastest python frameworks. However an interesting thing I note is that the MOST POPULAR frameworks in Python, with names we've heard of: Flask & Django are an ORDER OF MAGNITUDE slower than the two most popular Rust frameworks: Rocket and Actix. (though personally I like Poem, which sits between those two). 10x faster requests I think is significant, and I'll use that estimate in my future videos, rather than the 72x pure CPU number.
@sadhlife
@sadhlife Рік тому
@@NoBoilerplate again, these benchmarks are not reflective of real life at all. the api requests happen over localhost which is essentially a socket, so no bottlenecks there. no actual networking, and no database to talk to. try to look for a better benchmark if you care about real productivity numbers, instead of relying on these if possible.
@NoBoilerplate
@NoBoilerplate Рік тому
​@@sadhlife Many thanks! Do you know a good example of such a benchmark?
@sadhlife
@sadhlife Рік тому
@@NoBoilerplate the techempower framework benchmark seems a lot more reasonable
@NoBoilerplate
@NoBoilerplate Рік тому
@@sadhlife Fantastic resource, thank you very much for bringing this to my attention, I will use it in the future. I also discovered this fascinating article just.billywhizz.io/blog/on-javascript-performance-01/
@mariusp.2478
@mariusp.2478 Рік тому
I'm glad I'm not the only one who chuckled at Amazon calling it a "thermal event"
@NoBoilerplate
@NoBoilerplate Рік тому
We know what it really is 😂
@Th1200
@Th1200 Рік тому
I am pushing for rust so hard at my work... I have tried to hotfix & rebuild an angular webapp on node 6 today... At the end I gave up and just added my hotfixes to the last docker image which was built some time ago XD
@NoBoilerplate
@NoBoilerplate Рік тому
You have my sympathies my friend. It's time we stopped living like this!
@correabuscar
@correabuscar Рік тому
Thanks for doing these inspirational videos!
@NoBoilerplate
@NoBoilerplate Рік тому
You are so welcome!
@RHulka
@RHulka Рік тому
I am 15 years in the industry and have worked professionally with many languages (Pascal, Java, JS, PHP, Dart, etc.), and rust, for me is an escape from "business-driven" software development. I started coding with Pascal, and it reminds me good old days when you planned data structure in advance, and everything was predictable... but unfortunately, I can't imagine using rust in my daily work (web / mobile development) when business requirements change so rapidly, you need to work with many data sources with broken data and every changing formats where in other languages you can quickly hook library and all done. But as for software engineers coding rust as a hobby is a pure enjoyment.
@NoBoilerplate
@NoBoilerplate Рік тому
I'm a big fan of careful design, while of course responding to change, in software. Great to hear your thoughts on that. I think I disagree with your take on rust not being good for rapid changing environments. Javascript and friends have the REPUTATION of delighting in the fast unpredictable world of startups and quick hacks, but you what I like when making lots of fast changes? Guarantees that I didn't just break the rest of my code with regressions and tech debt. Rust is not the fastest to get to prototype, sure. But that's not where I spend most of my time. Most of my time is spent iterating on a MVP, often after launch.
@RHulka
@RHulka Рік тому
> Javascript and friends have the REPUTATION of delighting in the fast unpredictable world of startups and quick hacks True, and JS before TypeScript was abused a lot by not experienced devs to the stage that the project has to be rewritten. But if work was already paid, the customer got investors' money for MVP. Then the "business goal" was achieved :) I am also not fun with rapid changes. Actually, it stresses me a lot I would prefer to get a problem and present an elegant solution to this :) But in the real world, I am currently working with a new API for a huge e-procurement legacy system (initially based on VBScript / classic ASP) where changes adding on the fly because "otherwise a million contract will be lost" we intentionally choose PHP for this with the idea to rewrite some performance-critical stuff to Rust or Go in future (if needed Rust can even be called from PHP via FFI). On another project, a mobile app, we opted for Dart / Flutter because the rust ecosystem for cross-platform applications is not ready yet, but in this case, we borrow all best from Rust like a Result, Option, and so on, and it's possible to call Rust from Dart via FFI as well, but we yet had no case when it was actually needed.
@RHulka
@RHulka Рік тому
But don't get me wrong, Rust is my passion that's why I watch these videos, but the combination of factors (relative not many developers, no mature ecosystem, PoC / MVP must be delivered super fast, etc.) does not let me use it at work as the primary language. Thank you for the video!
@RHulka
@RHulka Рік тому
And if you C/C++ dev for emded system and switch to Rust it of course bust performance and lead to less bugs. But if you move data between databases/jsons in web or do mobile UI there is no obvious benefits.
@Elliot.2591
@Elliot.2591 Рік тому
This was such an excellent video :)
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much! I see you answered my question on your other comment!
@Elliot.2591
@Elliot.2591 Рік тому
@@NoBoilerplate lol didn't get the notification by the time i sent this one. your videos have really been motivating me to code when i am taking a break from personal projects and money just isn't enough sometimes :P
@NoBoilerplate
@NoBoilerplate Рік тому
@@Elliot.2591 We can only ignore our happiness for so long. Take care!
@Elliot.2591
@Elliot.2591 Рік тому
@@NoBoilerplate You too man! :)
@vanya536
@vanya536 Рік тому
Great video as always!
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much!
@amans6504
@amans6504 Рік тому
Hi, what's your opinion on rust for web development or networking? I mean it is still a systems programming language and many times in commerical software we've to optimize for developer productivity, and cost of product. Thus languages like php are still existing strong. It's a costly decision for companies to use rust for such applications
@NoBoilerplate
@NoBoilerplate Рік тому
I've got great news, it's GREAT for web development! I'd start with rocket.rs. Don't believe people when they tell you that Rust is a "system programming language", I mean sure it is, but It's also higher-level than Python due to the macro system. Do note previous video, "Rust: Turtles all the way down"
@jakob7116
@jakob7116 Рік тому
Woah that js was just 4x slower than C was what surprised me
@NoBoilerplate
@NoBoilerplate Рік тому
Me too! The secret of JS and Java being so fast is TRILLIONS OF DOLLARS OVER DECADES OPTIMISING EVERY NANOSECOND.
@jakob7116
@jakob7116 Рік тому
@@NoBoilerplate when you put it like that lol
@NoBoilerplate
@NoBoilerplate Рік тому
@@jakob7116 $$$ = fps
@hasanhuseyinyurdagul5403
@hasanhuseyinyurdagul5403 Рік тому
Perfect talk again, I love Rust a lot, it might be the perfect language but writing C is way easier than writing Rust and if you are really great programmer you will write safe and unerrorable code as well.
@NoBoilerplate
@NoBoilerplate Рік тому
I am certain you are a really great programmer. However, time has shown time and time again that no matter how great the programmer, the complexities of memory management in a large project (like web servers or openssl) beat our ability to write perfect code. Let me put your argument another way: "Anyone can write safe code if they try really really really hard". Would you believe that? We've had 40 years to perfect memory management in C. We have not. It's time to try something else.
@Guinea.Pig-Gaming
@Guinea.Pig-Gaming Рік тому
@@NoBoilerplate I could definitely be wrong about this, but I thought the point of C was to be a higher level assembly language. It wasn't designed to do anything for you. It gives all the power to the programmer. Modern C and C++ compilers give you many options in compiling and linking already, which is great. And the C language has been backwards compatible for 40 years as far as I know. It was also originally designed for much older computers, which means that by the time we had enough memory and processing power to implement memory management, it was already too late. I would love to learn Rust too, as it clearly is a very cool language. Getting started with C / C++ was easy for me, and I hope Rust will be a similar experience. Once again, I could be wrong about any of this. I might be looking at something in the wrong way, or not taking things into consideration. I haven't even started high school yet, so I haven't taken any classes. I've learned everything on my own, mostly watching videos or looking on Stack Overflow.
@NoBoilerplate
@NoBoilerplate Рік тому
@@Guinea.Pig-Gaming You're right, I should be saying C/C++. Nightmare to manage memory with!
@gianclgar
@gianclgar Рік тому
you nailed the youtube dark background color
@NoBoilerplate
@NoBoilerplate Рік тому
Matte black everything 👌
@Holobrine
@Holobrine 8 місяців тому
Maybe Rust could have different tiers of unsafe so you can write code fast first, and then turn on safety features one by one as you massage the code to perfection. The compiler errors show up as warnings, but it lets you run code quickly to know the happy path works. Then you turn on the safety and handle everything else.
@NoBoilerplate
@NoBoilerplate 8 місяців тому
unsafe doesn't mean fast, unsafe means dereferencing a raw pointer (and 4 other unsafe activities). True, often this is done for optimisation, but it's not like safe code is slow - it's C speed! Neither you nor I will need unsafe code, though we might use libraries that carefully use it. The granularity you're imagining already exists - you build safe abstractions around unsafe operations.
@Holobrine
@Holobrine 8 місяців тому
@@NoBoilerplateI mean fast to write while prototyping. Unwrap() is in the spirit of what I’m looking for. Writing error prone code first to prove the concept, and then adding all the checks.
@NoBoilerplate
@NoBoilerplate 8 місяців тому
@@Holobrine oh I see! Yes that's totally right, but that has nothing to do with the unsafe system, right? I agree .unwrap()s are for prototyping code, get it done quickly and easily, and then replace those unwraps. The way I understand most people use unsafe is they try to do it first in safe code, then if benchmarks show unacceptable slowdowns, consider some pointer tricks in unsafe. But really, that's such an edge case, I just don't think about unsafe! Here's my video about macros and unsafe ukposts.info/have/v-deo/iKV-jI2aZ66jrGQ.html
@Chris-on5bt
@Chris-on5bt Рік тому
The more I use Rust the more I find that the forms that once oppressed now in fact liberate.
@NoBoilerplate
@NoBoilerplate Рік тому
Oh shit are you selling that on a pillow! Could you elaborate?
@Chris-on5bt
@Chris-on5bt Рік тому
@@NoBoilerplate Heh, I should and turn a profit. No, I borrowed the turn of phrase Eugene Herrigel "Zen and the Art of Archery" as he describes how the rote process of shooting the bow the same way everyday overtime elevates into a form of pseudo spiritual practice. But more on topic, I was/still am a big fan of languages like C. It was what I cut my teeth on in my teens and still enjoy picking up every now and again. When writing C it feels like I am directly working with the computer to build a baroque machine of elegant computation. At least when I am not spending half my time debugging segfaults and unexpected behavior. Granted, while I have written a good amount of C code, I am by no means great at writing C code. Then the search began for higher level languages to 'get things' done. I have used multiple in my time: mucked around in Java, built some web apps in JS, did some utility scripts in Python, tried (and failed) to build stable middleware in Perl, written some games in C++, and even used PHP to do some back end work for WP sites. While I can get things done in each and the process of learning was fruitful I always felt like I was compromising that direct relationship with the machine. Somehow as I climbed the mountain of abstraction I lost the sense of dominion over the processor that comes with C. I felt like the abstraction that was supposed to help me be more efficient also clouded my understanding of the processes that worked under my feet. Then one day I finally decided to pick up Rust after hearing a few developers talk about how it was next best thing ever. At first it seemed obtuse, "What the hell are all these unwrap calls? Why do they throw these questions marks randomly at the end of statements? Why does it feel like it takes 5 lines of error checking for line of do work code?" But I decided to give the language an honest shake and stick with it. Overtime I began to appreciate that 'naggy compiler' was actually guiding me to consider all the code paths and think about the entire possibility space of my code. The serpentine borrow checker that seemed to try and bite me every time I made a change, over time became a great partner that helped me keep track of 'who' owns what. This allowed me to confidently approach complexity laden multi threaded programming confident that I would not get into a tangled knot of race conditions. I appreciate how though there are many powerful functional high level abstractions that let you quickly and correctly write 'get shit done' code, the power doesn't come at the expense of hiding that which is abstracted. Its still just the bytes, for loops, switch statements, enumerations, strongly typed structure of C, but informed by the last 20+ years of new approaches and a nice round edge to keep you from cutting your finger off when you forget to pay attention. The proof came to me when I had to opportunity to write a piece of middle ware at work that helped a front-end web application communicate with back end servers and databases. I put together Tokio, Actix, Tiberius, and Reqwest. Salted in some Mutexes and Rwlocks, and put the thing together. The first build (after a bit of tweaking) ran continuously for a month on a virtual machine in production with hardly an error. All around it the infrastructure it connected would be rebooted, network connectivity would break, etc; but the middle ware just quietly worked in the background serving requests and making connections. Eventually I had to do some debugging because of a race condition with the database handle between parallel threads that served web requests. If the connection timed out it would die holding the lock on the handle and the system would spiral from there. I fixed that 1 bug and then put it back into production and the system has quietly run continuously for 6 months without a squeak. This has been a game changer for me. I work at a small company where I am always strapped for time and choosing between competing projects. I do not have time to run back and fix a misbehaving piece of software I wrote three months ago, I need software that works now. I already have my hands full making the software written by other people behave with the software I have written. Rust has been a God sent that has allowed me to solve problems once and then confidently walk away to apply my skills to the next problem set.
@NoBoilerplate
@NoBoilerplate Рік тому
@@Chris-on5bt Thank you so much for writing such a coherent explanation of your Rust experience. Your story is so well written, I'd like to quote you verbatim in a short video, is that crazy? May I have your permission?
@Chris-on5bt
@Chris-on5bt Рік тому
@@NoBoilerplate Sure no problem.
@NoBoilerplate
@NoBoilerplate Рік тому
@@Chris-on5bt well much obliged. How would you like to be credited? Any notable URL?
@ketchup901
@ketchup901 Рік тому
"Rust is the fastest high-level language on the planet", he says while showing a table where it is outranked by C.
@NoBoilerplate
@NoBoilerplate Рік тому
That's why I said it like that, C's not high-level.
@ketchup901
@ketchup901 Рік тому
@@NoBoilerplate Yes it is. C is heavily abstracted to handle things like named variables, loops, functions, data structures, and so on. You cannot write direct instructions in C like you can in low-level languages. Or, I mean, you can, but the fact that you have to mark it with asm{} proves that every other part of your code is high-level.
@NoBoilerplate
@NoBoilerplate Рік тому
@@ketchup901 Ah I see, I think human language is the problem here! I agree that C is not a low-level language, as assembly still exists, but I think we surely have added a few layers to our definitions in the last few decades? I don't know of the framework to discuss this, but it' can't be that every language other than assembly is 'high-level' right? Perhaps a gradient of increasing abstraction? If we were to plot every language on this gradient, C would be much closer to assembly than Rust, is what I'm saying.
@ketchup901
@ketchup901 Рік тому
@@NoBoilerplate Yes the leap between Rust and C is very big but so is the leap between C and assembler. In my view yes in fact every language that is not issuing direct instructions to the CPU is a high-level language (because there is a high level of abstraction from the hardware). However of course there is a gradient as you say.
@WackoMcGoose
@WackoMcGoose Рік тому
1:55 "for when AWS has what they call an _unplanned thermal event"_ I work (well, worked, the Scout division got liquidated) at Amazon and have heard quite a few war stories in the company-wide Slack watercooler channels... I don't think I've heard _that_ term before, but I'll have to remember it. Usually it's called a "welp, whose turn is it to write the COE this time"...
@NoBoilerplate
@NoBoilerplate Рік тому
Hehe, I can't find the reference to 'unplanned' but certainly 'thermal event' is the wording used twitter.com/eu_west_2/status/1546207188086968320
@WackoMcGoose
@WackoMcGoose Рік тому
@@NoBoilerplate Honestly, it has similar energy to "rapid unplanned disassembly" in space.
@NoBoilerplate
@NoBoilerplate Рік тому
@@WackoMcGoose Yes! My favorite is "Unplanned lithobraking", which I mention somewhere in Lost Terminal: ukposts.info/have/v-deo/qGOTeHtwoqmrrpc.html
@WackoMcGoose
@WackoMcGoose Рік тому
@@NoBoilerplate For Kerbal players, _planned_ lithobraking is as much a rite of passage as "visiting the Hidden Fun Stuff" is for Dwarf Fortress players. You've never really _experienced_ the game until you've crashed into the Mun for orbital adjustment, or mined one too many tiles of cotton candy and discovered the circus...
@flamewave000
@flamewave000 5 місяців тому
4:52 the one thing I've hated using Kotlin for the last 5 years.. invisible exceptions. Java started doing this thing where you could declare that a function might throw a specific kind of exception, and it would force you to handle it upstream. But it was often messy using try-catches everywhere resulting in more indentations. Then Kotlin came along and just said "nah, we will neither support that, nor make a better solution. Good luck!".
@NoBoilerplate
@NoBoilerplate 5 місяців тому
Big fan of Kotlin, it cleans up 99% of my issues with Java, while adding some great features! The weakness, which is unavoidable is the underlying platform, same problem as Typescript. Both GREAT ways to manage a platform with nulls, and if you're the only developer you can have great confidence in your code. But when the project grows? I get nervous :-D
@flamewave000
@flamewave000 5 місяців тому
@@NoBoilerplate for sure, I build for Android and previously used Java for it all. Kotlin definitely has some great features, but yes it's got some pitfalls for when the code base gets large. I've been building this current app solo for 4 years and the codebase now is absolutely massive.
@etopowertwon
@etopowertwon Рік тому
I love rust, but I will believe that rust respect my time when its compile(linking) time would be halved at least. Using bevy on windows is exercise in patience: if on linux you can at least link it dynamically, it doesn't work on windows.
@NoBoilerplate
@NoBoilerplate Рік тому
That is a shame. All will be fixed in time, one would hope! What are you building on windows?
@laundmo
@laundmo Рік тому
the whole thing about bevy dynamic linking not working on windows is still wierd to me. like, i set it up, it works, my compile times for iterative changes are 1-2 seconds. ive tried and failed to figure out how to make it not work.
@etopowertwon
@etopowertwon Рік тому
​ @No Boilerplate Just learning Bevy for now. Coming from C++ land it's actually was pleasntly to see that Bevy systems and Rocket mount poitns share similar approach: you just specify what resource you want in parameter and framework gets it for you. Unless Rust introduce another MIRacle for linking, I doubt build time will get better. More likely it'll get worse. LLVM constantly gets slower (clang seen 2x time increase for 10% performance increase). @landmo it quitted to desktop for me immediatly without any error, message or popup when I tried to run it 🤷‍♀
@eboodnero
@eboodnero Рік тому
"theyre not abandoned; theyre done". what a mic drop
@NoBoilerplate
@NoBoilerplate Рік тому
It was a huge realisation for me about a year ago, and it all clicked after the convo with the rust maintainer.
@eboodnero
@eboodnero Рік тому
@@NoBoilerplate well you've single handedly inspired excitement in me. I don't know if that maintainer needs a marketing team because you might be in the wrong line of work! (Only half joking)
@delphicdescant
@delphicdescant Рік тому
They should probably be paying you for advertising this compelling.
@NoBoilerplate
@NoBoilerplate Рік тому
I sure wish SOMEONE would. *winks at squarespace, hello fresh, eve mattresses*
@romanext921
@romanext921 Рік тому
Very stict type system = lots of mini unit tests 🤔. Never thought about it like that!
@NoBoilerplate
@NoBoilerplate Рік тому
I know! You should still test your code (with cargo test!) but it give you 100% coverage of these mini tests 😁
@MichalKottman
@MichalKottman Рік тому
"When your code compiles, check it in, it's done." what a pile of marketing hype BS. There's *so much* more that can go wrong at runtime than compile time. Having the code compile is just a start of a very long journey of making sure it actually fulfills expectations with what the real world throws at it.
@NoBoilerplate
@NoBoilerplate Рік тому
Michal, I completely sympathise that Rust's claims are very grand. Extraordinary claims require extraordinary evidence, and I'm still building my series of videos to support this. Let me offer a thought experiment to kick off our conversation: You and I, in whatever languages we use, exclusively program at compile time. We look at source code and IMAGINE how it will run at runtime. What does a compiler do if not just that? Now, we are much smarter than a compiler (usually!), and can base our decisions on experimentation and experience and stackoverflow. But we're still working at compile time, on source code. Is it such a stretch to imagine building some of our own human-compile-time reasoning into a compiler? And if we were to do that to such an extent, might it not seem impossible to those only familiar with the old, simple languages? The problems exist at runtime, the solutions exist at compile time.
@benjaminschaaf
@benjaminschaaf Рік тому
@@NoBoilerplate In no way shape or form does rust claim that your code is bug free when it compiles. You yourself stated that rust is also perfectly fine compiling code that panics when it shouldn't when using unwrap, expect, assert, indexing a vector, etc. Not to mention the unsafe keyword that lets you compile memory-unsafe code. I don't think that you believe rust eliminates all bugs at compile-time - as that would be ludicrous - but that is what comes across with that statement.
@NoBoilerplate
@NoBoilerplate Рік тому
@@benjaminschaaf Sure, if you take it out of context. That statement was the last one in the video, to hear it, someone will have listened to the entire thing. I'm not worried about people unfamiliar with rust taking it out of context like you have. Look, you sound familiar with Rust, what I'm trying to get over with this video is the feeling that (as with Haskell), more than most languages, when you compile Rust, it nearly always works in the way you like! Do you know what I'm getting at?
@benjaminschaaf
@benjaminschaaf Рік тому
​@@NoBoilerplate I know where you're coming from, but you're relying on the audience's familiarity with rust to identify your hyperbole. Even as someone who uses rust on a regular basis my first impression from the video was that you over-hype the language and over-sell its capabilities; I wasn't taking your final statement out of context. I didn't have to go far in the comments to find others with similar opinions. If it's a feeling you wanted to convey I don't think video does a good job of that. I think the video contains a lot of hyperbole and does a poor job differentiating it from actual claims being made. I hope you take this as constructive criticism for future videos.
@NoBoilerplate
@NoBoilerplate Рік тому
@@benjaminschaaf I will, thank you very much for the feedback, I appreciate you taking the time to help me out :-)
@bozhidaratanasov7800
@bozhidaratanasov7800 Рік тому
Aren't C and C++ considered high level languages as well?
@NoBoilerplate
@NoBoilerplate Рік тому
By 1970s standards, sure. Take a look at my "Rust: Turtles all the way down" video for more discussion about high-level vs low level.
@AceofSpades5757
@AceofSpades5757 Рік тому
The amazing thing about editions, as I understand it, is that it allows for breaking changes in comparison to other editions while having no effect as a dependency since dependencies can be from any edition(s). This way, the Rust of tomorrow (~every 3 years) may be drastically different from the Rust today while never affecting it's capability or reliability.
@NoBoilerplate
@NoBoilerplate Рік тому
RIGHT! that's something I've only learned about recently too - what an incredible promise for the compiler team to make!
@EudaderurScheiss
@EudaderurScheiss Рік тому
i started with rust & actix web 2 days ago. lost some api backend service that ive written in php. was like ok its time to try out something new. tried typescript expressjs/fastify. implemented it, then was like, nahh thats boring, ill try rust. first i was like, wtf is this but now I'm like yes its amazing. it tells you exactly what it wants and what it doesn't want. the principle of borrowing objects, ownership, options and traits makes it really powerful. it gives you the feeling that you know exactly what is going on. nothing hidden. (i work with groovy in my dayjob which is like boilerplate of a boilerplate language) only critic that i have is that the (regarding actix / web) documentation is kinda all over the place , but otherwise amazing language
@NoBoilerplate
@NoBoilerplate Рік тому
Fantastic! Actix is one of the fastest Web frameworks, but it's not quite to my ergonomic taste. If you're writing a Web site, rocket.rs or yew.rs might be worth looking at, and if you are writing a rest service, there's nothing better than poem-openapi
@EudaderurScheiss
@EudaderurScheiss Рік тому
​@@NoBoilerplate thanks for the tips. i just went for the first bigger framework to implement the same thing in rust. from what i can understand, rust itself has so much potential. but i feel that the programming patterns are quite new and also all over the place. and there seem to be too many ways to do certain things. reminds me a little bit of js. since rusts approach is quite unique, i feel that a more standardized/structured way is needed. basically a best practices for rust if you come from an oop language. and what would you say is rusts killer application
@NoBoilerplate
@NoBoilerplate Рік тому
@@EudaderurScheiss Very salient points. I have both those topics (killer app and OOP alternatives) in my video pipeline.
@Elliot.2591
@Elliot.2591 Рік тому
Any thoughts on making a discord server for your community? I love the vibe and see growth in your future :)
@NoBoilerplate
@NoBoilerplate Рік тому
This needs to happen doesn't it. Yep, OK, thanks for reminding me. I'll shout about it when I get round to it!
@nolram
@nolram Рік тому
Will there ever be other content than "Rust good, everything else bad" on this channel ? Serious question; because while we all get this current perspective at this point, some pitfalls of rust (such as regional inaccessibility due to syntactic design decisions, the hard syntax, how to structure projects to avoid long compile times) etc. that are systematic in nature have yet to be addressed, but would help Rust adoption and understanding for more than "Rust good" videos.
@NoBoilerplate
@NoBoilerplate Рік тому
These are very fair points, and I'll address them in time. The trend that you've correctly identified with my inspirational/propaganda videos is deliberate: When I started learning Rust, it was HARD, and the only reason I made it through the steep learning curve was because I had a mentor who guided me. Most people don't have that, so they need to see a REALLY GOOD REASON for learning the language, to combat the early annoyances (hard syntax is indeed one of them). Long compile times has been addressed by people much smarter than I. (My favourite writer on the topic just released fasterthanli.me/articles/when-rustc-explodes for example) However, optimisation of long compile times is a mid-level optimisation. By the time you're writing large enough Rust projects, you've done it: You've broken through the wall. There's plenty of new problems in the mid-to-late game that I've read about (boxing, (A)RC questions and such) but you don't need my help if you're already there. My plan for the channel is a long one: I'm going to get through introductory material first, then move on to the mid-level questions you're interested in. My apologies for going slow, I'm learning Rust too, I want to be sure of my own knowledge before publishing. BTW, what is the regional inaccessibility problem you mentioned? Thanks!
@nolram
@nolram Рік тому
@@NoBoilerplate The regional inaccessibility problem relates to Rust's extensive use of shorthands, usually using ""special"" characters where other languages may have used a keyword. The problem with using any kind of special character (so everything not in the alphabet + space) can be that how they are typed, or even if they are typeable can very GREATLY between various regional keyboard layouts and dialects, making some specific expressions either hard, annoying, obnoxious or even impossible to type on some keyboard layouts. QWERTZ alone already begins creating issues with a lot of german-adjacent languages having a rather limited set of special characters accessible directly without the use of secondary keys (such as AltGr on the german QWERTZ - the one I use). This problem only gets worse with other, more deviating layouts from the standard US QWERTY such as AZERTY, or even non-latin layouts. This is actually one of the reasons C-like syntax for the most part is so popular, and functional languages (that rely a lot on specific mathematic symbols) struggle to gain adoption in a lot of places : Syntax and shorthands can make things more efficient for some programmers, harder for others. Designing programming languages with accessibility in mind ofc goes far beyond this with many small details yet having to be ironed out, but one of my personal biggest complaints with Rust (and why I personally don't use it on a day to day basis and sometimes even, god forbid, prefer to use C++) is the lack of thought this area of language design has received so far (and thanks to the backward compatibility you mentioned is unlikely to receive) in this regard. Programming language accessibility is a bottomless pit (with many issues such as bilinguals struggling with syntax-complex languages due to abstract linguistic representations in human memory) having yet to be resolved explored. But especially the use of shorthands based on special characters is one prevalent in Rust.
@NoBoilerplate
@NoBoilerplate Рік тому
@@nolram I don't understand, with { }, [ ], \, @ on altgr, I don't think Rust is the only language you'll have difficulty with. C will be difficult as well, right?
@nolram
@nolram Рік тому
@@NoBoilerplate Its less so just about the presence of those symbols, but also the amount of usage of them and in what contexts. Its not as big of an issue with ()[]{} for the most (besides speed from having to diverge finger movement from a standard typing flow) but it starts getting more problematic with for instance vertical lines | - and this problem gets worse with say some Apple keyboards or keyboards outside the QWERT-range.
@NoBoilerplate
@NoBoilerplate Рік тому
@@nolram I feel like this problem you're having is in all programming languages? Even Python, with no {}, it uses | for boolean logic. I'm so sorry that programming is so anglocentric, but this is not unique to Rust, right? I'd be very interested to talk about solutions to these problems. My German friends say they've given up and have used dual layout for their entire adult lives because of this - how annoying! Even I, in England, feel this pain just a LITTLE: I switched to US layout many years ago, even though it's almost the same as GB. May I make a suggestion for you: While you or I might not be able to fix the world, we can fix our own environment. I type on a really great keyboard that I recommend: The Moonlander, which you can customise the layout on www.zsa.io/moonlander/
@erickmoya1401
@erickmoya1401 Рік тому
Is there any reason to not add Go to the comparative in speed? I would not compare ruby or python if I am talking about speed, seems like a tricky comparision. Your video is convincing except for that point. I would like to ask for some clarification. Thanks
@NoBoilerplate
@NoBoilerplate Рік тому
Quite right, that's an omission. The source code for the video (github link in the description) has my benchmark source. It looks like Go would be about 2x, in that table. Very impressive, certainly fast enough. I suppose I missed it off the list for brevity. Rust's not wildly compelling vs Go on runtime speed. Where Rust beats Go, for me, is how rich the compiler and type system is, so I can write code I'm EXTREMELY CONFIDENT in, and go home at 5pm :-D Also native support for bare-metal and webassembly. I understand that there are projects that let you write Go to these targets - they're not possible using the standard compiler. For example, while MicroPython exists, I wouldn't exactly say that means that Python works on bare metal.
@erickmoya1401
@erickmoya1401 Рік тому
@@NoBoilerplate Thanks for the update. You convinced me of giving it a try
@NoBoilerplate
@NoBoilerplate Рік тому
@@erickmoya1401 It's a fun journey, and certainly a lot of learning for a high-level programmer like me. Do read the official book, and everything that fasterthanli.me has written, good luck!
@str.haysam
@str.haysam Рік тому
Love your videos so match.
@NoBoilerplate
@NoBoilerplate Рік тому
Thank you so much, it's really nice of you to say so!
Build your Rust lightsaber
11:51
No Boilerplate
Переглядів 152 тис.
Rust makes you feel like a GENIUS
10:48
No Boilerplate
Переглядів 394 тис.
You’ve Never Seen A Race Like This 🚀
00:21
Red Bull
Переглядів 38 млн
ВЫШИБАЛЫ - Сатир, Янчик, Джарахов, Миша, Антон Форсаж
1:09:04
Hack Your Brain With Elaborate Coping Mechanisms
11:42
No Boilerplate
Переглядів 302 тис.
Rust & Wasm
9:38
No Boilerplate
Переглядів 181 тис.
Rust is not a faster horse
11:37
No Boilerplate
Переглядів 313 тис.
All Rust features explained
21:30
Let's Get Rusty
Переглядів 267 тис.
Why Rust is NOT a Passing Fad...
8:54
Travis Media
Переглядів 19 тис.
The Rust Survival Guide
12:34
Let's Get Rusty
Переглядів 119 тис.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Переглядів 83 тис.
Rust's Witchcraft
9:18
No Boilerplate
Переглядів 166 тис.
Embedded Rust setup explained
23:03
The Rusty Bits
Переглядів 65 тис.
Rust vs 7 Other Languages You Probably Haven't Tried
8:55
Code to the Moon
Переглядів 72 тис.