Rust makes cents

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

Комментарии • 500

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

    ERRATA
    Tauri hasn't yet release mobile app bundling, though its in their roadmap. Desktop only for now!
    2:31 Though the "80%" header is right, the table below is only for 128MB lambdas
    4:53 The heading reads "Hander" instead of "Handler"

    • @redcrafterlppa303
      @redcrafterlppa303 2 года назад +11

      Then for now we will just write it in wasm and use a webapp infrastructure. Rust has always a way ; )

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

      We do have Rust in our kernels now too.

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

      Can't wait. Really wanted to check out Rust's mobile feasibility, but couldn't find anything particularly easy to get the feet wet.

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

      Plus we can write Python dynamic libraries in Rust using PyO3

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

      yeah, I'm really waiting for it because it will cover all my project needs with it (windows, android, linux, ios, macintosh, oculus quest (I hope)).

  • @jameslugenga9454
    @jameslugenga9454 2 года назад +317

    will he ever make a video that isn’t amazing probably not

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

      You're too kind! I'm always improving.

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

      @@NoBoilerplate This one is right. You seem to just not be able to not be amazing.
      Your videos are a real source of inspiration for a lot of us.

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

      @@nicolashumbert8344 Thank you so much, I'm so grateful!

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

      @@NoBoilerplate As others have said, the quality of your videos is high, and I feel like that's also part of why you love Rust so much, because you too care about correctness. And with such, you keep your videos correct, which in the context of YT vids would be considered videos that achieve their goals well and nothing else, and since you're teaching us about Rust, you're fast, concise, and to the point with no meaningless detours.
      This video quality is amazing, and I'm very thankful to have stumbled onto this channel. Thanks for your amazing work!

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

      @@znefas That's so kind of you to say, thank you 🙂

  • @EdissonReinozo
    @EdissonReinozo 2 года назад +334

    This is becoming a must watch channel. I don't even read the title anymore. I know it is my reliable rust content.

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

      Thank you! Keep checking the ERRATA comment to make sure it's actually accurate!

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

      Completely agree. Started watching just a couple of weeks ago and now I click as fast as I can when I see a new video

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

      Same, this channel is always amazing

    • @BikramKumar-uy8nl
      @BikramKumar-uy8nl 2 года назад +5

      @@NoBoilerplate The fact that you mention this also makes you worth the praise. Thank you for the content.

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

      oui

  • @DoomKaiserGliders
    @DoomKaiserGliders 2 года назад +88

    "oxidizing your entire stack" what a great line, cheers

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

      Here's another, if you've not heard of it: Rust is named so because it's close to the metal!

  • @foobar3770
    @foobar3770 2 года назад +93

    These videos convinced me to write my latest project in rust. At first I thought the project was too big, too many states to model and too many breaking changes. But having written something once, it never broke. Whenever I added a new thing, I first extended the valid states by changing the type of a variable from String to a parsed struct - and the compiler told me where I had to fix stuff. When there were no more compiler errors, I was done. It's fun to write code like this.

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

      "When there were no more compiler errors, I was done." this is my experience every time I write Rust too! Isn't it relaxing!

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

      Can you please explain what do you mean by “added a new thing”. It’s so hard to understand what you are working on.

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

      Oh! The same for me!
      I rewrote an old project that never leaves my mind, and now it works at a decent speed and memory usage, while doing what I want it to do.
      It was strange at first, seeing errors and warns I didn't even know the meaning, but with time (just 2 days), once there were no more errors, it was beautiful (actually, as it's image processing, and I have a bad taste, it was ugly, but conceptually working)!

  • @tuskiomisham
    @tuskiomisham 2 года назад +59

    I read that energy efficiency paper. The reason Java is so high up is because they used Java to execute the power analysis function, and instead of launching the program externally like they did for literally every other language, they just ran the Java program inside the same VM, cutting corners significantly.

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

      Rude!

    • @tuskiomisham
      @tuskiomisham 2 года назад +11

      @@NoBoilerplate indeed, but so is academically misleading many people

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

      @@tuskiomisham oh I'm so sorry, I meant that them misleading people is rude, not you!

    • @pixelsam123
      @pixelsam123 2 года назад +15

      Public static void main string args amirite

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

      @@pixelsam123 say it again, public static void main string args
      also you forgot the class

  • @enque01
    @enque01 2 года назад +192

    The production quality of this is so high. The message is a complex thing made simple, using rudimentary graphics done well, overlaid with a voice that is so pleasant this guy should voice audiobooks. Very much appreciate the level of quality in this!

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

      You're too kind! I honed my production skills on a hopepunk, scifi podcast, and I'd love to know what you think! ruclips.net/video/p3bDE9kszMc/видео.html

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

      i mean, he does a fiction podcast, so audiobooks kinda. it's also really good

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

      @@NoBoilerplate I always wondered why you opted for calling it a podcast.

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

      @@raymanovich3254 what, Lost Terminal? Isn't it a podcast?

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

      @@NoBoilerplate It is - but the meaning of _podcast_ has been lost over time - I certainly found it surprising that a podcast meant _any_ digitally distributed programme, and did not specifically refer to the format of several hosts having a recorded conversation...
      P.s. Lost Terminal is amazing! It's the first podcast I've listened to in a long time (read: ever) and I love it.

  • @the_kovic
    @the_kovic Год назад +40

    You've mentioned execution time and memory usage but there is an area you didn't mention: disk usage.
    Rust's compiler is a powerful tool that does a lot of checking for you. This takes a lot of time. The first build in Rust takes a long time, easily in the order of minutes. The authors knew this and so, just like C's object files, the compiler produces a lot of artifacts to remember its progress. And this is where the cost of Rust manifests because nothing in the world is ever completely free. Rust consumes a lot of persistent memory on the developer side to power its magic. Even a simple hello world project will take a couple hundred megabytes, real projects easily number in gigabytes of compile-time artifact data.
    There is a argument to be made that persistent memory is pretty cheap today and that this single-time, developer-side cost of space is a small price to pay for all the good stuff - and I would agree with that. But I felt it necessary to mention it for the sake of completeness.

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

      Very good take, it's certainly an are that could be optimised more isn't it? Running a Rust CI pipeline is very different to other languages for this particular reason!

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

      wait kovic? the_kovic, the one that made the doom eternal ost remaster? You a rustacean too? life is crazy! cheers m8

  • @shreyasjejurkar1233
    @shreyasjejurkar1233 2 года назад +19

    As Mark (CTO of Azure) correctly tweeted, C/C++ should be declared as retired languages and instead use Rust.
    Am pretty sure, going forward most of the cloud services and data centre infrastructure code will be written in Rust. Fast, energy efficient and of course cheap!

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

      All that is required is for people to understand the power that we have today with rust. I'm making progress on that goal 😊

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

      Rust is very new to me, and I wonder: Do you use unwrap()s if you are certein that a variable is Some or Ok?

  • @LukaSauperl
    @LukaSauperl 2 года назад +50

    That feeling when he says "Hi friends" and for a moment you feel like you actually have a friend ... and then the video ends.

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

      Plenty of friends on the noboilerplate.org discord :-)

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

      Just program a friend in Rust.

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

      Rust is my best friend

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

      @@somedooby honestly it feels like that when working with the compiler - amazing!

  • @dixaba
    @dixaba 2 года назад +17

    When I first tried Rust in 2016, I was repelled by its weird syntax and borrow checker - C++ seemed much more familiar. Later (in 2019) I decided to try it once more, maybe write something small and simple. And it clicked. Since then I'm using Rust for all my personal projects. I don't remember last time when my program crashed NOT on my own unwrap(), which is just quick dirty hack to make program compile. But unlike said C++, I know that I can just grep for unwrap()s and replace them with proper error handling, not re-reading whole code 50 times.

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

      THIS IS EXACTLY IT
      Rust can panic like other languages, but you can SEE when it's going to. Fantastic!

  • @cylian8422
    @cylian8422 2 года назад +81

    Can we get a complete Rust tutorial for begginers?
    You have an amazing writing style and your voice is very pleasant to listen. I'd love to see a good Rust tutorial series

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

      Thank you! I did that once, have you seen this ruclips.net/video/br3GIIQeefY/видео.html
      My focus for the moment is shining a light on all the incredible features of Rust. Once you're excited, The Book is all you need to learn, it's written brilliantly!
      doc.rust-lang.org/stable/book/

    • @zakstephens9297
      @zakstephens9297 2 года назад +15

      @@NoBoilerplate This is low value and high effort, but the Rust Book with your radio voice would probably come out like a fun bedtime story.

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

      @@zakstephens9297 It's ridiculous to call the rust lang book "low value", meanwhile learning any language is going to be high effort if you want to be fluent in it. The rust lang book is probably the single highest quality resource I've come across learning ANY language, with an imbedded compiler and multiple examples and explanations for every single rust concept.

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

      @@TheShadowmanInc Nah, I mean getting old mate to read it out is low value. The Rust Book is fantastic, I have a copy on my desk right now.

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

      @@NoBoilerplate The Book is my bible for the past month.. What an amazing doc is that!

  • @eboubaker3722
    @eboubaker3722 2 года назад +29

    It's a good day whenever he uploads 😀

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

      Yep, always feels such a long wait for the next one..

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

      I feel the same! So nice to chat to everyone :-)

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

      Currently it's fortnightly, but if the Patreon takes off...!

  • @angeldude101
    @angeldude101 Год назад +16

    In exchange for making code fast, you generally have to sacrifice some space to hold the compiled binary. While your code may not get to the size of a shell-script one-liner, Rust has plenty of tools available that let you get down to an absurdly small binary, even forgoing the entire C runtime, while still being confident that things won't break.

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

      17k on windows, is the record I've seen!

    • @Heater-v1.0.0
      @Heater-v1.0.0 5 месяцев назад

      I'm not sure what you mean by "In exchange for making code fast, you generally have to sacrifice some space to hold the compiled binary." Whilst it is true that sometimes one can optimise a compilation for speed and get a bigger binary as a result or vice-versa, I would say that in general the differences are not very big. More common is things like Java, Javascript, Python where one gets extra memory usage, thanks to the way they maintain variables and use garbage collection and at the same time slow performance, for much the same reasons. That's before we have added on the memory consumed by their run-rime systems/interpreters. Anyway, yes, Rust can produce binaries that are as small and performant as C or C++ can, there are many embedded projects running on micro-controllers to test to that. By the way, what do yo mean "forgoing the entire C runtime, "? C pretty much does not have a run time beyond what is needed to initialise the stack and such before jumping to main(), but even that is not running once your program is started.

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

      @@Heater-v1.0.0 That comment was largely in reference to replacing a shell invocation that took a few dozen bytes with a 2kiB binary (which was optimized for size). And yes, C _does_ have a runtime and Rust by default links to it, and the dynamic linking alone actually increased the size of the binary more than reimplementing the necessary parts myself.

    • @Heater-v1.0.0
      @Heater-v1.0.0 5 месяцев назад

      @@angeldude101 Well certainly it nice to be able to write one line of shell to get some quite complex task done. The comparison with a 2K compiled binary is of little relevance usually. I mean, that line of shell script can be dependent on millions of lines of code, in the shell interpreter, in the commands it is invoking, in the libraries they depend on, in the operating system the whole thing runs on. Perhaps if you wanted to do that same task on a memory constrained system, like a micro-controller, the 2K compiled binary would be the way to go.
      No, C does not have a run-time. Sure your C code may depend on library functions defined in the standard library. Or it may depend on other libraries. Or it mat depend on syscalls to the operating system. It mat even achieve all that via dynamic linked libraries. Non of that is a language run-time. That is just library dependencies. After all consider the kernel of your operating system, often written in C, there is no language run-time underneath that, it is running on the bare metal. In fact that kernel provides run time facilities that all your applications need. Yeah, I know there is often something called "crt" something or other, as in "C run time" that is typically very small and only initialises the stack, processor registers, static variable, etc before jumping to your main(). It can be as small as a handful of instructions. It's also not running when your C code is.
      Whilst it is true that Rust links to the standard functions provided by lib C on Linux, Windows, Mac etc, that is not actually necessary to run Rust programs. Many people are using Rust on bare metal systems that have none of that.

  • @owenkanaal3457
    @owenkanaal3457 Год назад +4

    stop promoting the massive lie that python is human readable, even in a video about rust

  • @leegeorg08
    @leegeorg08 2 года назад +11

    I'd love to see how one might take formal specification (such as TLA+/PlusCal) and bring it over to the invariants and typing of Rust

  • @penguindrummaster
    @penguindrummaster 2 года назад +11

    Everytime I see your videos, it inspires me to push forward with Rust. It beats me up everytime I try to journey forth, but I'm sure it'll all click eventually.
    Some of the development experience with Rust isn't perfect. An example is the examples.provided with Yew, where I spent 2-3 hours debugging a framework I had never used before to just get their example (written for an older version) working with the latest.
    Ultimately, I'm hopeful for the future of Rust, but I'm also held back by my colleagues that are scared away by the unfamiliar nature of Rust. I'm hoping I can forge a new chapter in my company's history, and move to a bright future in which much of our infrastructure is written in Rust.

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

      Sound like Stockholm syndrome to me. Getting beat up and coming back for more.

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

      You and me both my friend!
      Yeah, I hit that problem with Yew too, their documentation could be better :-( But once I got it working, I LOVED hot-reloading in-browser. That was an unexpected treat!

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

      I too had this experience, with all the tutorials being so simple it gives you the idea that all will be simple from now on. But then when you try making your own thing that is not a tutorial, the compiler beats you up! It is frustrating - "I just wanna use the thing I just created! Why can't I even REFER to it, you silly compiler?!"
      But I find, now after a while, that stops happening. I kind-of just started placing things in memory more consciously, more deliberately, and when I mutate things i tend to do it in a more structured way than before. And slowly the compiler stopped being an annoying brat. Now I even prefer doing "quick and small" tools in Rust, over Python.

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

    You can definitely see the improvements in information quality by the number of items in ERRATA decreasing each video. Keep it up!

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

    "The human cost of writing Rust" 😆

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

    Another thing about rust that makes it very good for writing code: I often find that if I understand what a struct is, I can very often tell what a method does just by its name and type signature. I can also very often find the method I want quickly by looking through the autogenerated documentation

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

      This is something you find in Haskell too, rich types are amazing!

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

    Currently in the process of learning speed (coming from a Javascript background). I do find it quite challenging, but I hope it'll all pay off in the end. When I do get something write, I feel like I just wrote a magic spell.

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

      It's a tough start, you're doing well so far! I recommend:
      - fasterthanli.me/articles/a-half-hour-to-learn-rust
      - My rust series (10 other videos)
      - The Book doc.rust-lang.org/stable/book/
      Good luck! Ask for help on my discord if you need it, loads of nice people there! links on noboilerplate.org!

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

      @@NoBoilerplate Thank you very much for the recommendations. I'll stick with it. I know I'll be turning to nice people like you when in need of help!!

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

    hi friends. my name is tris and this is no boilerplate, focusing on fast, technical videos.

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

      you should have your own show! :-D

  • @defnlife1683
    @defnlife1683 Год назад +4

    “5x faster… If you single thread them.”
    Vito Corleone “ Look at what they did to my boy.”

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

    The voices, the script is so fascinating to watch & listen. 😊😊 you are the one who inspire me to try rust.

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

      Thank you so much! If you want something relaxing to listen to in my voice, I recently started season 10 of my hopepunk scifi podcast, Lost Terminal ruclips.net/video/p3bDE9kszMc/видео.html

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

    Can we get a video describing your workflow when creating a video like this if you have time? what software do you use. Why and how do you do things?

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

      Have a look at the middle of my 'lightsaber' video - I use obsidian.md!

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

      @@NoBoilerplate Rust and obsidian! Tis a beautiful way to live

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

    Can you talk about the implications of adding Rust to the Linux Kernel and how it affects code safety e.g. when a kernel panic occurs from whatever cause
    could Rust handle that better than existing C implementations?

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

      I too am looking forward to the discussion on this topic. I'm not a kernel developer, so I'm not the right person to talk about it I'm afraid!

    • @lucky-segfault
      @lucky-segfault 2 года назад +5

      rust doesn't inherently handle panics better, but it does require programmers to clearly mark everywhere where a panic can occur using the `panic!()` macro, the `.unwrap()` method, or something similar.
      In theory, if a programmer can replace all `panic!()`s and such with code that compensates for the issue, you code can become panic-proof. You can even use a macro called `no-panic` to make sure a method is incapable of panicking or it will fail to compile.
      In practice, I suspect panics will still happen sometimes, but they may be so rare as to only effect driver developers with non-rust languages and the like.

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

      @@lucky-segfault Indeed, I did a video on this very topic! ruclips.net/video/sbVxq7nNtgo/видео.html

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

      I haven't looked at the latest iteration in detail, but as far as I'm aware the kernel doesn't panic. That's not a thing it wants to ever do. In light of this one of the things that were required to put rust into the kernel was to provide better support for non-panicking data structures/functions. For example Box::try_new tries to allocate a new Box, but if it runs out of memory and the allocator can't do that, then it gives an Err instead. So Rust's normal enum and rich type system actually makes the same patterns even better. In C you would perform the allocation and simply receive a null pointer in the cases where it runs out of memory, and it's up to the developer to check each pointer returned by malloc.
      In Rust that's as easy as ?

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

      In fact Asahi Lina (whose live streams are on youtube) has just written a GPU driver for the M1 mac in Rust, which is where I saw these patterns

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

    I've been learning Rust for a few weeks now and one of the things I've spotted is how well the type checker helps you prevent errors you didn't even realise were possible.
    For example, I recently got a compiler error because converting a character to uppercase returns an integrator of characters rather than a single character - it turns out that in some languages, converting some letters to uppercase gives two letters as a result.
    Without Rust's type checker and its spectacular support for Unicode I never would have considered that edge case, which for some kinds of code is going to lead to massive bugs - you've probably heard of all the crashes on iOS and Android due to text rendering issues (if not, Tom Scott has great videos on it). I wonder how many crashes would have been prevented if the text-rendering engines for our operating systems were written in a safe language like Rust.

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

      Right! The whole community cares about correctness, this is SUCH a huge force!

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

    Jean Young's talk on Strange Loop was amazing for bringing attention to system rationality and not just saying "your local program is the only system you ought to be concerned about" knowing there's plenty of tooling for proving local state to not only be correct, but for invalid state to not be representable. Proving that our code can be glued together to talk to other systems correctly would be a huge win in my book for engineers everywhere! :)

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

      Nice! I'll watch, thank you

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

      Some projects use pact for this when the language is JavaScript. It is used to shard type definition, test cases and mock code between systems. Ones systems mock code are the expected values for the test cases of the other system. This shows that a rich type system together with sharing the type definition goes a long way to securing compatibility. Perhaps there's something like pact for rust, which would also share the tests.

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

      You can see the full talk here: "Building Observability for 99% Developers" by Jean Yang (Strange Loop 2022)
      ruclips.net/video/UJA4PGKny2k/видео.html

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

      @@LowestofheDead Nice, thanks for the link!

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

    Hey, awesome content as always. Was just wondering: I have a hard time differentiating your videos from afar when I see them appear in my recommended, mainly because they're so similar visually (thumbnail). I'm sure you're aware, so have you thought about how you could have more diversity in your thumbnails apart from keeping the same icon and changing the text? I mean, your thumbnails *are* recognizable, I immediately know it's your video, so I guess that's good, and given they're not really about any visual topic, I also struggle to come up with a good alternate design without making them annoyingly clickbaity or cluttered. I don't know! What are your thoughts?

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

      My rust series won't go on forever. I will eventually run out of features to hype up! :-) And then, I might try a different colour logo.
      It's entirely possible I'll need to figure out the art of a YT thumbnail later on, and you might find big changes!
      I'd welcome any and all suggestions.

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

    Thank you for the video. The style of your videos feel like a breath of fresh air. Interesting topics presented in a simple to understand and short enough format. No boilerplate indeed.
    I wish other content creators would learn from you

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

      You're very kind! I try to make it as good as I can.

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

    I honestly don't get it, but is this video extolling the virtues of static typing vs dynamic typing and compiled languages vs interpreted languages?

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

      I didn't set out to do so. Perhaps I make assumptions that the audience has watched the previous videos in my rust series?
      There's far more to Rust than static typing: ruclips.net/p/PLZaoyhMXgBzoM9bfb5pyUOT3zjnaDdSEP

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

      @@NoBoilerplate Well, the thing about prevoius videos is that it's entirely reliant on the RUclips algorithm. It recommended this video to me without telling me there were others.
      From what I can tell after spending 10 minutes with an installed compiler, it's a convoluted language combinging the arcane syntax of C++ with an extensive pythonesque library.
      I mean, that's not necessarily a bad thing, but I have to wonder if it's a gatekeeping language intended to scare away new developers with its unnecessarily complicated syntax.

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

      @@YDV669 I should make it clear that these are part of a Rust series! Good point, thank you.
      Oh it's TOUGH isn't it! I also hated the syntax when I started learning in 2020, I gave up twice, but luckily had a mentor that put me back on the right track!
      Here's the way to think about it: C or Python or other popular languages don't have all this syntax because they don't support the FEATURES that rust has that they don't.
      Three clear examples of this are the Result type, often seen in return values, lifetime annotations (which state that reference x must live at least as long as reference y), and references themselves.
      A recent video where I showed an example of why this extra syntax is needed was Rust on Rails ruclips.net/video/sbVxq7nNtgo/видео.html
      I'd love to know your thoughts after watching this.

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

      @@NoBoilerplate Book follows. :)
      So I watched your video, and I still don't really agree that such syntax complexity is necessary, despite all the things Rust seems to do for you at the compiler level.
      let mut x = 1
      let y = 1
      Why force the use of two keywords for almost every single variable? Mutable function variables would normally be the default, with immutables the exception, wouldn't they?.
      mut x = 1
      let y = 1
      Or to more clearly identify the immutables,
      let x = 1
      imm y = 1
      The constant abuse of the exclamation mark(!).
      The apparently forced use of the question mark(?) to unwrap the actual result from a return payload.
      "Your code will never crash." That's like the worst thing to tell companies. Maybe it won't crash, but is it correct? It's bad enough remembering having a manager with the unshakable belief that code is production-ready the moment it cleanly compiles and after a few sanity-check runs(yes, even batch update cycles). This kind of thought corrodes development budgets.
      I have no problem with the language enforcing safety at compilation time, but does it need to be so needlessly and thoughtlessly convoluted? It sounds great at the "I designed a language to impresse my girlfriend" stage, but when you're debugging a program at 3am(or even compilation errors) after already being awake for 20 hours, the ivory tower intellectualism embedded in the core of this language isn't going to win you any friends due to issues with arcane syntax potentially obscuring critical logic errors with badly placed question marks or somesuch.
      I say all this as someone who grew up on a language that literally did not believe in division by zero being any sort of error, where string comparisons were all essentially right-trimmed(empty string is equivallent to ' '*x where x is any integer from 0 to MAXINT).
      None of this is intended in any way as a criticism of you personally. Your videos are well-written and narrated, and I appreciate learning about Rust.

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

      @@YDV669 Thank you for a very coherent comment! I'm DELIGHTED to help you here, you're on the right track, but have misunderstood a few things, I think. If that's due to my video, my apologies. You wrote me a book, I'll write one for you:
      1. Mutability.
      Mutable variables are indeed the default for most languages. Rust chose to make immutability default because it's *better*. Immutability is the default in functional languages, you'll see this in Haskell and similar. Rust is a functional language.
      Look at any modern javascript tutorial, you'll find more `const` declarations than `let`. For instance, here's the first React tutorial reactjs.org/tutorial/tutorial.html the first code blocks that have variable declarations in use const. There are more `const`s on that page than `let`s
      My understanding is that in JS, the advice is is "use const by default, if you need mutability, use let".
      And why is this?
      One reason is Immutable variables are much easier to reason about and debug, we can't accidentally shadow them and mutate them, causing surprises.
      2. "Constant abuse of exclamation mark."
      The compiler enforces that macros must end with a question mark, and nothing else may. If you see a !, you are looking at a macro, simple as that.
      Macros are STAGGERINGLY powerful, they can:
      1. Rewrite syntax at compile time, and
      2. Execute arbitrary code at compile time (even disk and network access)
      You'll never have come across this power before, except if you've use lisp. Other languages have things they call macros (or templates or comptime etc) but they are very rarely able to do both the above superpowers.
      Macros have a bang ! at the end because it's important we know where they are so we aren't surprised.
      3. "Forced use of question mark to unwrap"
      Functional error passing is very different to exception handling and I understand why you are confused. It's not forced, nor does it unwrap the errors. My video on Rust's error handling is here, and I'm very proud of it, do take a look ruclips.net/video/sbVxq7nNtgo/видео.html
      4. (related) "Your code will never crash"
      I think after you watch the above video about error handling, you'll understand why I say this more. Rust CARES about not crashing at runtime (it is this feature that made it perfect for Linux kernel development, something that is THIS WEEK official), and has the complex syntax and compiler to find nearly every case where it could. (edge cases that require more care to handle are OOM errors and unchecked maths, but they both have simple solutions for if you need them, say in an embedded environment)
      5. "arcane syntax potentially obscuring critical logic errors"
      I understand the syntax is unfamiliar, I really do. I hated it for the longest time, I kept crashing out of learning Rust. But I came back for the world-leading features that you simply can't get anywhere else. If you want a hard, realtime language that doesn't use a GC, and you ALSO don't want manual memory management, you're going to NEED the borrow checker. There's simply no other language available!
      The good news here is that the syntax is there for a reason. Other languages don't have borrows, so we need two symbols for a read-only borrow, and a mutable borrow [& and &mut]. OK, and now the compiler needs to know how long the programmer wants these borrows to live for, when can they be cleaned up? let's use ['a 'b 'c], name the lifetimes with simple names, you can use 'longer 'names, but most of the time there's only one or two lifetimes in a function, if any, so 'a and 'b are fine.
      Types are annotated with HashMap angle brackets as normal.
      The way I learned Rust's syntax was by reading the BRILLIANT Amos's blog post: fasterthanli.me/articles/a-half-hour-to-learn-rust
      I was so impressed by this post I made my own video version (after asking permission) ruclips.net/video/br3GIIQeefY/видео.html
      Depending on if you are a reading person, or a watching person, you could try either of these to grok the syntax fast? (I'm, ironically, a reading person!)
      I wish Rust had simpler syntax too. Just as I wish for proper self-driving cars. For now, I'll have to drive a normal car, and program using a bit more syntax! Both get me where I want to go.
      It's worth noting that the rust core team add more and more places where lifetimes don't need to be explicitly stated - the goal isn't to have zero lifetimes, but to have as few as possible, while being unambiguous.
      Thanks for reading all this and chatting with me, I think this video of mine, doing a deep-dive into unsafe and macros explains these two features pretty well - and you simply can't get them anywhere else, AND THEY'RE SO GOOD I didn't know I wanted these features when I was writing Python! ruclips.net/video/PuMXWc0xrK0/видео.html
      Thanks friend!

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

    This channel is a literal propaganda xD This is best shown by 0:50 - 1:50

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

      Yep! My videos are specifically designed to introduce as many people to Rust as possible!

  • @user-qw9yf6zs9t
    @user-qw9yf6zs9t Год назад +4

    the rust compiler is a real friend, instead of hiding things from you, it shows your mistakes in a comprehensible way.

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

    Great and exciting vid! Really like the channel format!

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

    YOO another wonderful video

  • @youpie
    @youpie 8 месяцев назад +1

    no boilerplate is the not just bikes of the programming world

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

    Amazing

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

    Completely unrelated question. What's up with the third rule in the channel guidelines. Why exactly those two words? Do they catch something specific? I appreciate you telling us it's there, but why is it there? Nice video btw

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

      oh there's a PLAGUE of bot spam on youtube at the moment, using those words I had to add them to my blocklist. 1 in 5 comments are spam, and loads come through because they're evolving. So weird!
      Sorry about that!

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

    Being a Java dev (mostly) I never laughed louder hearing “Python was a fresh breath” after “Java” I have to code Python now after Java - lets just say Python awful. The worst language I ever code with. JS - much better, Java - awesome. Rust - double awesome. Python? - must rot in hell.
    Although I much agree with all the other things being said.

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

      Ha! Well, remember I learned Java in 2004, so it was a very different language then XD

  • @TheEvertw
    @TheEvertw 9 месяцев назад +1

    While Rust forces you to prevent errors, the compiler usually tells you exactly how to fix the problem, and gives pointers explaining the problem very clearly.
    The problem with learning Rust is on the level one up from getting the syntax right. It is getting rid of unsafe constructs that other languages advocate. Like callbacks or back-pointers etc. But it are exactly those structures that make our software so brittle.

    • @NoBoilerplate
      @NoBoilerplate  9 месяцев назад +1

      Agreed, and rust's unsafe system makes this process as easy as it can be!

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

    Roc language is probably going to be in 3-4 years my main "productive language" while still being "safe enough".
    Every time Feldman makes a new video about it's progress I am quite amazed. He takes ELM unrivaled developer experience and "faster than GO" as his main objectives for his pure functional language. My hope is that he can go in terms of speed more to rivaling C# and Java. Then it's truly going to be an incredible language.
    His full type inference approach is very interesting.
    - Richard Feldman, Pushing Boundaries with Roc - latest talk is the reason I'm so excited about it.
    Most of the comparisons in his video are with Rust and Typescript.

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

      Very impressive! But, so is Haskell, and as you say, Elm.
      I'm excited by Haskell not just because of it's technical qualities, but because it's *popular* and I can hire a team and get working with it TODAY.
      When Roc passes Common Lisp (dead center) I will start to pay attention. redmonk.com/sogrady/2022/03/28/language-rankings-1-22/

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

    What are your thoughts of Clojure, a dynamically typed functional programming language that runs on JVM. Rich Hickey, the creator of Clojure, have very strong opinions about why to not use static typed language. I am curious. What are your thoughts?

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

      Love it. Before I discovered Rust, I was a professional clojure developer for 2 years, I even made a video about it! ruclips.net/video/k_4rLyqQeAA/видео.html
      Rust has taken so many of the features i love from Clojure:
      - Expression-based language
      - Real lisp macros
      - fluent interfaces everywhere
      - Instant feedback (albeit from the compiler instead of repl)
      I searched for years for a way to make typing work with clojure. Typed clojure just never clicked for me, it was so much overhead, no-one really uses it, and it wasn't very powerful, clearly an after-thought.
      Finding Rust (which is Lisp in C's clothing with Haskell's type system) has been revolutionary!

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

    "You can trust compilers" Meh, debatable, I've read a very interesting paper that was saying that compilers could inject malware or bad code into your code, take care of what compilers you download. But I get the point! great vid as usual

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

      Oh sure, everything is possible, but I'll take my chances with an extremely well-reviewed piece of open source software ;-)

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

    "what does a developer do?" -- made me waste 5 minutes wondring... found out 90% of my mental stamina goes to waste into dealing with the anxiety of not knowing what I don't know yet but will get me stuck mid project. For I quite enjoy thinking about the problem and the route I will approach it, but I cringe to the thought of everything crashing in front of me

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

      Developers are paid to think, managers are paid to worry.

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

    I guess the only place it wont be efficient would be in CI/CD pipelines. If compilation is required 😅
    I know it's probably not the most important aspect. I just found it funny.

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

      Yeah, that's a problem we experience with docker images too - in an idea world, it's compiled once and the compiled artifact is moved through CI.
      On dynamic languages, the codebase is the artifact.

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

    2:49 This is a very OOP point of view, and I think that is very unoptimal
    2:53 I find it absolutely abborrent that you think that a full-featured text editor can't be run in a single thread.
    3:04 Anything to do with the web is going to be very slow due to the fact that the web is slow, and browsers are slow. Let's break this down one example at a time.
    Webapps - assuming the best case scenario, which is that you get a data dump from the internet and all other interactions happen locally, you're still running on Javascript. You have lost.
    Webservices - you're sending packets over the web, which may or may not actually get there and require retransmittal. You have lost at speed.
    Microservices - this refers to servers on the local machine. It's another way of solving the libraries problem but any "library" might be down at any given point in time. This is more fragile than just using libraries.
    3:08 "To design a system is to orchistrate a cohesive set of loosely coupled processes running on one or more machines" Everything about this is wrong. If you can split a 'system' into loosely coupled processes, then you need to define a communication layer between them - made soley of information (like an instruction set) - and then you can split the 'system' in two. Keep doing that until your 'system' is only tightly coupled processes, and then program those. Or, just have everything be tightly coupled. Designing a system to have muliple components, especially when you don't have to like with microservices, is always a massive negative on the simplicity front. And you're always trying to write simplest possible code that makes the computer do the least amount of work. There is a tradeoff there, and it's an individual decision on where to make that tradeoff. Most designs aren't on that pareto frontier.
    In the next section you seem to conceptualize code as a state machine. This might be useful at times, but I think it would be more useful to describe things in terms of data states rather than code states. Most code 'state' can be represented as the line number where the code is currently at. What we really care about is the state of the data in the program at that point in the code. I'm not going to say that you're wrong because I'm not totally sure what you're saying. I do agree that having a type system that is fully checked at compile time is a very powerful tool, one often too easily given up.
    10:31 As long as there aren't errors like an "unused variable" error, and errors are clearly explained with easily searchable terms should I have no idea what the compiler is talking about, I can get on board with this. I prefer to keep programs in a compiling and running state as much as possible, even when I'm transforming code, so if I've removed the use of something to see if the program will still work, I want to transform the code as little as possible in case I need to put it back.
    11:50 :eyes: I didn't know Rust supported inline SIMD assembly with variables inported from the surrounding program. That is really impressive, I didn't expect Rust to actually have that feature when I wrote that line.

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

      Thank you for your detailed comment. My background is in high-level languages, principally Python, so I'm more than happy to learn from you in this regard.
      I've written a series of 10 videos on Rust, may I link you to one that talks about your last point - how Rust is both as low level as C, and as high-level as lisp: ruclips.net/video/PuMXWc0xrK0/видео.html
      I'd love to know your thoughts, thank you!

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

    I don't know rust.
    I don't write rust.
    I don't plan to learn rust in the near future.(maybe i would learn when i get some free time)
    All i have is small experience with python.
    But your videos are therapeutic to watch.

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

      Thank you so much! I hope to inspire people to try it out!
      If you like my style of video, perhaps you'd like Lost Terminal: ruclips.net/video/p3bDE9kszMc/видео.html

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

    The downside I can see with the "correct now" principle is that it can harm velocity when prototyping and iterating. You often don't know what product you need to build, so it's important to get some kind of prototype in the hands of a user as quick as possible, so you don't waste time building a product that no-one needs. In those cases it usually doesn't matter if there are bugs in edge cases, since you just want to know if the entire idea is crap or not.
    There are of course still shortcuts you can use in Rust like using unwrap and clone liberally and there's also the risk of prototypes ending up in production, but I still think this is a real downside to using languages like Rust and Haskell, which forces your programs to be correct from the start.

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

      I don't think your concerns actually manifest in practice. Once you know Ruby on Rails, you can rapidly prototype, once you know React you can rapidly prototype, and once you know Rust, you can rapidly prototype.
      A newbie in any of these would be slower at first.
      And even on top of that: Compiler-driven development has the potential to be FASTER than iterating in traditional tools because so much more is checked for you by the compiler. I've got a draft video on this topic coming soon!

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

    This man's delivery could convince you night is day.

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

      I promise to only use my powers for awesome

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

    Great work man.
    Not sure that I fully understand this "state modeling" approach you mention and how this leads to you stop caring about states that you haven't modelled.

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

      The trick is to model all the valid states of your app, and trust that the crate authors that you're using have done so with theirs.
      This tightly integrates your model so that it becomes very difficult for a collaborator (or you hacking on code late at night!) to misuse it.

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

    Another great video! I love that "oxidization of the stack" is a term. Very clever :D

  • @Alex-xl4xe
    @Alex-xl4xe Год назад +1

    Mate, I can't even jump on the hypetrain fast enough. I learnt about Next.js before I learnt about Rust and now you are telling me I can use both in tauri?

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

      The hype train has no brakes! if you like next, do check out yew.rs - it's more barebones, but powered by type-safe rust superpowers!

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

    Rust is cheaper, The company just need to pay for the entire training of the developer and attach rust programs to their pipeline with duct tape. Until some company spends hard on making full solutions with rust that interact well with older tech stacks (specially java and javascript stuff: java is still used in a lot of servers and javascript is impossible to get rid of), it'll just be too expensive to maintain a department just to solve rust problems while the rest of the firm runs with older software

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

      Rust's FFI in C and Javascript is terrific, but you're right about Java.
      If there's a huge legacy of Java code, would I be right in saying it might be better to use something like Kotlin or Clojure to modernise the code?

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

    07:56 I kind of miss the proposed example in rust about lifetimes. Would make it easier to understand what you mean and what it would look like to better compare. Thanks.

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

      Come ask that on my discord server in #newbie-advice !
      My advice for learning Rust is here: ruclips.net/video/2hXNd6x9sZs/видео.html

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

    Hard coded types are a bad idea. Validation over typed. The fact that you have mentioned "business logic" suggests to me that you are not someone that writes kernels. If you want business logic then don't hard code it, test it. Rust is really good at functional styles too. Typing in some use cases but pointless if you know what is what. Test Test Test

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

      What an interesting point! Would you elaborate further?

  • @Tiky.8192
    @Tiky.8192 Год назад +1

    I tried hitting the like button while listening but damn, it was already pressed from a couple minutes before >..

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

    What do you actually use rust for yourself, do you use it for work? Hobbies? What kinds of projects do you work on?

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

      I built critical national infrastructure in it while working at the Government Digital Service, here in the UK, in 2020, that was my first taste. The experience was really profound for me: the whole first day nothing was compiling, and I thought the language was insane, but at 4pm we got it compiling and then no further changes were required and it's currently sitting in production, receiving dependabot security updates, code passing tests in CI and building with no changes.
      I genuinely think it could run for ever, this language is so focussed on uncompromising rock-solid backwards and forward compatibility.
      This commenter said it better than I ever could: ruclips.net/video/ZFDqh3slQfU/видео.html

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

    Hello Mr.Tris , here's a thing for you : when Joe Armstrong said Erlang is 'write once, run forever' and as Erlang's main strength is support for concurrency
    (also its functional ❤️) .
    And as far the journey had we knew Rust⚙️ is known for the FEARLESS CONCURRENCY ⚡.
    Could you please make a next video on concurrency and the parallel stuffs ... taking Rust and other buddies in comparison.

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

      Love it, good comparison topic erlang-rust. Thank you!

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

    Make invalid states unrepresentable in your system is exactly how F# works too.

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

      I hear great things about F#! If I were in the dotnet ecosystem, I'd be using it for sure.

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

    Ok damn that answers my question about aws. Thanks for linking this in your comment!

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

    RISC gang😎

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

    How does rust targeting arm on lambda compare to rust targeting wasm-wasi. I think I remember a blog post saying wasm was way faster

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

      I don't understand your question, this sounds like Apples and oranges. Do explain more?

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

    Please don't talk so fast, I get the intention of this channel but having to skip back 5 times because I overheard something over and over can also be seen as boilerplate

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

      My apologies, please ride the pause button, enable subtitles, read the script at my repo (links in the description).
      The vast majority of my audience ask for a faster pace of video, I am not trying to be TOO fast, but fast enough.
      Perhaps this particular video was not as well produced as later one? I try to match speed with quality. :-)

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

    "Oxidizing your entire stack" I like that! :) Great channel, just found this today. I have been looking to see if any languages out there have been picking up traction in the coding space and Rust keeps popping up for me. I will definitely be learning Rust as soon as I can.

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

      Fantastic! Do check out my other videos for incredible features to get excited about. You'll need that to get over the initial learning curve! 😁

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

    Looks like a good written promotion) but honestly, everything you are saying is totally true imo

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

      I should hope so! I'm certainly making hype videos

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

    Is ur amazing, consistent and perfect voice programmed by a robot?

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

      I've been practising my robot voice for 10 seasons of Lost Terminal :-)
      ruclips.net/video/p3bDE9kszMc/видео.html

  • @m.hosseinmahmoodi
    @m.hosseinmahmoodi Год назад +1

    I agree that rust is “Good Fast Cheap” but as an C\C++ I have 2 problems that make it hard for me to use rust:
    1. No support for C++ libraries (as far as I know)
    2. Rusts syntax is just too different, and I don't know, for me, it feels weird to write a type of variable right of it instead of left.
    Thing that I probably would like if I switch:
    1. Compiler errors
    2. More memory protection
    BUT in my case, “no support for C++ libraries” out weights every other thing.

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

      1. You're right, though Rust's C support is excellent (doc.rust-lang.org/nomicon/ffi.html) calling C++ functions requires a C wrapper. This is how C++ libraries are wrapped (such as GTK crates.io/crates/gtk)
      So it's not impossible, certainly easier than with Python, it's not as direct as with C.
      Check crates.io, you may find that someone has done the work for you for the library you want to use!
      2. Syntax is syntax. Some people prefer type on the left, some on the right. Many people have it even harder, and are coming from dynamic languages and ask me why it needs to be there at all! This is a matter of style, and one you may have to get used to if you want to try new languages, as it appears to be the prevailing style.
      My take is that the NAME of the variable is something I look at much more often than the type.
      Because the Rust compiler does type inference based on both sides of the = sign, in most cases, only the function signature needs to be typed.
      I am sure that you will have no problem learning Rust, coming from a C++ background you're already familiar with many of the low-level features I had to learn (My background was Python).
      This article was revolutionary for me
      fasterthanli.me/articles/a-half-hour-to-learn-rust.md
      So much so that I got permission from the author to make a video version ruclips.net/video/br3GIIQeefY/видео.html (though the article is better)
      I have written about 10 other Rust videos showing the remarkable features of this language. The playlist is here ruclips.net/video/Q3AhzHq8ogs/видео.html
      I'd give them a watch, and I hope you will see that small differences in syntax will seem like a small price to pay :-)

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

      Oh! I just found cxx.rs - which seems to do what you want! There's also bindgen, but I don't know much about that.
      Come and chat to me and the community on my discord if you like, the people over in #programming would be delighted to talk C++ / Rust integration discord.gg/mCY2bBmDKZ

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

    Nice video, i hope now I can finally convince my boss to use Rust in the next project after i will force him watch this video :D

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

      This is EXACTLY why I made this video! I have a few others that are also very boss-compatible too, check them out!

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

      @@NoBoilerplate Nice :D, good job!!!

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

      ​​​@@NoBoilerplate it would be nice if you made playlist called something like "For boss" where in right order all reletad videos would be to convince him :D

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

      @@edems131 DONE ruclips.net/video/4dvf6kM70qM/видео.html

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

      @@NoBoilerplate :D awesome

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

    I urge the Rustaceans to give Lost Terminal a try - it's gonna be up the alley of most of you!

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

      You're too kind! I also think so!

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

      The podcast? Not sure if I am looking at the right thing

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

      @@serioustr This is Lost Terminal, written by a geek for geeks 🙂
      ruclips.net/video/p3bDE9kszMc/видео.html

  • @StefanH
    @StefanH 2 месяца назад

    "You can always trust the compiler" he says totally not paid by big compiler. Remember to live in fear everybody!!

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

      I *wish* I was getting that big compiler money (mozilla call me! 🤙)

  • @Dominik-K
    @Dominik-K 2 года назад +2

    Very interesting and actually the main reason I'm learning Rust currently. If I need a highly efficient language, especially as cloud providers will charge you for all inefficiencies too, for critical code it's imperative to be efficient. Otherwise the whole system can become unnecessarily slow or Ressource hungry

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

      That's it! And, unlike C++, we get this with a pleasant to use high-level language too!

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

    Could you guide me for building microservices with rust?

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

      Come chat to the community on the discord, links in the description!

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

    Your Videos always make me want to try Rust out even more! I started a lot of smaller tests with rust here and there, but I still need to work myself up to work through the Rust Book to get fully started with the language.
    What is your stance on "the right tool for the job" with Rust? Would there still be Projects you wouldn't recommend Rust for?

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

      I think the biggest category where Rust wouldn't be the right choice is applications where having a big runtime is an asset, not a feature.
      The one that comes to mind first is Data Science. Playing around with datasets in a repl is a huge part of doing data science, and it's not the types that matter but the values, so a rich compiler won't be as much help as building a larger app.
      Julia is a language i'm excited about for this sort of work!

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

      @@NoBoilerplate Oh absolutely, especially doing Uni work, it’s nice to just script things and play around with data. I’m using Python for that :) But Julia or R are also present in some fields. There’s really a lot of languages to choose from haha

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

    I still can't see the advantages of lifetimes. I can def see the need for them considering how the compiler overall works, but I still can't see a single scenario where the lifetime allows me to do something I wouldn't be able to do without.
    Something that should be told, till you aren't proeficient in rust, rust is a headache cause you spend 20 hours on compiler errors for every 1 hour without. But once you are fluent in it, everything you said is pretty correct.

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

      No denying the learning curve, but that's why I'm here to get you (and me!) excited enough to push through to that point you mentioned, where you're fluent in it. It's a hard road initially, though. I crashed out twice in 2020. Glad I pushed through!
      The benefit of lifetimes (to us, not to the compiler) I can't yet explain clearly enough, though I'm nearly there. I'm writing the video, stay tuned!
      The tldr is that if your type system has lifetimes, you can model not just what your data is, but WHEN. (what sequences of your data are valid). Come ask on my discord, links on noboilerplate.org, and those smarter than me may give a better answer!

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

      @@NoBoilerplate Thx

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

    Anyone knows what's the font used in the examples?

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

      It's defined in the first line of the source code.
      (it's FiraCode Nerd Font)

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

    I just want to say, I love your content man. Cheers from Switzerland

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

    8:45 "Look how simple a hello world" is in Rust. At least compared to more popular languages like Java/C#.
    No need to use classes, static methods, string arrays, return types.
    In the beginning you wouldn't need to know static, arrays, string types, and any class specific stuff. You only want to know functions, maybe.
    And that's basically what a "hello world" in Rust looks like. Just a function, and a macro. No types at all.
    I still think, a simple hello world has some value.

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

      Now compare that with Python...

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

      @@CristiNeagu Same for scopes. Probably shorter. It's just this line:
      print "Hello World"

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

    5:42 This makes me wonder, how many things we could automate and improve to make dev lives better, but we never thought about doing it? Automated upgrade of code to new library versions? Maybe graph based documentation that is compile time checked, so it's never out of date? Maybe automated scaling where code works without changes no matter if it runs on one cpu, multiple cpus, multiple local network machines or cloud?
    There are many ideas coming to mind, though most are taken from "Features of a dream programming language 2nd draft"

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

      If you made just one of these, I'd buy it :-D

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

    Great videos always

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

    yet somehow a rustc hello-world takes almost 4MB...

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

      That's the debug build, a release-optimised hello world build (I just tested this) is 256k.
      That 256k overhead doesn't balloon as your program increases in complexity, either, that's it. The rest of the program filesize will be your app.
      A real-world example is that a release-optimised build of the axum web framework's 'hello world', that includes ssl, a web server that is so fast you don't need a reverse proxy to host your static files, is 605k.
      Here's a short playlist of videos I've made that get to the heart of why Rust is something special that is changing the world from amazon, to microsoft, to linux. ruclips.net/video/oY0XwMOSzq4/видео.html

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

    Your channel is just a giant Rust advertising. And it's working freaking well!

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

      This is intentional.
      I've noticed a lack of clear, well-explained introductory videos to Rust topics. There's loads of people making really great technical tutorials, but not stuff to get EXCITED about.
      I crashed out of writing Rust TWICE in 2020, and I only came back because I had a mentor to help me. Most people don't have this luxury.
      Rust has a BRUTAL learning curve, compared to other popular languages (though not as bad as Haskell et al), and so you need to know ALL of the great features that you simply can't get elsewhere, in order to push yourself through the initial learning period.
      Have you tried Rust? Thanks for your comment!

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

      @@NoBoilerplate I actually started learning because of you. Moreover, I watch your videos sometimes when I lose my motivation. It really helps! :3

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

      @@SeresHotes25 I'm so pleased, thank you 🙂

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

      ​@@SeresHotes25 And imma start because of this guy

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

    11:08 Flesh is unpredictable, silicon is certain.

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

      You've been listening to Lost Terminal haven't you XD
      ruclips.net/video/p3bDE9kszMc/видео.html

  • @FelixTheAnimator
    @FelixTheAnimator 28 дней назад

    As a person whose never coded in their life, how does one go from "hello world" to translating their favorite open source program written in C+ into Rust?
    I have a hunch OpenToonz's "buggy" reputation is mostly memory errors. Because it works fine for me (with ancient quad channel memory) but crashes fairly frequently for everyone else.

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

    After using Rust for a project and spending the time to understand new concepts like borrowing, lifetimes, I started to enjoy coding in Rust.
    The start was frustrating as the compiler just doesn't compile! It was very different with how development was with NodeJS. Which even if the code or syntax was wrong, NodeJS compiles and only when you execute that function it fails. I can totally relate with the narrative in the video whereby in Rust, if the compiler compiles, it just works.
    Unfortunately I'm working on a NodeJS project (not typescript) and always thinking about the type system, enums and lifetime.
    Writing in Rust really changed the way I handle my codes now.

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

      Rest is good for our mental health isn't it!

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

    Listening while at Costco this is fun. I love these videos.

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

    Rust in the kernel is really exciting, to finally see another language in the kernel that is memory safe! But there are still a lot of problems, mainly the use of unstable features in kernel rust. That is to say that rust is not yet mature enough to be stable for kernel needs. But what is most exciting is the comparison of the NVME driver which is just as fast the C implementation, thwarting any concerns about speed!

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

      "mainly the use of unstable features in kernel rust."
      I'm not sure that's quite right there.
      Unsafe isn't any worse than C, it just means you can defeference a raw pointer, plus 4 other pointer-related superpowers. (see the book for them).
      ...C can do all these unsafe operations with no oversight already, and we already write the linux kernel in that XD

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

      @@NoBoilerplate Im not talking about unsafe, i mean feature like 'global_asm' or 'allocator_api' which are currently unstable that means the build could break in any verison which is a huge nogo. There are talks of having a dedicated kernel rust version, but that would lead to stagnation, like with C, where they had C89 for the longest time as the kernel C version, they only updated it because of a speculation bug, which couldnt be fixed in the version they had, so they went straight to C11 Wich is also a decade old but its atleast more modern than what they had.

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

      @@wChris_ oh! sorry I read 'unstable' as 'unsafe'. My bad!
      Unstable features get stabilised pretty quickly, even in the short time I've been following things. The Editions system perhaps could help here?

  • @rajm.5819
    @rajm.5819 Год назад +1

    The best Rust videos live here. Great accented voice over. ❤

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

    rocket and yew are both slow and should not be recommended

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

      Not true, they're both lightning fast, rocket particularly beats other popular frameworks by a LONG way web-frameworks-benchmark.netlify.app/result?asc=0&f=rocket,django,rails,express
      I think you mean that they're slower compared to other rust frameworks? That's true, but not enough to not recommend them, not even close.
      Yew's challenge is that, as a webassembly framework, it must go via the bindgen js bridge to interact with the browser, including the DOM.
      But as I said in the video, it's FASTER than react, despite this.
      I recommend not chasing the best benchmarks. Our field is full of compromises, you don't have to be the fastest to add value. Both these frameworks are excellent and fast enough that speed isn't a problem.

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

    Didn't realise "oxidising" would be a valid word for "rewrite it in Rust".

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

      I've also heard "Carcinisation" DX

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

      @@NoBoilerplate Yep, always go for the fancier one. My choice: Ferrous oxide proliferation.

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

    Code is read far more often then it is written - so true ! And, abbreviations kill readability ! Then why is Rust littered with abbreviations? This is garbage language design IMO! `fn` Really? is function so hard to type?

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

      You are talking about a matter of taste, and there's no accounting for taste. Syntax is syntax, and Rust's won't be the last time either of us will have to learn unfamiliar syntax!
      if python can have def, rust can have fn

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

      @@NoBoilerplate The use of abbreviations seems to me to be a naming convention, not syntax. An unacceptable naming conventiion. The argument that "python did this bad thing so Rust can do it also" isn't very compelling.
      I'll suggest that something is delaying the adoption of Rust compared to the adoption of VBA, Access, and Java. VBA was released in 1993, the year after I became a professional programmer - by 1994 it was everywhere - there were a lot of "basic" language options back then but VBA was basiclly instantly adopted industry wide. Java's first release in 1996, by 1998 it was clear Java was taking over the industry. Rust is 16 years old now and it is nowhere near the adoption rate of earlier languages. The rise and fall of Scala happened faster than the adoption of Rust. Could the delay of adoption of Rust be related to the naming convention? It is for me, not sure about others. I first heard about Rust in 2015 from a developer I really respected, but when I saw the naming convention I walked away.
      Don't get me wrong, I'm learning Rust now and see the advantages, but I also cannot ignore a naming convention that completly ignores the negative impact that abbreviations have on readability, exspecially for non-native english speakers.
      Thanks for the channel, the very well done videos, and tolerating my rant! I

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

      @@dlotts No toleration needed, thank you for chatting with me on this!
      Let's get some numbers first, just so we're sure of what we're talking about:
      Rust snuck in to the top 20 list of most popular languages in 2020, by the best metric I can find: redmonk.com/rstephens/2022/10/20/top20-jun2022/
      (github projects and stack overflow tags)
      The top 20 list are the useful languages for . Yes, at the top there are languages with "java" in their name vying for the top spot, but any language in the top 20 is ready for prime-time. Rust's actually joint #19th.
      Rust has been the most-loved language for 7 years, every year since 1.0. So despite the syntax, there's something HERE. And I'd hate for something as small as naming conventions get between you and that.
      ---
      Rust is extremely different isn't it! No inheritance, no classes, new syntax for lifetime annotations and borrows, and the compiler hates a lot of the standard normal patterns we've been using for decades.
      I get it.
      Back in 2020 I crashed out of learning Rust twice. First time due to multiple string types (Haskell's biggest mistake made again, I thought to myself!) and second due to lifetimes. At the time I had a great mentor who picked me up and helped me back on the path. Most people don't have this. This is why I am making my Rust series.
      Yes Rust is very different from what we're used to. But that's the point! (well, I think)
      ---
      Two features you can't get in Java, for example, that I think you'll like are Macros and the Unsafe system. Macros are nothing like templates or cmptime (they're more like lisp macros), and the unsafe system is a genius way to ring-fence pointer arithmetic, to allow us to build safe abstractions around unsafe pointer code. I did a video on both of them here, and I'd love your opinion on it: [ruclips.net/video/PuMXWc0xrK0/видео.html](ruclips.net/video/PuMXWc0xrK0/видео.html) Cheers!

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

      ​@@NoBoilerplate Thanks for the info! The way Rust is different is quite interesting - and I'm not saying Java or any other language is better (all languages have their pros and cons). The love of Rust appears to be similar to the love of Java in the early days - yet Rust is not seeing the explosive adoption rate of Java - I wonder why. Rust is more difficult, and requires more (some?) knowledge about managing memory, but I'm not convinced being "harder to learn" is what holding Rust back. Most Dev's I know love things that are hard to learn!
      In short, I cannot wrap my head around why a language that puts memory safety and readability as core concepts of the language would then go on to name things `COW`, `Rc`, `Arc`,`Box`, `RefCell`,`mpsc` - it is not possible for a native english speaker reading the code to guess what these things are - not difficult, impossible! Now imagine how hard it is for someone that isn't a native english speaker.
      This is just a rant against abbreviations - an attempt to point out that, IMO, abbreviations are always bad and always hurt readability. As a person learning the language, if it said `CopyOnWrite` instad of `COW` I'd know a lot more about what the code is duing even if I don't know the specific syntax. Instead, I need to search `Rust COW` and then get weird looks from my wife when she sees my search history .... I submit `CopyOnWrite` isn't "harder" to type than `COW`, it's just a bit longer, but infinatly more understandable.
      Related to abbreviatinos, at work there is an internal app named `cfm` - which is an an abbreviation for something - but my mind cannot come up a work safe explaination of what that means...

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

    Can someone please explain what the (c) (v) (i) before each language mean in the table at 1:20 sure looks like roman numerals but without context.

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

      Oh good spot. My guess is Compiled, Interpreted, and ... something else. Check my markdown sourcecode for the link to the paper!

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

      ​@@NoBoilerplate Thanks! I couldn't find a free version of the paper to check the reference so I did the next sensible thing-pasted each language and a trailing v into Google search and they ended up having virtual machines in common. Java should have been a dead giveaway😄

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

      @@kelvinpraises Genius!

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

    I used Rust and I hate it. It makes me unproductive and questioning my life choices. Developing in Rust is so slow compared to C++. In Rust you always need to find a way around, even with some obvious things like inheritance.

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

      Rust is extremely different isn't it! No inheritance, new syntax for lifetime annotations and borrows, nd the compiler hates a lot of the standard normal patterns we've been using for decades.
      I know how you feel. Back in 2020 I crashed out of learning Rust twice. First time due to multiple string types (Haskell's biggest mistake made again, I thought to myself) and second due to lifetimes. At the time I had a great mentor who picked me up and helped me back on the path. Most people don't have this. This is why I made my Rust series.
      Yes Rust is very different from what you're used to. But that's the point. Two features you can't get in C++ that I think you'll like are Macros and the Unsafe system.
      Macros are nothing like templates or cmptime (they're more like lisp macros), and the unsafe system is a genius way to ring-fence pointer arithmetic, to allow us to build safe abstractions around unsafe pointer code.
      I did a video on both of them here, and I'd love your opinion on it: ruclips.net/video/PuMXWc0xrK0/видео.html
      Cheers!

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

      @@NoBoilerplate Thank you! I am looking forward to change my mind

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

      Every day is a school day, I am learning much about C++ while learning Rust :-)

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

      Here's a video on memory safety as implemented differently in both C++, Zig and Rust. It's a brilliant video that demonstrates with a simple example how things can go wrong in terms of memory, and how the languages tackle the issue.
      ruclips.net/video/qeiRGbYCD-0/видео.html
      Don't worry, it's very common for C++ developers to feel like what Rust is doing is too much. But the truth is:
      - you're probably trying to program in Rust with your C++ habits (example: simply mentioning inheritance), which makes it easier for frustration to arise;
      - the borrow checker is genuinely helpful (as demonstrated in the video), and if it tells you that what you're doing is wrong, it's for a good reason most of the time.

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

    idk but i feel like this guy is insulting developers

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

      You are the first to say so, why is that? My videos are target at rust newbies.

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

    "Our web frontend could be written in you" - 12:20

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

    I know python is cool and everything, but I never felt safe to use it in medium projects

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

      It's possible, I built my 15 year career on it, but these days I'd insist on mypy static type checking and STRICT lints.
      Of course, I'll never have to worry about that because I'm never going back - Rust for me!

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

      @@NoBoilerplate yeah I totally see that. I don’t mind of loose lint, but I really mind about readability and consistency on the code. For me even COBOL programs are easier to read than python ones, because in Type we Rust

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

      @@antoniohenrique5750 Absolutely, the confidence I have that my rust code works if it compiles is HUGE. what a relaxing language!

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

    Was able to write a rust rocket app today. It was 100% a challenge but I learned a lot. What advice do you have for writing good idiomatic rust? I find myself cloning strings and objects often to get it to compile. It works, but it feels like I'm taking the easy way our or not thinking rusty enough.

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

      Adam, you're doing it right, cloning strings and objects is absolutely fine when you are getting started. Rust is 80x faster than Python, you'll get fine performance XD
      Come ask questions on the noboilerplate.org discord - there's a channel #newbie-advice just for this!

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

      "most apps should be written in a higher level language until you can no longer do so" Telling a newbie this is very mean and closed-minded. Please learn more.

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

      ​@Christopher Grant Chris, look at the context of your statements:
      You're commenting in a thread where a newbie is excited about Rust and has written a simple web app and is starting to ask intermediate questions about cloneing.
      You're too late with all this advice! Adam is excited about Rust and has already breezed past the problems that that paper's authors seem to think are too difficult. They're not, ownership is easy.
      Python's a fine langauge to learn to code in, so is javascript or ruby.
      For me, Python was my boat. It's got me to the other side of the river, but I'm not taking it with me as I climb the mountain.

  • @1337cookie
    @1337cookie 2 года назад +1

    When you said there is nothing to stop you oxidizing your entire stack I realized why its called Rust; It's inevitable...

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

      Oooh! that's a good one.
      I heard recently that 'rust is close to the metal'

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

    Mentioning all the things that are already oxidized...
    but the native GUI side of things is still quite lacking xD
    Yes there is a GTK+ lib... but... its not great... and its just a wrapper...
    there are some other libs... like druid... but those are rather experimental approaches on how to do GUI...
    (its still the best one i know so far)
    then there are many immediate libraries wich is again more on the experimental side of things and not ideal for larger more complex applications...
    and then there are many that rely on all the stuff the web ecosystem brings with it...
    but like... whats the point of working on a native application when you then rely on Web technology again... the intention is to not rely on the web tech xD
    I'm just saying this, because its rather frustrating when you want to get into rust... i already some ideas of projects i would want to work on... and instead of using C++ or so... i wanted to do it in rust to learn it (learning by doing)...
    i come from a C++ Unreal Engine background... I have tried GTK+ and Qt5 before as GUI libraries... but Unreal Engine's Slate UI Framework i really liked... their use of declarative syntax and not needing a code gen... so in my most favorite GUI framework is funnly enough... UEs... but i really liked Qt5 too...
    i excpected some stuff like it... especially in regards of the declarative syntax as the Rust peeps seem to be so proud of their macro and type system... so i thought this may be ideal!
    well jeah... it doesnt seem to be that great... at least yet...
    another thing i have to complain about, where idk how or who to blame... but Rust development right now is feeling overreliant on VS-Code... well mainly i guess... I really fucking love JetBrains IDEs... I used VSCode, VS and eclipse before... but IntelliJ is just on another level... (and VSCode is no IDE in my eyes >.>) and I'm very frustrated to see how slow the rust integration is... there is this LFS thing by MS... but what i've read is, it is very reliant on the IDEs actual desing...
    I'm still a big noob noob... I want to learn rust... but everytime I want to touch it... i get slapped on my fingers... which is... not so nice... I'm not sure why that is... but right now... the whole Standard Library feels very odd especially when naming things... and often there are things where you just roll your eyes on why there is no easy way to do some things... I f.e. mean... converting an osString to an normal string... there are probably good reasons why its not implicitly done or anything... UTF8 and stuff... but srsly... there could be a function that just does the job on how you most likely wanted it to work... (convert to UTF-8 string, and if thats not possible, error out or better, ignore it)... Obviously somethign like that is bad if it is done implicitly... but you could just make it an function with a very descriptive name "convert_to_string_and_remove_invalid_utf8_chars" long function name but... does it matter?
    we nowadays have IDEs that take care of it... we more often search for the function we need and not type it fully out... like many coding guidelines nowadays say... dont shorten things... try to explain what it does without weird abbreviations...
    also... its a bit annyoing to search in the docs for anything and then see many many many implicit conversions (not to bad) but then everytime like 4 copies of the same thing (at least thats how it feels)... some for read only values... some for read only references... some for mutable references... some for owned values etc.
    like... to me... it seems there is a lot of boilerplate code you have to write to allow these things... and this becomes especially annyoing when talking traits... you feel like you constantly write the same thing over and over again...
    I have written many those comments under your videos lately... i dont want to shit on rust or your work or anything...
    I'm just genuiently interessted in learning Rust, but I'm sharing here my frustration with it and how slow the process of doing so is... your videos are great and i love'em, tho the feel quite a bit honey-mouthed... I'm just very suspicous of new technology and want them to prove them self first... rust did a good job so far but when i try to get into it... it just pokes me and "harrases" me essentially xD so I'm still suspicous of it
    random (unrelated to rust) rant on a side note... ngl but i think GUI development in general is quite annoying in any tech... web, Qt, UE or whatever...
    layout, functionallity and resources are always so oddly decoupled... we constantly have to rely on string based references to things and hope those are the actual resources we care about... good IDEs try to solve the issue by beeing smart... but well... we have to rely on the IDE for that... especially when talking refactoring... most of those things seem to be only checkable in runtime... which is quite annoying... but it makes sense that it has to be decoupled... i mean... to make some good graphic design, its probably most easy to directly see what you are doing but that often doesnt allow you to integrate the code easily its always some other kind of information that is loosly related to the actual application... as if both things live in their own world... in web f.e. defining where something is located relys on two different languages and usually is in different places... thats kinda good for stuff you need multiple times (like a common theme) but usually doing layout, its way more individual to the actual data you try to show and having to rely on a system that is more designed for reusability is bother some... in other UIs, like WPF, Qt and Slate you got more the opposite for laying out the stuff... you have to do everything in that regard directly inline but defining layouts etc that are needed multiple times is rather hard to comby... you often have to rely on glue code, boilerplate stuff to get the job done...
    there are constantly new ways that try to patch work the system with some functionallity that makes that sort of stuff easier (component systems like in svelete, css classes that allow you to do stylign more easily in line with tailwindcss or bootstrap, etc.)... but it never really tackels the core problem...
    i dont know the solution... i'm just a dumb guy complaining here... so feel free to ignore me...
    i just feel like... that GUI development is heavily detached from actual application development... and that there are only bandaid fixes to the issues we have...

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

      The lack of decent native GUIs in Rust is precisely the result of GUI being a hard an unsolved problem in programming. Rust is largely designed around "doing things the 'right' way", but the 'right' way was sadly not discovered yet, when it comes to GUI. As of yet, however you design your GUI framework, it's one or more of: unergonomic, prone to boilerplate, fundamentally lacks some features, or has weird buggy behavior or API. It's like trying to fit 3m statue into a car - some limb always pokes out of some window.
      The 4x repetition in Rust APIs is very much real, but then again, it exists for a reason. There in fact is a fundamental difference in functionality and meaning between owned values, exclusive and shared references. More often than not, a given method can only meaningfully exist for one or two of them.

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

    Rust for FPGAs, anyone?

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

      55 crates, apparently? crates.io/search?q=fpga

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

    you have convinced me to learn rust

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

      Wonderful! Honestly this language sells itself! Have you seen my video on how to learn Rust? ruclips.net/video/2hXNd6x9sZs/видео.html