Stop writing Rust

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024
  • 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....
    Transcripts for all videos here: github.com/0at...
    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.losttermin...
    If urban fantasy is more your thing, I also produce a podcast of modern folktales www.modemprome...

Комментарии • 1 тыс.

  • @NoBoilerplate
    @NoBoilerplate  2 года назад +235

    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 2 года назад +10

      4:20 the lower line has match in it, thats not correct syntax right?

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +4

      @@spicybaguette7706 Well spotted! Yep, another error slips in, I'll add it to the ERRATA

    • @xanri7673
      @xanri7673 2 года назад +2

      At 4:36, you cannot use methods like `.display()` inside of a formatting parameter.

    • @Winnetou17
      @Winnetou17 2 года назад +7

      @@NoBoilerplate tsk tsk tsk, and you said that you can go outside and play...

    • @w1keee
      @w1keee 2 года назад +3

      @@NoBoilerplate you should make testable videos! :D

  • @jvcmarc
    @jvcmarc 2 года назад +2235

    "they're not abandoned, they're done" is such a powerful expression that more people should think about

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +224

      RIGHT? This was such a revelation to me

    • @SkyyySi
      @SkyyySi 2 года назад +228

      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 2 года назад +88

      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 2 года назад +48

      After npm packages I was having the same idea. "They must be legacy let's see what people use these days"

    • @eritert
      @eritert 2 года назад +12

      Yep that would never work in projects using npm lol

  • @broimnotyourbro
    @broimnotyourbro 2 года назад +575

    “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  2 года назад +45

      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 Год назад +13

      dude your pfp is making me read your comment sarcastically
      XD

    • @trejkaz
      @trejkaz Год назад +6

      @@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".

  • @pixalquarks4623
    @pixalquarks4623 2 года назад +515

    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  2 года назад +124

      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 2 года назад +41

      @@NoBoilerplate That superpower is the reason I'm going to stick with it

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +34

      @@pixalquarks4623 FANTASTIC!

    • @pixalquarks4623
      @pixalquarks4623 2 года назад +3

      @@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 2 года назад +5

      @@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 RUclips. Much better than using lots of bandwidth for a video that I don't even need to watch.

  • @devinda_me
    @devinda_me 2 года назад +710

    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  2 года назад +60

      YES! I sure have js fatigue too. Have you seen yew.rs?

    • @liftingisfun2350
      @liftingisfun2350 2 года назад +9

      What's js fatigue? Maybe I have it since I was too lazy to Google it? Lol

    • @sael40
      @sael40 2 года назад +49

      ​@@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 2 года назад +3

      @@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 2 года назад +5

      ​@@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 2 года назад +246

    "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  2 года назад +10

      I just wanna build new stuff and move on without such a huge maintenance burden!

    • @flipperiflop
      @flipperiflop 2 года назад +12

      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  2 года назад +7

      @@flipperiflop SOME of them must be abandoned, of course, we are but human. However the trend is to finished libraries, which is SO refreshing!

  • @lememz
    @lememz 2 года назад +495

    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  2 года назад +123

      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 2 года назад +65

      @@NoBoilerplate I would say it's the best kind of clickbait, the one that breaks your expectations but in a good way

    • @rotteegher39
      @rotteegher39 Год назад +14

      @@lememz So true... This video is like an trailer for a Rust as it was a movie

    • @aventurileluipetre
      @aventurileluipetre Год назад +1

      clickbaits are annoying, but I still risked clicking and now I appreciate Rust more

  • @thestemgamer3346
    @thestemgamer3346 2 года назад +168

    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 2 года назад +28

      The crossover!

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +48

      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 2 года назад +31

      @@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 2 года назад +5

      I knew you watch this channel haha!

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +7

      @@thestemgamer3346 Agreed, we're in a very exciting time!

  • @tylerbloom4830
    @tylerbloom4830 2 года назад +54

    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  2 года назад +9

      That's such a good way of explain it. I'm so FEARFUL of code written in other languages!

    • @lqlaliut897
      @lqlaliut897 2 года назад +2

      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 2 года назад +4

      @@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.

  • @rusticbear195
    @rusticbear195 2 года назад +38

    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  2 года назад +1

      Thank you so much! It's an odd realisation!

  • @HyperFocusMarshmallow
    @HyperFocusMarshmallow 2 года назад +87

    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  2 года назад +16

      YES! I literally wrote a video called "Rust makes you feel like a Genius" to try to explain this feeling!

    • @HyperFocusMarshmallow
      @HyperFocusMarshmallow 2 года назад +7

      @@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  2 года назад +7

      @@HyperFocusMarshmallow What a wonderful world!

  • @bram_dingelstad
    @bram_dingelstad 2 года назад +100

    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  2 года назад +15

      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 2 года назад +14

      Plot twist: hes actually the lead creater of rust and is using a voice change

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +13

      @@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 2 года назад +1

      I've heard Rust is terrible for game development

    • @Speykious
      @Speykious 2 года назад +3

      @@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).

  • @NeilTheFisher
    @NeilTheFisher 2 года назад +38

    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  2 года назад +15

      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 2 года назад +7

      @@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  2 года назад +3

      ​@@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!

  • @kelvinpraises
    @kelvinpraises 2 года назад +60

    "They are not abandoned they are done" man that's a whole other level!

  • @after_alec
    @after_alec 2 года назад +61

    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  2 года назад +28

      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 2 года назад +10

      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  2 года назад +2

      @@dorktales254 This is my take too.

    • @leddoo
      @leddoo 2 года назад +4

      > 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  2 года назад +3

      @@leddoo Very good points. For very malleable code, I'm getting more and more interested in Julia these days

  • @evangelosspyromilios5994
    @evangelosspyromilios5994 7 месяцев назад +2

    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!

  • @Virbox
    @Virbox 2 года назад +72

    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 2 года назад

      Video maker gets rust erection

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +25

      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 2 года назад +4

      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 2 года назад

      "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 2 года назад +3

      @@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?

  • @ericng8807
    @ericng8807 2 года назад +3

    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  2 года назад +1

      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.

  • @iamwithinyourhome
    @iamwithinyourhome 2 года назад +13

    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  2 года назад +4

      I find it wild that you can reasonably (perhaps even easily) wrote code that has no runtime crashes

  • @elliotalderson7823
    @elliotalderson7823 2 года назад +12

    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  2 года назад +1

      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 2 года назад +1

      @@NoBoilerplate Then I'm definitely looking forward to your videos about other topics if you are going to present them like these!

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      @@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.

  • @JeffHykin
    @JeffHykin 2 года назад +18

    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.

  • @ipajewski
    @ipajewski 2 года назад +26

    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  2 года назад +8

      You're right! My example was a bit contrived really...

    • @catholic_zoomer_bro
      @catholic_zoomer_bro 2 года назад +3

      @@NoBoilerplate maybe something like the Egyptian or Latin American pyramids would've worked better

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +16

      @@catholic_zoomer_bro Shame they're not made of metal that would rust XD

  • @GavinFreeborn
    @GavinFreeborn 2 года назад +8

    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  2 года назад +1

      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

  • @a097f7g
    @a097f7g 2 года назад +20

    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  2 года назад +6

      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 2 года назад +5

      > 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  2 года назад +3

      ​@@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.

  • @Ma1ne2
    @Ma1ne2 2 года назад +3

    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  2 года назад

      Fantastic! I remember having to do that exact same exercise in C in 2005 IT WAS SO HARD!

  • @samjingwen
    @samjingwen 2 года назад +37

    “Talk to your local data scientists to learn more” 😂😂😂

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +6

      I'm super excited to use Julia for my next data science project!

    • @itellyouforfree7238
      @itellyouforfree7238 2 года назад +3

      @@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 2 года назад

      @@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.

  • @SimGunther
    @SimGunther 2 года назад +5

    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  2 года назад +1

      That's extremely cool! Have you seen the Eve programming language? Reactive realtime programming there, too.

    • @SimGunther
      @SimGunther 2 года назад +1

      @@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  2 года назад

      @@SimGunther Yeah, it FELT like it was going to be vaporware :-/

  • @anj000
    @anj000 2 года назад +3

    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  2 года назад +1

      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!

  • @eZU4nQsWN9pAGsU38aHj
    @eZU4nQsWN9pAGsU38aHj 2 года назад +3

    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  2 года назад

      Such a good feature right? So relaxing 😁

  • @kellybmackenzie
    @kellybmackenzie 2 года назад +1

    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  2 года назад

      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

  • @joey199412
    @joey199412 2 года назад +26

    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  2 года назад +2

      That's a really great insight!

    • @kyrylmelekhin2667
      @kyrylmelekhin2667 2 года назад +2

      nonsense

    • @kebien6020
      @kebien6020 2 года назад +5

      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 2 года назад +1

      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 2 года назад +6

      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.

  • @changelingpovs
    @changelingpovs 2 года назад +5

    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  2 года назад +2

      Works really nicely for aws Lambdas, too.

  • @LastExceed
    @LastExceed 2 года назад +4

    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  2 года назад +3

      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  2 года назад +1

      I shouldn't make these jokes I would love squarespace money.
      Squarespace, if you are reading this call me

    • @LastExceed
      @LastExceed 2 года назад

      lmao

  • @NithinJune
    @NithinJune 2 года назад +1

    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  2 года назад

      Though that was an accident in the first video, I'm keeping it! Dark mode everywhere!

  • @mrjack08722
    @mrjack08722 2 года назад +9

    "They're not abandoned, they're done" Honestly i didnt even know that was a possibility.

  • @CunningBard
    @CunningBard 2 года назад +28

    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  2 года назад +10

      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

  • @ruthlessadmin
    @ruthlessadmin 2 года назад +4

    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  2 года назад +1

      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 Год назад +1

    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  Год назад +1

      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

  • @Welank
    @Welank 2 года назад +18

    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  2 года назад +6

      Fascinating! I did not know that. Where could I read about this?

    • @Welank
      @Welank 2 года назад +4

      @@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 RUclips often, so I am not sure.)

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +4

      @@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.

  • @mithradates
    @mithradates 2 года назад +2

    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  2 года назад +1

      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!

  • @blinded6502
    @blinded6502 2 года назад +4

    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  2 года назад

      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 2 года назад +2

      @@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  2 года назад

      @@blinded6502 How fun!

  • @crowlsyong
    @crowlsyong 2 года назад +2

    I like that you use the same dark color as youtube dark mode. Super clean look.

  • @justcodingjumperbot_
    @justcodingjumperbot_ Год назад +3

    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  Год назад +2

      I've got great news friend, Rust has automatic memory mangament WITHOUT a garbage collector!

  • @gangov
    @gangov 2 года назад +2

    lol, that spin at the end, love it

  • @skrux9707
    @skrux9707 Год назад +3

    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!

  • @doktork3406
    @doktork3406 2 года назад +1

    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  2 года назад

      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!

  • @troglodytto
    @troglodytto 2 года назад +14

    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  2 года назад +3

      Woops! Added, thank you!

    • @SolomonUcko
      @SolomonUcko 2 года назад +2

      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  2 года назад +2

      @@SolomonUcko yeah, doesn't have to be perfect to be perfect for me

  • @yashashav_dk3766
    @yashashav_dk3766 2 года назад +2

    You never cease to make me smile!
    Thank you!

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      You're too kind! New video next week (It's about LIGHTSABERS, don't tell anyone)

  • @Elliot.2591
    @Elliot.2591 2 года назад +4

    Saw this title and thought "well this just contradicts everything you've taught me"

  • @JoniniTheChickenNugget
    @JoniniTheChickenNugget 8 месяцев назад

    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

  • @rafaeldeconde8148
    @rafaeldeconde8148 2 года назад +6

    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  2 года назад +5

      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?

  • @fabyao
    @fabyao Год назад +2

    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? ruclips.net/video/ifaLk5v3W90/видео.html
      Would love your thoughts if you check out more :-)

  • @RHulka
    @RHulka 2 года назад +3

    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  2 года назад +2

      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 2 года назад

      > 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 2 года назад

      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 2 года назад

      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.

  • @AminD0
    @AminD0 2 года назад +1

    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  2 года назад +1

      That actually makes sense because I produce a scifi mental health podcast called Lost Terminal, you might like it! ruclips.net/video/p3bDE9kszMc/видео.html

  • @sadhlife
    @sadhlife 2 года назад +6

    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  2 года назад +1

      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 2 года назад +2

      @@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  2 года назад

      ​@@sadhlife Many thanks! Do you know a good example of such a benchmark?

    • @sadhlife
      @sadhlife 2 года назад +1

      @@NoBoilerplate the techempower framework benchmark seems a lot more reasonable

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +4

      @@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/

  • @WackoMcGoose
    @WackoMcGoose Год назад +2

    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 Год назад +1

      @@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:
      ruclips.net/video/p3bDE9kszMc/видео.html

    • @WackoMcGoose
      @WackoMcGoose Год назад +2

      @@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...

  • @blackflan
    @blackflan 2 года назад +3

    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  2 года назад

      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?

  • @Zihad
    @Zihad 2 года назад +2

    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  2 года назад +1

      oof! I'm on it, but that's a tough video for me to write. I'm learning so much! Soon though!

  • @Fusselwurmify
    @Fusselwurmify 2 года назад +6

    "they're not abandoned, they're done" - mind blown

  • @gianclgar
    @gianclgar 2 года назад +1

    you nailed the youtube dark background color

  • @alexzander__6334
    @alexzander__6334 2 года назад +3

    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  2 года назад +1

      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 2 года назад +1

      @@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

  • @hostar2
    @hostar2 2 года назад +2

    - So, who do you like talking to?
    - Compiler.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      I'll take the compiler over log lines any day XD

  • @chrs-wltrs
    @chrs-wltrs 2 года назад +9

    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 2 года назад +2

      .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  2 года назад +1

      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  2 года назад +3

      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  2 года назад +2

      But honestly? The web IS the interface.

    • @chrs-wltrs
      @chrs-wltrs 2 года назад +3

      @@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.

  • @perplexedon9834
    @perplexedon9834 5 месяцев назад

    The way I think about unwrap and expect, and what I constantly tell myself as I code, is: "They aren't a way of handling errors, they are an alternative to handling errors." It makes me remember that I am consciously choosing to leave the work unfinished when I use them.

  • @inomo
    @inomo 2 года назад +4

    How exactly is compiler experimentation a substitute of the repl? Could you make a video with a detailed example?

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      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."

  • @gaiusjuliuscaesar9296
    @gaiusjuliuscaesar9296 2 года назад +1

    Your channel has inspired me to learn Rust. I am enjoying the book so far, it is very well-written and comprehensive

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +2

      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 2 года назад +2

      @@NoBoilerplate thanks for the extra resources!

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      @@gaiusjuliuscaesar9296 GOOD LUCK!

  • @Cyklanlps
    @Cyklanlps 2 года назад +8

    I haven't even started writing Rust, so I guess the title says I won't ever do it /s

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +2

      Oh you should totally try it! It's dead easy to get started, head over to rustup.rs and install with one line!

  • @tandex3414
    @tandex3414 2 года назад +2

    ~3:00 obviously your code will compile in 40 years if you don't use rust-nightly, yes, I needed to change local copies of libraries for os when updating rust

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      That's true, linked libraries will almost certainly go away. But one of the exciting things about Rust is that we're slowly replacing them!

  • @mergenstudios8779
    @mergenstudios8779 2 года назад +6

    havent watched the video yet but the title seems promising

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      It's a bit RUclipsY but I really do love Rust because I can finish projects!

  • @AceofSpades5757
    @AceofSpades5757 2 года назад +1

    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  2 года назад +1

      RIGHT! that's something I've only learned about recently too - what an incredible promise for the compiler team to make!

  • @replikvltyoutube3727
    @replikvltyoutube3727 2 года назад +7

    I think the bridge analogy is more in favour of something like C than Rust, but nice video

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      It's not PERFECT is it, feels a little waterfall-y to me

    • @jbird4478
      @jbird4478 2 года назад +1

      I think it's perfect. There a new bridge that's already Rusting next to that historic monument :P

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      @@jbird4478 it's the other way around actually.thebhistoric monument was safely rusting, and the new concrete bridge is crumbling !

  • @delphicdescant
    @delphicdescant 2 года назад +2

    They should probably be paying you for advertising this compelling.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      I sure wish SOMEONE would.
      *winks at squarespace, hello fresh, eve mattresses*

  • @mariusp.2478
    @mariusp.2478 2 года назад +4

    I'm glad I'm not the only one who chuckled at Amazon calling it a "thermal event"

  • @martinmassera
    @martinmassera 2 года назад +1

    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  2 года назад +1

      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

  • @Slamy4096
    @Slamy4096 2 года назад +4

    I'm now learning Rust for about 3 weeks and being an embedded developer, I also dipped my toe into the embedded rust way of seeing things. I've now returned to this video which was one of those that have motivated me to learn Rust in the first place. You have a very calming voice and all of this is very professionally produced.
    At 5:25 you say that Rust respects my time and this is something I have to disagree with. The learning curve of this language feels like a wall as soon as you are fighting with the lifetime system for the first time and all examples on the web are rather simple compared to the error messages you are confronted now with.
    This video might be true for the "normal Rust" on the average hosted environment that is an operating system. But bare metal rust is a whole different story and it could bring a grown up man into tears.
    I'm especially not fond about Rust being able to completely rewrite its rules. An example:
    Usually "static mut" is considered unsafe. But as soon as the cortex_m_rt crate is added to your system and the procedural macro "entry" is added to your main function, "static mut" is internally replaced by references to those static mut variables, making the access safe again. This however is not visible to the keen eye of a developer. This is obfuscating as the rules of the language are changed by this, making the code not readable.
    Of course this is not your fault by any means. I just needed a place to vent. The reason for choosing this video to do so is your positive view on Rust without any hint of negative aspects. This language is not respecting my time. Maybe it does so as soon as I grow stronger using it. But not now.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +5

      I understand the brick wall of learning curve - I crashed out of Rust twice in 2020. I had a mentor to help me back then, and so I eventually moved through it. You will too, if you stick at it.
      You've done exactly what I hoped people would do: Return to my inspirational videos when they find things get tough, and they need motivation and encouragement.
      When I said "Rust respects your time so much" I did not mean that you can get going quickly. You obviously can't, nor could I. What I meant was that Rust won't let you make mistakes that will waste your FUTURE time for hours and hours. It forces you to make correct design decisions today, now, before compiling. In other languages, it's easy to start projects, in Rust it's easy to finish them. (but much harder to start - a cost you only have to pay ONCE).
      If you are fighting with the compiler, you are actually fighting, in my experience, with reality. Perhaps your data model needs re-working, or you are misusing boxing or other more complex features. Take a break and come back to it.
      Though you're in a more constrained environment than I am, being an embedded developer, the same rich language is available to you at compile-time. Find ways to move more of your logic into compile time if you can, that way the compiler can help you more. Check my latest video for some simple design ideas. tldr: Make invalid states unrepresentable. Make it as comprehensive as you can.
      Lastly, thank you very much for complementing my audio production, I take a lot of time to get it right, and I'm getting better every year. There is more of my calming voice in my hopepunk podcast, Lost Terminal, if you would like, first season here: ruclips.net/video/p3bDE9kszMc/видео.html
      Good luck, and do come ask questions on my discord if you get stuck (links on noboilerplate.org)

    • @H2CO3Szifon
      @H2CO3Szifon Год назад

      "The learning curve of this language feels like a wall" - nah, sorry to say, but if you feel like Rust is hard, then you definitely ignored rigorously following best practices in whatever language you have been using before. No, "embedded" is not different. You are probably holding it wrong. Trying to use global mutable state for MMIO ports? Just don't. That was never good practice even in C, but embedded devs love to just wing it because… who knows why?

    • @Slamy4096
      @Slamy4096 Год назад

      ​@@H2CO3Szifon I'm confused as I've just written an answer. But it disappeared. Oh well... again…
      It seems my comment hasn’t aged well. 10 months ago and the time has passed. To be honest, I don’t even remember what my problem back then was. I guess it was about solving the global mutable state somehow as I needed to get peripherals into an interrupt handler. And there I have to disagree with you. Embedded is very different here as most Rust examples don’t handle that case. Providing ownership to an interrupt routine is something very abstract coming from C++. I’m aware that in that language I need to keep an eye on my code and protect the shared state with a mutex as the compiler is just not aware enough about it. But with Rust the knowledge of the problem is not enough. I also need to know the syntax and the semantics so that the compiler and I do share a common sense. I needed to learn about interior mutability with RefCell and Mutex.
      At that time I didn’t want to use Embassy or RTIC to get cleaner view on the language itself.
      I’ve also read again my comment. I expressed my confusion about the static mut with somehow became safe. I have now grown and I do know that this was caused by a macro generating some code which I couldn’t see.
      In the meantime I’ve learned a lot and also did a bigger project with the language.
      github.com/Slamy/STM32-USBFloppyTracer
      I wanted to build a machine to write raw flux data to floppy disks. It’s completely written in Rust.

  • @distrologic2925
    @distrologic2925 2 года назад +1

    Thank you for putting my love for Rust into words

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      I'm still trying to do it justice, thank you!

  • @jakob7116
    @jakob7116 2 года назад +4

    Woah that js was just 4x slower than C was what surprised me

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +8

      Me too! The secret of JS and Java being so fast is TRILLIONS OF DOLLARS OVER DECADES OPTIMISING EVERY NANOSECOND.

    • @jakob7116
      @jakob7116 2 года назад +1

      @@NoBoilerplate when you put it like that lol

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      @@jakob7116 $$$ = fps

  • @Holobrine
    @Holobrine Год назад +1

    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  Год назад

      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 Год назад +1

      @@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  Год назад +1

      @@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 ruclips.net/video/PuMXWc0xrK0/видео.html

  • @hasanhuseyinyurdagul5403
    @hasanhuseyinyurdagul5403 2 года назад +4

    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  2 года назад +4

      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 2 года назад

      @@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  2 года назад +1

      @@Guinea.Pig-Gaming You're right, I should be saying C/C++. Nightmare to manage memory with!

  • @MrJozefleo
    @MrJozefleo Год назад +1

    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  Год назад +1

      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!

  • @MichalKottman
    @MichalKottman 2 года назад +16

    "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  2 года назад +4

      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 2 года назад +3

      @@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  2 года назад

      @@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 2 года назад +3

      ​@@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  2 года назад

      @@benjaminschaaf I will, thank you very much for the feedback, I appreciate you taking the time to help me out :-)

  • @flamewave000
    @flamewave000 11 месяцев назад +1

    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  11 месяцев назад +1

      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 11 месяцев назад

      @@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 2 года назад +3

    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  2 года назад

      That is a shame. All will be fixed in time, one would hope!
      What are you building on windows?

    • @laundmo
      @laundmo 2 года назад

      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 2 года назад

      ​ @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 🤷‍♀

  • @Spiun666
    @Spiun666 2 года назад +1

    I've been programming for 22 years of which 12 professionally. Rust is the only language in recent history that made me as excited about programming as I'd get more than a decade ago. Lots of little smiles as I check out various things and go like "oh, they got this right... oh, they got that right..." etc.
    I would still like a GC in most cases, but even if I absolutely hated non-GC languages the sheer awesomeness of all the other things in Rust would still make it worthwhile.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      Yeah! the DENSITY of good decisions is great isn't it!
      I'm curious, what do you miss a GC for?

    • @Spiun666
      @Spiun666 2 года назад +1

      @@NoBoilerplate Its really great for a functional immutable programming style where different bits of the program hold on to different parts of immutable state, which makes lifetime tracking difficult. (Not impossible of course, there are all sorts of Arc implementations, but a GC is actually faster in those cases as it doesn't have to keep track of reference counts).

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      @@Spiun666 Ah that makes sense! I sure love Haskell XD

  • @bozhidaratanasov7800
    @bozhidaratanasov7800 2 года назад +3

    Aren't C and C++ considered high level languages as well?

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      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.

  • @Sancarn
    @Sancarn 2 года назад +2

    The last project I started in Rust never got finished.
    The last project I started in Ruby did get finished.
    I hit a brick wall with Rust when it came to OOP (and FFI to be fair). I needed an interface and couldn't figure out how I could implement such a thing. In the end, I gave up...

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +2

      I've heard a lot of people have trouble with how to model data using Rust - we're so immersed in the OOP world that we've not got patterns to fall back on. I don't yet have a full video on the subject, but I am getting there!

    • @Sancarn
      @Sancarn 2 года назад +1

      @@NoBoilerplate will definitely keep a watch out for it 🙂

  • @Chris-on5bt
    @Chris-on5bt 2 года назад +6

    The more I use Rust the more I find that the forms that once oppressed now in fact liberate.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +2

      Oh shit are you selling that on a pillow!
      Could you elaborate?

    • @Chris-on5bt
      @Chris-on5bt 2 года назад +2

      @@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  2 года назад +2

      @@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 2 года назад +2

      @@NoBoilerplate Sure no problem.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      @@Chris-on5bt well much obliged. How would you like to be credited? Any notable URL?

  • @EudaderurScheiss
    @EudaderurScheiss 2 года назад +1

    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  2 года назад

      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 2 года назад +1

      ​@@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  2 года назад +1

      @@EudaderurScheiss Very salient points. I have both those topics (killer app and OOP alternatives) in my video pipeline.

  • @Elliot.2591
    @Elliot.2591 2 года назад +2

    This was such an excellent video :)

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      Thank you so much! I see you answered my question on your other comment!

    • @Elliot.2591
      @Elliot.2591 2 года назад +1

      @@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  2 года назад +1

      @@Elliot.2591 We can only ignore our happiness for so long. Take care!

    • @Elliot.2591
      @Elliot.2591 2 года назад +2

      @@NoBoilerplate You too man! :)

  • @Elliot.2591
    @Elliot.2591 2 года назад +6

    Any thoughts on making a discord server for your community? I love the vibe and see growth in your future :)

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +6

      This needs to happen doesn't it. Yep, OK, thanks for reminding me. I'll shout about it when I get round to it!

  • @Haiderali-qd1jy
    @Haiderali-qd1jy 2 года назад +2

    Spreading the word man. Love ya videos keep it up. People need to use rust

  • @cariyaputta
    @cariyaputta 2 года назад +9

    C was for a long time considered a high-level programming language. So the claim that rust is the fastest high-level language is a bit out there.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +6

      Yeah, describing languages as high or low level is a minefield, I had to be SO CAREFUL when I talked in depth about this in my "Rust: Turtles all the way down" video.
      C was indeed high level compared to other languages when it was released, being portable was a real kick-start to code sharing and improving for the old hackers. We owe it a lot. I see Rust as a worthy successor to the crown. I won't mind if we're replacing Rust in 10, 20, 30 years - but I bet we'll be writing the first versions of those replacements IN Rust!

    • @EdouardTavinor
      @EdouardTavinor 2 года назад

      I think it depends on what the task is you want to perform. For example, if you want to do decimal arithmetic, Cobol is probably the fastest high level language, mainly because it runs on hardware with decimal arithmetic built in.
      Also the abstractions used for concurrency in go for example are so intuitive that the average programmer will probably end up writing faster code.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      @@EdouardTavinor isn't being tied to specific hardware a low level trait? 🤔

    • @EdouardTavinor
      @EdouardTavinor 2 года назад

      @@NoBoilerplate i think it makes sense to call it that. However a lot of languages offer libraries for decimal arithmetic. COBOL is the only language i know where decimal types are just standard types (I'm sure there are other languages which have this feature however).
      It's possible that the IBM JVM is clever enough to map small BigDecimals to the machine instructions of the Z-Series processors (or more likely IBM has some libraries that interact with assembler).
      COBOL is just the only language i know of where a compiler exists to use the decimal arithmetic opcodes and the syntax makes this just as straightforward as writing other sorts of number.
      Oh and interestingly it also solves the Null-Pointer problem. It doesn't have allocation :P

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      @@EdouardTavinor honestly this all sounds very reasonable, if I were a bank, first class decimal calculations would be a hard requirement! I wonder why our fancy processors don't do decimal, I suppose base10 is alien?

  • @petermichaelgreen
    @petermichaelgreen Год назад +1

    There are still IMO some issues that can limit the longevity of rust programs that are not maintained.
    One is tls. If you use a pure rust implmentation then your software will eventually become useless because the rest of the world will declare the version of tls you are using to be insecure. If you use an implementation that wraps a native library then you expose yourself to changes in the interface of that native library
    Another is changes in the standard library that don't break the intended interface, but do break crates due to unwarranted assumptions in those crates. This came up with some ip address types in the standard library which some crates were assuming would have the same layout as the C sockaddr structures.
    That is not so say that striving for backwards compatibility is not a good thing but it's important to be aware of it's limitations.

    • @NoBoilerplate
      @NoBoilerplate  Год назад

      Oh absolutely, we can't have perfection here, the real world creeps in.
      But Rust's got a really great compromise in the Editions system doc.rust-lang.org/edition-guide/editions/index.html

  • @glenospace
    @glenospace 2 года назад +8

    Every rust video: Rust is great. Here are 100 analogies.
    Also every rust video: no examples.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      I had 5 slides of examples.
      amiajoketoyou.jpg

  • @gdkid
    @gdkid 4 месяца назад

    so I used Rust and Tauri to make my final project for my school's CS course, and I don't know if it was because I was generally better at programming than the rest of the class to begin with, but I knew for sure that I felt way more confident up at the front of the class when we had to present live demos

    • @NoBoilerplate
      @NoBoilerplate  4 месяца назад

      That confidence translates into real-world production too - I slept SO WELL knowing my prod code was rust!

  • @sploder12
    @sploder12 2 года назад +7

    I take issue with the part around 1:18 where you make the claim of Rust being the fastest high level language. The data presented is cherrypicked and several languages like C++ were omitted. Also grouping Java and JavaScript together in performance is a big redflag, Java is very different from JavaScript.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      Did you look at my source for this data?

    • @sploder12
      @sploder12 2 года назад +2

      @@NoBoilerplate Yes, the source itself looks good but it is unclear how you got the values you present.

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +8

      @@sploder12 the source github.com/kostya/benchmarks shows the time in seconds, I've reformatted the results so that C is 1x, and all others are multiples of C. I think a ratio compared to C as a baseline is the most grokkable way of presenting the data.

  • @emoutraspalavras-marloncou4459
    @emoutraspalavras-marloncou4459 2 года назад

    It is so beautiful and inspiring that I am about to cry:) thank you so much!

  • @nolram
    @nolram 2 года назад +13

    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  2 года назад +11

      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 2 года назад +1

      @@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  2 года назад

      @@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 2 года назад +1

      @@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  2 года назад

      @@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/

  • @amj.composer
    @amj.composer 2 года назад +2

    Is rust a language you should learn only if you have an appropriate project for it in mind? Or does one benefit fro learning the basics regardless of the field they're going in? What are some languages you recommend to learn before rust?

    • @NoBoilerplate
      @NoBoilerplate  2 года назад

      You've done Python and R, that's enough! You will find it easier to get INTO the industry with Python, however. So don't give that up, in fact study more, here's what I recommend mitelman.engineering/blog/python-best-practice/automating-python-best-practices-for-a-new-project/

  • @irlshrek
    @irlshrek 2 года назад +8

    "theyre not abandoned; theyre done". what a mic drop

    • @NoBoilerplate
      @NoBoilerplate  2 года назад +1

      It was a huge realisation for me about a year ago, and it all clicked after the convo with the rust maintainer.

    • @irlshrek
      @irlshrek 2 года назад

      @@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)