Rust Is Easy

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

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

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

    ERRATA
    8:18 the windows installer is a console installer, not graphical, though you can double-click the installer. (or use winget install -e --id Rustlang.Rustup)

    • @scheimong
      @scheimong Год назад +17

      8:18 correction: the Windows installer is CLI, not graphical, although it can be launched with a simple double click.

    • @scheimong
      @scheimong Год назад +9

      Btw RUclips offered to translate this comment into "ERRATUM all!()" which was funny

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

      @@scheimong oh that's fun, thank you I've never tried (I'd use WSL2 probably). Added!

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

      Windows one line installer - if your windows already have winget tool or windows update containing it.
      winget install -e --id Rustlang.Rustup

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

      another correction: 6:57 - that is, not, what we did. similar, but not it.

  • @tylerbloom4830
    @tylerbloom4830 Год назад +550

    Addendum to "If the compiler is happy, I am happy": "If clippy is happy, I am very happy"

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

      Yes!

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

      Yes! I love running `bacon` (cargo install bacon) in clippy mode alongside my code. This is how I write this videos actually :-)

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

      @@NoBoilerplate bacon is sooooo cool!!!! you can even do bacon run or bacon test!!!

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

      @@NoBoilerplate what in gods name is 🥓

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

      @@dinofrog926 your life is about to level up! crates.io/crates/bacon
      I talk about bacon in my 'lightsaber' video, check it out!

  • @insideTheMirror_
    @insideTheMirror_ Год назад +408

    Find someone to love you as this guy loves Rust

  • @NStripleseven
    @NStripleseven 7 месяцев назад +9

    The transition from “your code doesn’t work, figure it out” to “your code doesn’t work, try this to fix it” is so extremely helpful that it halfway defines what makes Rust so great.

  • @theroboman727
    @theroboman727 Год назад +550

    Two of my own notes that I think are important.
    1: Don't rely on the rust error messages that your IDE gives you.
    IDEs very often take some pieces of the error message but leave a bunch of details out.
    Whenever its not immediately obvious what an error is saying, go to the terminal and run `cargo check` or just `cargo c`, and you legit often get help messages as useful as the ones in this video.
    2: The compiler isn't always correct.
    The error messages can be extremely good, but the compiler does not know your intention.
    It can make a best guess, but its not always what you meant.

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

      REALLY good advice here. I often run `bacon` (cargo install bacon) in a terminal alongside my IDE for this reason

    • @costelinha1867
      @costelinha1867 Год назад +72

      "The compliner doesn't know your intention"
      Yeah, fair enough, but honestly, even then I find these error messages pretty useful. Sure it might not be helpful ALL the time, but at least it's more helpful than the stuff I'd get from Python.

    • @DaveParr
      @DaveParr Год назад +39

      Interestingly new python errors (3.10 onwards I think) have started to look like rust. Multiline outputs with specifically pointy underlines it wants you to fix.

    • @avidrucker
      @avidrucker Год назад +8

      Bacon jokes aside, do you have a video on Rust bacon?

    • @dixaba
      @dixaba Год назад +13

      Most of the time (but not always for sure), rust-analyzer catches -stupid- obvious mistakes and suggests valid solutions for them. One of the best LSP servers I've ever used, across all languages.

  • @someghosts
    @someghosts Год назад +249

    I just want to build something one day that someone loves as much as this guy loves rust.

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

      what I really love is *sleep*, and not to be paged at 4am ;-)

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

      @@NoBoilerplate you have a pager?

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

      @@agnishom I *wish*. pagerduty.com calls my phone

  • @AllemandInstable
    @AllemandInstable Год назад +41

    crazy how No Boilerplate's videos are the only ones making me more excited to code, even though I like coding already

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

      It's RUST doing it to me! It makes me want to build stuff!

  • @MilanRubiksCube97
    @MilanRubiksCube97 Год назад +82

    Never seen a compiler so happy while being abused in such terrible ways

  • @kochkochkoch
    @kochkochkoch Год назад +123

    As someone who started coding earlier this year and mostly worked with TypeScript, this honestly makes Rust sound a lot more interesting than I previously thought. JS frameworks have gotten me so used to useless error messages that having the compiler itself tell me what's actually wrong feels like a breath of fresh air.

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

      Give it a go, try Rustlings!

    • @lucky-segfault
      @lucky-segfault Год назад +13

      Rust is so good at turning runtime errors into compile time errors, I often won't run tests until I'm several hours into a project, and somehow it still works right first time (unless I forgot a todo!())

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

      @@NoBoilerplate I got started with Rustlings yesterday and am continuing it this weekend. Honestly, I'm very impressed with it! Whenever I felt I didn't really know what to do, the hints were pretty helpful, as was the Rust book. I wish more languages had something similar to teach you their syntax and unique features, I love this hands-on approach.

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

      @@kochkochkoch I'm going through Rustlings with my team at work and I'm learning something every session too!

    • @kevinmcfarlane2752
      @kevinmcfarlane2752 Год назад +5

      If you’re in the client scripting space you might want to look at Elm, which has similar error messages. In fact I think Rust May have learnt this from Elm. Even if you can’t or have no intention of using Elm it’s worth looking at it once. We often learn from other tech even if we never actually use it directly.

  • @jonyleo500
    @jonyleo500 Год назад +53

    As a python TA in college I feel that a good chunk of my job is reading error messages with students, that moment of realization is great. But this feels like a whole other level.

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

      Yeah! Its important in python too, up to the limits of the language. Have you tried mypy?

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

      Python is improving compile errors, inspired by Rust ;-)

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

      Prologue lover?

  • @della.4593
    @della.4593 Год назад +51

    As someone who struggled with not just Rust but programming in general for a good while I find your videos second to none. I feel you don't just show how something is done, but also why you do it. Your videos helped me shake off bad habits, one of them being ignoring error messages. I must also say you just are a great lecturer, you can break down complex topics in super understandable language without compromising on info. Something I really admire.
    Great video as always. ❤

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

      Thank you so much for saying so Della, I really appreciate it! :-)

  • @fabiolean
    @fabiolean Год назад +30

    I love this modern language design decision of having the language itself instruct the programmer. Elm does this spectacularly, and I'm excited to try it out in a lower-level language like Rust.

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

      Great news! Though contrary to what most people will tell you, Rust isn't JUST a low-level language, it's also higher-level than Elm.
      Check out my video on this here ruclips.net/video/PuMXWc0xrK0/видео.html
      ALSO if you love elm, you might like Yew, which as the name suggests in inspired by Elm: yew.rs

  • @thatlittlefrog.
    @thatlittlefrog. Год назад +2

    I've been trying to learn rust on and off for a month now, your channel is really helpful, the videos are fast, straight to the point, and simply amazing.

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

      Thank you! If you've not seen it, here's how I recommend you learn Rust ruclips.net/video/2hXNd6x9sZs/видео.html

  • @b_dawg_17
    @b_dawg_17 Год назад +5

    This video reminds me of something my math teacher once told me: "my pen is smarter than I am". She meant that by writing down what I know about a problem, I give myself help by being able to see the problem one step further along. Helpful error messages are the unsung heroes of programming.

  • @Shnugs
    @Shnugs Год назад +15

    I've been doing Advent of Code using Rust because your series inspired me. I was kind of nervous picking up a systems language* because I made the mistake of trying to learn coding initially via C++. I've got a few years professional experience using JS, Python, and PHP now and have found learning Rust to be a delightful challenge.
    Keep up the excellent work!

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

      Fantastic! Don't forget to .clone() if you get in a pickle, the performance hit will be *fine*.
      What did I say about it not being a systems language :-P Ok, I guess more accurately, is it's a universal language - systems AND high-level.
      Good going! come chat to me and the community on my discord server, there's an advent of code thread!

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

      are we the same person? I am also doing advent of code to learn rust because this guy’s series inspired me! I am currently on day 7 :)

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

      @@dinofrog926 Bruh. Day 7 hit like a truck after 6.

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

      @@Shnugs haha yup! I started out researching how to do trees in rust. with ownership and no null pointers and everything it seemed difficult. then I gave up and continued reading the book instead :)

  • @tudbut
    @tudbut Год назад +21

    i cannot believe it knows what other languages look like and can tell you how to translate.

  • @TAINCER_
    @TAINCER_ Год назад +31

    Also very nice to use cargo clippy once in a while or use it in CI for bigger projects.
    It feels like a code review, only you don't need to wait for someone to actually do a code review :D Often with really nice code styling suggestions.

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

      Yes! I love running `bacon` (cargo install bacon) in clippy mode alongside my code. This is how I write this videos actually :-)

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

    I am a javascript web developer (with some small knowledge of python and php). Just started learning rust and IT IS INCREDIBLE. A whole another world coming from javascript.

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

      Isn't it lovely! I'm a python webdev and its like a new world!

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

    Also just started learning rust, and I noticed the compiler almost immediately becaus of it's quality. But didn't know it was that good.

  • @io_inc
    @io_inc Год назад +5

    Thanks to you and @Primeagen, i'm actually learning rust and hoping to port all my production applications to rust!!!
    Great Content!!!

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

      He's fantastic too, also check out Code To The Moon!

  • @sitton76
    @sitton76 Год назад +11

    I often describe the rust compiler as a helpful nanny, walking you through your mistakes and giving suggestions on how to correct them.

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

      Absolutely, in other of my videos I've described it as a driving instructor, helping you navigate the dangerous highway. Similar!

  • @cerulity32k
    @cerulity32k Год назад +7

    The errors you get from `cargo check` are better than the ones rust-analyzer gives you because the window that pops up when you hover over a red squiggly has less formatting than the console, which is a feat.

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

      Agreed, and `cargo clippy` even better!
      I run clippy in a separate window, even when I use my IDE, using crates.io/crates/bacon
      Check out my 'lighsaber' video for more info on my toolkit

  • @olafbaeyens8955
    @olafbaeyens8955 Год назад +11

    Errors are also not always clear (for new people).
    I had a fight with "Futures" error and it turns out that the only thing you needed to do was to add ".await"
    The "borrowing" is also a big fight I once in a while have.
    In a lot of cases it is a trial and error until it compiles. Then you wonder what I did wrong and in the end Rust compiler is right all along.
    It is showing me potential errors I am not even aware of.

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

      There's work to be done, but its worth it!

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

    this video made me realize that I have some weird deep-rooted fear of reading error messages

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

    Started coding in Rust yesterday. I'm working on the PNGme practice project. The compiler doesn't make coding as easy as this video makes it seem. The compiler keeps on giving me weird errors about Boxes, Dyn, etc, and most of the time doesn't spoonfeed me the answers like I was expecting. Plus, I'm struggling with using iterators. Also, there's a lot of nuances to the language, like when to use into_iter or iter, when to use unwrap or expect or the ? operator.
    The only thing that keeps me going is knowing that this is way easier than C++, yet just as performant. I struggled with CMake, Dlls, etc. trying to import the SFML graphics library into a C++ project. Soon, I just decided to give up on it. With Rust, I know that Cargo has my back to make importing and using dependencies a breeze. Plus, I'll never get a SegFault. All I gotta do is keep on going, even when it feels like I'm wasting my time on this

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

      Pause right now and complete Rustlings, then go back. My recs here: ruclips.net/video/2hXNd6x9sZs/видео.html

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

      @@NoBoilerplate Hello, I am enjoying Rustlings. I got stuck on the Clippy exercises, but then found out that I just have to compile the exercises to get the Clippy feedback

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

      @@ahuman32478 You've got it! run `rustlings watch` to get the nice feedback (bacon style), and don't forget to run `rustlings lsp` once to set up vscode's hints and such, with Rust Analyzer.

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

    As someone who's still learning programming, I'm happy to say that I haven't gotten into the habit of *only* reading the first line of an error code yet, though I do often duck it if I can't figure out what the rest means, so these error codes in rust seem like a godsend to me!

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

    This is a fantastic demonstration of the help you can get from the rust compiler. Also thanks so much for the link to rustlings - such a great way to learn: by debugging!

  • @Felix-ve9hs
    @Felix-ve9hs Год назад +2

    I'm not a programmer, but IMHO this is what all compilers should do. Error messaged should have a meaning.
    Without that It's like a firewalls that logs "I guess someone is attacking your network" or or syslog telling you that "one of your programms stopped working".

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

      Wild that most languages dont, right? I think the langues with the best errors also have a lot of syntax - which makes sense, I think, as that gives more clues to the compiler

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

    I'm 16, always been programming, from scratch to python to C++, but I've always felt that something was missing. You've shown me rust, and it not only feels like the missing piece has found, but a whole other darn contraption

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

      If you are very lucky, you could use JUST RUST for your whole programming career - web, bare-metal chips, and everything in between. I'm hoping to only use Rust, now, for the rest of my career :-)

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

      @@NoBoilerplate Thanks for the reply! I hope to also only use Rust, it's really brilliant. Just wondering, I've been meaning to recreate this simple little scratch game as a rust web game for a little while now, do you have any pointers for me?

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

      @@jumbledfox2098 Oh fun! Yes, though I've not done much game development, whenever I hear "game" and "Rust" in the same sentence, I also hear "Bevy".
      bevyengine.org/
      Come chat on my Discord (noboilerplate.org), there's loads of folks who could help you with it! Tag me and say hi 🙂

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

      @@NoBoilerplate Thank you!

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

      ​@@jumbledfox2098did you just say… POINTERS?

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

    I only just bumped into this channel. I been itching a bit to try programming again...and not gonna lie, this is sounding VERY nice. Sure the complier isn't perfect as the comments pointed out...but the fact that the complier at least attemps to help you learn the language is something else

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

      Check out the rest of my Rust videos, I have them in a playlist, and then get cracking with The Book doc.rust-lang.org/stable/book/

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

    I am now fully tempted to learn Rust like how I learn other languages: Mess with the compiler.
    And yes, I'm tired with sub-millisecond Java code now.
    Maybe I'll just finish that feature I was working on and then migrate the whole UFB project to Rust.

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

      You'll have a terrific time. I know what you mean, compiler-driven development is fun, especially so in Rust.
      Here's my recommendation on how to dive in: ruclips.net/video/ifaLk5v3W90/видео.html

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

    Dude this was an exciting video! I can't wait to watch more like this. I'm currently at my 3rd day(77/94) on the Rustings exercises and It's damn good.

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

      Nice! I love rustlings so much. Have you seen my whole Rust series? ruclips.net/video/Q3AhzHq8ogs/видео.html

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

      Yes, some of them. The more I learn about Rust, the more I like them 😃

  • @chrissaltmarsh6777
    @chrissaltmarsh6777 Год назад +5

    It is like C but without the danger - this is because modern machines can do all that cool analysis without your having to wait an hour for the compiler to strain through.
    I very much like it; gets me close to the metal where I am playing without the occasional frustration of working out why my foot is smashed up.

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

      Yeah! I'm having so much FUN!

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

      @@NoBoilerplate I had a lot of fun back in the day hitting CAMAC interfaces to our particle detectors. But boy could you fall down the hole.
      Now I'm doing stuff on raspberry PI and I do not have to hobble around anymore. Rust is very clever.

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

      @@chrissaltmarsh6777 Cool! I'd love to do bare-metal on the pi

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

      @@NoBoilerplate You need to ask the compiler politely - 'I Really Really want to hit this address' And then you are cooking.
      Mind you, doing it with C was lots of fun as well. That frisson of fear.

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

      @@chrissaltmarsh6777 hehe I prefer less fear. I'd never have picked up a language with pointers if it weren't for Rust!

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

    Thanks again for another great video. I feel inspired to mess around in my IDE every time you publish. Having such powerful tools at my disposal really compels me to build something cool. Because Rust is so fast, I almost have the urge to build a program that crunches a ton of numbers on many different threads, just because I can :D

    • @2raddude
      @2raddude Год назад +3

      Sometimes having fantastic tools around can provide the inspiration for amazing projects. Woodworkers feel this sometimes, if you have a lathe sitting around in your shop maybe you'll get the idea to turn a gorgeous bowl or vase.

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

      RIGHT! This is how I feel about the Rayon library
      crates.io/crates/rayon
      you can make any iter a parellel iterator with par_iter() - WHICH I WANT TO DO NOW!

    • @2raddude
      @2raddude Год назад +1

      @@NoBoilerplate WHAT!?!? That might just be the coolest crate ever

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

    I started learning Rust with lovely videos made by Tris. Thanks a lot

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

      My pleasure, and thank you! Do join my Discord if you'd like help!

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

    I remember doing the tutorials from the Rust book and got to the point where they deliberately made an error so the compiler would catch it and as soon as I saw what the compiler spit out I immediately went "okay, I'm sold"

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

    I think this is going to be the video that finally gets me to learn rust.

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

      Give it a go! Rustlings is such a great resource to teach through doing

  • @chakibchemso
    @chakibchemso 10 месяцев назад +1

    I remember moving from c# to c++ and it was a horrible experience with the compiler and linker, especially template errors and linking. The messages are nearly of no use at all :/

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

    This channel gives me a feeling of love to a low level language like C when I started learning to program, I will go for rust.

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

    These videos are so good. They make Rust even better!

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

      Other way around - rust is so good I am doing everything I can to make it more widely known

  • @felixfourcolor
    @felixfourcolor 9 месяцев назад

    I love the idea of giving rust a completely different language and follow the compiler's error messages to transform it into valid rust. Can you make another video that expands on this idea, but with a less trivial codebase, like 100 lines?

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

    I like your videos so much that I get out of my rss feed to like the video, every time, and read some nice comments.
    I did Advent of Code 2021 in two weeks last month (I'm might have too much free time though) and doing AoC 2022 🎄 in rust again, the compiler is my buddy.

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

      Fantastic, and thank you very much!
      Have you tried bacon? (cargo install bacon) so good for running in a terminal while you code!

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

      @@NoBoilerplate Not yet, the error messages in my IDE (Sublime Text) when I save a file (with rust-analyzer I think, I don't remember how I installed it) are usually enough. But I'm gonna try it considering how much you like it.

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

      @@philippecholet9484 I don't think it has any complex dependencies, so you could test it out quite easily with a cargo install. I dive into my toolkit recs here ruclips.net/video/ifaLk5v3W90/видео.html

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

      @@NoBoilerplate I've seen all your videos (hopefully/sadly shorts enough) and this one **multiple** times.
      I tried bacon since my last comment: I like the "press one SINGLE key to change bacon job", I'll dive into its customization.

  • @miguelguthridge
    @miguelguthridge Год назад +10

    I genuinely love Rust's helpful compiler messages, but sometimes its design is still far more difficult than other languages. For example, a few weeks back, I was trying to create a system where struct instances could register one of their FnMut methods with a plugin manager to use it as an event callback if certain criteria were met, but the lifetime requirements sadly got too out of hand for me to implement it in a reasonable amount of time. I'd really appreciate a video explaining how to tackle the more complex (usually lifetime-related) issues that the compiler can give, since although Rust makes the easier parts very easy, it can make complex systems much more challenging to write when you don't know how to tackle these sorts of issues.

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

      Yeah lifetimes are not easy. I'm still in the "is the compiler happy with this lifetime change? Or this one?" phase.

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

      clone everything my friend! Though you sound like you know how to do it.
      In your case, I'd re-consider your design, it sounds like you're working against the compiler - Rust has a way of doing things that is very strict, what we get is compile-time verification of our model, what we lose is the ability to write anything we want. I'm happy with this compromise!

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

      instead of using references, try .clone()ing everything while you're learning :-D

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

      @@NoBoilerplate yeah I think the issue is that I need it to be stateful, so if I'm cloning everything I lose the shared state for all the callbacks associated with one struct

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

      @@miguelguthridge You, my friend, do not need my help! Come ask in #programming on my discord server if you like, there's some geniuses over here!

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

    Very much the same as a dojo instructor giving you instant feedback, but they're not a mind reader, so being clear about your intentions helps them give you better feedback.
    Too bad that it can't tell whether or not I "meant" for the program flow to go one way only for it to go a completely different direction as far as high level program design is concerned.

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

      Agreed, though with sum types (ie, Rust's enums), you can express your intent much better than in languages that don't have sum types!

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

    What a lovely compiler !
    99% reason behind my pick on Rust, beside borrow-checker, no GC, high perf and every other nice things.

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

      even macros! What a delightful language.

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

    This video was convincing enough to get me to start learning Rust immediately.

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

      Wonderful! I felt that way when reading the fasterthanli.me article, I based the video one!
      Here's my short playlist of the best rust features, and how I recommend learning it: ruclips.net/video/oY0XwMOSzq4/видео.html

  • @olafbaeyens8955
    @olafbaeyens8955 Год назад +12

    One of the big resistance to Rust is the fact that Rust code can look very messy. Full of ".unwrap().unwrap().to_string()."
    For new developers that look at it, it is scary. And also gives the impression that it produces bloated code hard to maintain.
    It is hard to convince managers that you are not wasting time but also your fellow developer colleagues.
    However I did manage to create (currently sloppy code) that can execute 1000 parallel threads to test a web site.
    Not only did I do this in a faster development cycle than any C# program would, I suddenly have the freedom to go beyond any C# capable code. I develop faster because I trust the Rust compiler to catch any mistakes I make.

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

      The way I look at it, unwrap()s are for protyping code - take a look at my vide Rust On Rails for my recommendations here

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

    As a beginner I do feel like rust is the easiest language I've tried so far, mainly because of the way cargo works and the errors.

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

      This is a very heartening take - I've got plans for a series of videos about how to go from zero to rust, without learning any other languages first. And it's for this exact reason - Rust helps you SO much at the start!

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

      @@NoBoilerplate I'd greatly appreciate that as that's what I'm doing!

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

      @@ex0ja It might be a few months before I get to it, however make sure you've seen my 'getting started' video for now, I've got my learning recommendations there: ruclips.net/video/2hXNd6x9sZs/видео.html

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

      @@NoBoilerplate yes I have and I'm following your advice, I've just finished Ultralearning yesterday ☺️

  • @AzureFlash
    @AzureFlash Год назад +9

    "You need to add an ampersand here, dummy" - Rust compiler, millions of times a day across the world
    (I'm exaggerating for comedic effect, the Rust compiler is actually very nice about it)

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

    Rust doesn't guarantee that there are no memory leaks on any piece of code.
    Leaking memory is entirely safe.
    You can make a cycle of Rc/Arc
    You can Box::leak
    You can Box::into_raw and never get the box again
    You can mem::forget something that holds any smart pointer
    All of those are entirely safe operations. It was never the goal of Rust's model to ensure that there are no memory leaks.

  • @OzoneGrif
    @OzoneGrif Год назад +5

    I'm a Java dev and I want to learn Rust so badly; it seems like an amazing language.

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

      That's great news! You'll have no problem learning it, it's very easy to learn. Many of Rust features are shared with Java (such as the Optional type), but Java, by it's complicated nature, can't implement them properly.
      Try : 1. The Rust Book. 2. Rustlings 3. everything on fasterthanli.me

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

      My main language is java too, and I plan to learn rust too. I had started reading the rust book around a month ago. I finished the chapter 2. and started reading 3. But then I got busy and forgot about that. But now after two of your videos i'm lying in my bed at 23:48 (11:48 pm) and thinking about going back to learning rust tomorrow.
      Thanks for the hints.

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

    I've been working on designing a system's programming language for a couple of months now, and I have to say your videos made me heavily interested in Rust. Being a long time C programmer who has worked on kernel development, nothing has rocked my understanding of imperative languages and type systems as much as Rust has.
    The main areas we have identified in our PL design efforts are the type system (classes and oop stuff is a sub category), primitives for pre emptive/cooperative/distributed parallelism, structured programming primitives (loops, branching mostly), error handling, meta programming (generics, macros), syntax + semantics and most importantly increasing cohesion and decreasing inter component coupling.
    Rust addresses most of these problems so well that we're left wondering if there's still meaningful room for improvement. I would love to discuss these aspects of the language as well as generally, and I would love to know what you think are some shortcomings of Rust and other system's languages you may be familiar with.

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

      I'd love to chat about this too, join my discord (links in video description) and ping me in #programming - there's lots of smart folks who are interested in language design!
      Here's a tip to start off: Because Rust has a proper lisp-style macro system, you can write your language INSIDE rust, not just USING rust. That way you get all of the language features you love for free (including lsp ide support). Here's an example that might blow your mind:
      github.com/JunSuzukiJapan/macro-lisp

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

      The one area where big improvements are due in Rust is the implementation of its type system. At the moment, it has some nasty limitations.
      Do you want to make a trait method const? or async? or use impl in return type? or make async closure? well, too bad, not supported yet.

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

    I love the voice of this guy, now as go programmer i love rust too.

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

      You're too kind! I've perfected my voice on 11 seasons of my hopepunk/scifi podcast, Lost Terminal, what do you think of it? ruclips.net/video/p3bDE9kszMc/видео.html

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

    Honestly, this is why I have always leaned towards C# and avoided Javascript. It might not have the best explanation of compile errors, but it beats the heck out of everything else I have used.
    Just started my Rust journey, and I am excited to code again.

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

      You're in for an absolute TREAT Don, make sure you've watched at least this playlist, and my "how to learn rust" video ruclips.net/video/oY0XwMOSzq4/видео.html

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

    error: Ferris cannot be used as an identifier
    let 🦀 = "";
    | ^^ help: try using their name instead: `ferris`
    ^ this is an actual compiler error

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

    Yes, "cannot borrow `x` as mutable more than once at a time" is soooo helpful.

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

    Would be good to see some clippy rubbed on this exact example, as part of the video, or a follow-up.
    By default, it got rid of the unnecessary `return`, but with #![warn(clippy::pedantic, clippy::nursery)], it also told us to accept &str instead.
    Seems like it hasn't yet been taught to see `format!("hello {name}")` as preferable here, though.

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

      Very correct! I was ignoring a lot of clippy errors during my testing here, in order to get the most bare-bones rust experience, for newbies.
      I love clippy, and run it with those and many other options inside a `bacon` session, alongside my ide!

  • @Big-Chungus21
    @Big-Chungus21 Год назад +2

    Definitely going to have to learn Rust at some point then. I like how useful the errors output by the interpreter in Python are for example, and this is even better. Errors in C++ from my experiences so far are… not very useful by themselves.

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

      You'll have a really great time, here's a little playlist to get up to speed quickly, though I have plenty of videos elsewhere! ruclips.net/video/oY0XwMOSzq4/видео.html

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

    1 crucial piece of advice:
    If you end up using an Arc, delete everything and start again.

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

      heh, certainly in application code, you'll not have to do that

  • @woosix7735
    @woosix7735 6 месяцев назад +1

    I hope ALL the other programming Languages are talking notes here

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

    This is so true! I noticed this coming from C languages to Rust.

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

    One of your best videos so far.

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

      Thank you so much, I'm so pleased with it - I ditched the video I was going to produce this fortnight, and instead did this one - rewriting everything on Tuesday!!

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

    Just found your channel and really appreciate the video's structure!
    Quick errata, but on 6:58, thats not exactly what we did. We fixed the functions return type, not the type of the argument being passed to it or the argument's type itself.
    Kindly,

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

    Important to note that the help statements where only available after updating to rust 1.65

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

    It's insane that even though you *just* told me to actually read the error, my immediate reaction to the first error dump was to not even read the first line properly. This will be a very hard habit to break...

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

      Whatever language we use, I bet this is a good habit to break!

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

    I love how some people say it's a bad thing that Rust does all that, and that "real programmers" don't need it. It's hilarious.
    Rust also makes it really easy to define and enforce quality standards in your project.
    In your lib file:
    #![forbid(unsafe_code)]
    #![warn(missing_docs)]
    #![warn(clippy::unwrap_used)]
    #![warn(clippy::todo)]
    #![warn(clippy::panic)]
    Then in your CI:
    cargo fmt --check --verbose
    cargo clippy -- -D warnings
    You can add plenty of other lints (rust-analyzer gives you a list with explanations on what each one does when you start typing). The warn level lets developers take some shortcuts while working with the code locally, but reminds them to clean everything up before pushing. And the pipeline ensures that code doesn't get merged until it's basically flawless.
    There's also cargo-deny, which searches your dependencies for known vulnerabilities and incompatible licenses. And probably many other tools I don't even know about yet.

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

      I dig this a LOT. Have you seen no-panic, a macro that forces the compiler to prove that no execution paths could panic? crates.io/crates/no-panic

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

      @@NoBoilerplate I saw it on one of your previous videos, but I haven't tried it yet. I imagine it gets hard to use when you have lots of dependencies, since most of them do not guarantee that there are no panics, and often you have to turn on optimizations for the panics to be optimized out.
      I kind of wish there was a keyword for that in the language itself, like unsafe but the other way around ("extra_safe"? IDK), so it would get checked at compile time rather than link time, and maybe more crates would adopt it. But maybe an attribute that keeps you from using basic arithmetic operators on integers or clamp() on floats would be so annoying that no one would bother with it. Who knows...

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

      ​@@yondaime500 Yeah, we have to draw the line somewhere, for me in normal code I use checked maths and never .unwrap() (enforced with clippy) and then don't worry about oom panics or other rare stuff.

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

    2:35: "It doesn't seem like we are writing a method" I'm assuming you meant to say "a *self* method", love your channel!

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

      functions are not called methods in Rust, unlike in Ruby. I don't think I'm wrong?

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

      ​@@NoBoilerplate Ah I see what you mean. Did not realize that they actually mean a different thing. So methods are those attached to structs while functions are not? In any case, you could probably make a clarification for those that are unaware.

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

      My understanding is that methods bound to classes/objects, whereas functions are not. Similar to attributes/member data and variables.

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

      @@TonyUnderscore exactly, methods are functions attached to types doc.rust-lang.org/rust-by-example/fn/methods.html

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

      I see, I never realized they actually mean different things because I heard them used interchangeably in some languages, good to know I guess.

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

    Cargo is _literally_ the best package manager I've ever used, and probably will ever use.

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

      Let's not get religious - we'll continue making better languages forever! But Rust is the best for now :-)

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

      @@NoBoilerplate Definitely

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

      rustc is the compiler :p

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

      @@neoney fair, though I think it's reasonable to wrap up rustc, check, clippy etc into "cargo" 😂

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

    Coming from C++, Rust compiler output is a miracle

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

      Hell, coming from python, js, ruby etc, it's still a miracle!

  • @FishyBearBeer
    @FishyBearBeer Год назад +15

    I feel like a child being walked through homework. It's that easy!

  • @humanperson8418
    @humanperson8418 9 месяцев назад

    Rules for living with Rusts compiler
    1. The compiler hurts you because it loves you.
    2. The more the compiler hurts you, the more it loves you.
    3. Don't fight back, just let it happen.
    "Remember, the compiler loves you" - No Boilerplate.

  • @vullkani
    @vullkani 7 месяцев назад

    I am an absolute begginer into coding, I've started with Python, but than I looked into Rust and your videos are compelling me to learn Rust first. I watched your other video, I started reading the book, but it seems it is not for absolute beginners. I wish you had a course for someone like me with adhd who wants to start with code at 35 years of age.

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

    True.

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

    Imagine if they incorporate an alternative to GitHub copilot to the rust compiler, so that the help will use the power of machine learning similar to copilot that recommend solutions as well based on code it has trained from. Would be interesting to see using that to help you develop using rust too.

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

      I see them as two distinct projects - the ML algorithm is probably right, but the compiler is DEFINITELY right!

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

      @@NoBoilerplate it was just a thought. Would be interesting to maybe get two recommendations, a compiler recommendation and maybe a machine learning recommendation (based on the best code solution it could find) to help you fix an error. Not sure how easy it is to add this directly to a compiler and make it run smoothly, but it was a little idea in my head 😅
      Maybe this could be researched to see it's practicality in the real world.

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

    After a few years using it and a week or so using both, I feel like Elm's compiler is WAY better. Rust is the second best!

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

      Fun! Could you elaborate?

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

      @@NoBoilerplate Sure! I mean, it's a RUclips comment. But on Elm the error messages are even less cryptic. The video shows how to follow the compiler helps us find the solutions to the compilation errors. But on Elm it's spot on!
      I ran into an unexpected symbol:
      27| type alias Model = Int | String
      ^
      I was not expecting to see a | here. Try deleting it? Maybe I can give a better
      hint from there?
      Some other:
      Something is off with the body of the `init` definition:
      32| ""
      ^^
      The body is a string of type:
      String
      But the type annotation on `init` says it should be:
      Model
      LAST EXAMPLE, Check it out
      This `case` does not have branches for all possibilities:
      46|> case msg of
      47|> Increment ->
      48|> model + 1
      49|>
      50|> Decrement ->
      51|> model - 1
      Missing possibilities include:
      SomethingElse
      I would have to crash if I saw one of those. Add branches for them!
      Hint: If you want to write the code for each branch later, use `Debug.todo` as a
      placeholder. Read for more
      guidance on this workflow.
      You can just elm-lang.org/examples/buttons
      and fiddle around making compilation fail somehow by experimenting. Its more straightforward

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

      and that being said, both are very different, Elm is for a very narrow context: web applications. Rust is way more flexible. Having working a lot with Elm, I do think it's similar to how Rust works in some areas like error handling. Compiler messages are just friendlier and easier to read

  • @nichtgestalt
    @nichtgestalt 10 месяцев назад

    I know nothing about programing and I'm not sure if I have the talent for that but it is tempting to give it a shot.

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

    Once a legend said "read the error AGAIN!!"

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

    The compiler being happy doesn’t mean there are no memory leaks. Box::leak is safe, although it makes it obvious that memory is being leaked. But, creating an Rc cycle will also leak memory and might well be accidental

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

      True! A few people have reminded me of this. Would you say in general terms, you'd have to TRY HARD to leak memory in Rust?

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

      @@NoBoilerplate Well it's easy if you want to leak it (which is good, it's sometimes useful). I think it really depends on the abstraction you use, if you use the Rc type to make graphs or other complex shared ownership data structures, especially intrusive ones, you may well encounter some leaks. If you don't then it is quite rare

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

      @@NoBoilerplate I'd say in Rust, memory leaks are as unlikely to happen by accident as in most GC languages. You can do it on purpose with Box::leak. You can do it by accident with Rc-based graphs. But littering Rc liberally is already a red flag, tbh.

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

      @@KohuGaly Righto - makes sense! Yes, Rc is useful, but spooky - I think in normal use, we'd just use references and not have a problem!

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

    Missed opportunity: Follow up by using clippy to make this code more idiomatic. Doesn’t give too much in this particular case, but clippy certainly “teaches” some things really well, too.
    (It doesn’t help you go all the way in this case; arguably, the argument type of this function should become `&str`, and there’s no compiler or `clippy` telling you, AFAICT.)

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

      Very correct! I was ignoring a lot of clippy errors during my testing here, in order to get the most bare-bones rust experience, for newbies.
      I love clippy, and run it with those and many other options inside a `bacon` session, alongside my ide!

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

      @@NoBoilerplate Yes, `bacon` is indeed very useful.

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

    whoa i knew the compiler was advance but i didnt know it is THIS advance. maybe i need to try to start learning it again...

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

      It's got SO much better since I started in 2020!

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

    I have been learning Rust for a while, but not so many companies are willing to try it for their APIs. The general notion is that it's a system language only.

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

      that is what I hope to dispel in my Rust series - Rust is a universal language! Do check out my "turtles" video - I explain how rust is as low-level as C, and as high-level as lisp

  • @nyxalexandra-io
    @nyxalexandra-io Год назад +1

    yayyyyy
    Also accurate to my experience with Rust

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

    you not come to RUST, RUST come to you

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

      Ah yes, rule # of our cargo cult XD

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

      no one is safe from oxidation...

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

    If there is a Rust's mascot, it should be Tris, not the crab :) God I love these videos.

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

    holy crap, you actually run LT? I've been binging it after I found it on another one of your vids. Great podcast!

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

      Sure do! And Modem Prometheus, though I don't voice it, I'm producer. And a new podcast in pre-production coming in the new year... STAY TUNED!

  • @4sat564
    @4sat564 Год назад +2

    Best Rust preacher ever

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

    I've been playing around with Rust but there's always a point where I run into a compiler error and it can't help me.
    For example, I needed to edit two elements of an array at the same time. Actually, not the element itself but some sub-variable of them.
    I couldn't do it, bc of course I can't borrow 2 elements of an array. But I haven't found a solution and I went away for a while. Until I randomly stumbled upon it on RUclips with the name smart pointers. And well, they can become quite complex if you don't know them well. So that's where I'm stuck on currently, learning different types of smart pointers and no the compiler doesn't teach me this sadly.

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

      That sounds tough, but you'll get there I bet!
      The exciting thing is that the rust language is rich enough that it is possible to improve the errors so much that they'll eventually start suggesting smart pointers!

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

      There are ways to mutably borrow multiple elements form the same slice. This is safe, as long as the elements are distinct.
      Here's a function that borrows two elements from a slice, or gives an error if indices are equal:
      fn get_mut_two(source: &mut [T], a: usize, b: usize) -> Result
      {
      match a.cmp(&b) {
      std::cmp::Ordering::Equal => return Err(()),
      std::cmp::Ordering::Less => {
      let (beggining, rest) = source.split_at_mut(b);
      Ok((&mut beggining[a], &mut rest[b]))
      },
      std::cmp::Ordering::Greater => {
      let (b,a) = get_mut_two(source, b, a)?;
      Ok((a,b))
      },
      }
      }
      And here's a version that borrows arbitrary N elements from a slice. Though the implementation uses unsafe, and has expensive runtime checks, that are unlikely to be optimized.
      fn get_mut_n(source: &mut [T], indeces: [usize;N]) -> Result
      {
      // check for index out of bounds
      if indeces.iter().any(|&i| i>=source.len()) {
      return Err(())
      }
      /// check for duplicate indices
      let mut sorted_indices = indeces;
      sorted_indices.sort_unstable();
      if sorted_indices.windows(2).any(|w| w[0]==w[1]) {
      return Err(())
      }
      // SAFETY
      // indices are all distinct and in bounds
      unsafe {
      Ok(indeces.map(|i| &mut *source.as_mut_ptr().add(i)))
      }
      }

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

    How would you recommend to get the first remote rust job? I'm in México and most companies don't need it and I'm kind of sick of web dev

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

      Keep an eye on Microsoft and AWS especially, they're HUGE hirers of Rust. Also, contact every one on this list www.rust-lang.org/sponsors

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

    I love your videos every time

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

      Thank you so much, I really enjoy making them!

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

      @@NoBoilerplate you are the reason why I started my journey with rust and now I am doing advent of code with rust. You are literally changing lives ❤️ World is a better place because you exist ❤️

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

      @@polares8187 Thank you so much!

  • @chronosVR.2763
    @chronosVR.2763 Год назад +1

    i like compilers like this

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

    Hi. I've been watching your Rust videos for a while and I want to start programming in Rust now. I installed Rustup and am trying to configure my workspace right now. Rust is asking me to install MSVC build tools, but they're also offering me the option to skip ahead if I'd rather use the GNU ABI. Would you recommend using the MSVC toolchain or go the GNU pathway? I believe that software should be able to support all platforms, so I want to make sure my applications support Windows, Mac, AND Linux

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

      Cross-compilation is trivial in Rust, so you can usually code on one platform, and make binaries for any other platform.
      I'm uncertain about developing on windows, however, I've heard that it's best to use WSL2, to give a much nicer experience.
      WSL is really great these days, and will side-step this, and many other issues you'll face learn.microsoft.com/en-us/windows/wsl/install

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

      @@NoBoilerplate Tbh my computer is on the verge of running out of memory, less than 10 gigabytes left. Got no room for a Linux subsystem. But I will take your advice that cross-compilation is easy no matter the platform and use MSVC since it's the recommended toolchain for Windows. Thanks

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

    If the compiler can produce suggestions for what might work instead of what we've written, wouldn't it be easier if we could just press a button to try out if that suggestion works without manually changing our code and another button to accept those changes if they do? Instead of manually trying it out and undoing it if it didn't work.

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

      Maybe! The compiler doesn't have all your context though

  • @TheCollectiveHexagon
    @TheCollectiveHexagon 10 месяцев назад

    8:10 ik the link is on screen but would be nice to have it on description/on the pinned comment so people can find it(if they got low vision/blindness/any other reason) too :)

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

    It's very good tutorial.. but can you do something usefull in the same format from practical meanting for example implement wallet may be add GRPC for show how good / bad rust is for working in real problem scope. Best practices for example. Hello world is good.. but lay huge gap between it and something useful.. like for example spring boot application.

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

      Do check out my other videos ruclips.net/video/Q3AhzHq8ogs/видео.html

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

    Well this looks really impressive

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

      You've not seen anything yet - check out my other rust videos!

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

    This is a great idea for a video!

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

      Thank you! Funny story, I had written an entirely different video for today, but on Tuesday I had this brainwave and wrote this video instead! I'm delighted.

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

    I’m curious how well you could prompt chat gpt with the rust compiler. Might be a good AI automation language.

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

    Whats your opinion on natural intuitive value on designing distributed concurrent systems when we are forced to choose between rust on one aile(or C++n java on the same aile)and functional programming languages like Haskell,scala on the other side

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

      Don't forget Go - though I think Rust is better than Go, go is still extremely good (though it has a GC, no macros, and no super powers).
      I'd say Rust has a lot of functional flavour built-in - the original compiler was writtin in ocaml, and even at one point had an functional purity system, though it was removed, as the Result passing convention works so well.
      You can see the functional influence in both the iterator system, and the monads `Result` and `Option` which are foundational to the Rust standard library and ecosystem.

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

    It's like C# at a Halloween party dressed up as Python and pretending to be nice to everyone

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

      I've always though of it as Haskell and lisp sneaking into the cool languages party in C's overcoat

  • @user-qr4jf4tv2x
    @user-qr4jf4tv2x Год назад

    i hope to see more of "Rust Is Easy" with dealing with errors

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

      Already gotcha covered ruclips.net/video/bu_gulee89Q/видео.html
      Do check out my other videos!

    • @user-qr4jf4tv2x
      @user-qr4jf4tv2x Год назад

      @@NoBoilerplate nice thank you