Catching up with async Rust

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 49

  • @fasterthanlime
    @fasterthanlime  18 годин тому +3

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/fasterthanlime/. The first 200 of you will get 20% off Brilliant’s annual premium subscription.

    • @romanstingler435
      @romanstingler435 17 годин тому

      hey, hope you are doing great.
      Great to see you again

    • @fasterthanlime
      @fasterthanlime  16 годин тому +2

      @@romanstingler435I actually am, thanks for asking! Happy holidays!

  • @riki6858
    @riki6858 17 годин тому +54

    I put away rust for a lil while then chose today to come back and look at async. And by some huge coincidence, you post an async video! Truly a christmas miracle

  • @velho6298
    @velho6298 14 годин тому +25

    Bbno$ at home.
    Happy holidays

  • @compiler-errors
    @compiler-errors 15 годин тому +7

    Hopefully return type notation gets stabilized soon so you'll be able to add those Send and 'static bounds on the caller side.

    • @qm3ster
      @qm3ster 14 годин тому

      Do you have a link to what it's going to look like?

  • @Fracture1603
    @Fracture1603 16 годин тому +15

    Hey! Welcome back :) I was reading your website the other day randomly after watching one of your older videos and realised you're in Lyon! Very cool as I live here too :D Such a lovely place to live (I am originally from the UK). Anyway Hope you had a lovely Christmas. Bonne fête!

    • @fasterthanlime
      @fasterthanlime  16 годин тому +5

      Bonnes fêtes to you too, enjoy the European Union 😌

    • @Fracture1603
      @Fracture1603 16 годин тому

      @@fasterthanlime Oh I do, we moved here back in 2018. Absolutely love living in Lyon. Incredible place. Glad to see you're recovering from your surgery earlier in the year :)

  • @NotherPleb
    @NotherPleb 16 годин тому +3

    The tower future is more flexible but requires you to Box your future or name your future which then requires you to implement your own Future (and probably pull out the pin-project crate) and the logic of the service shifts to the future implementation. I'm not aware of a (near) perfect solution but this is pretty daunting for first time users.

    • @fasterthanlime
      @fasterthanlime  16 годин тому +1

      The video shows a third solution (TAIT), but yeah, all off it is probably daunting, good point!

    • @NotherPleb
      @NotherPleb 16 годин тому

      @@fasterthanlime Ah I missed that! So there's no limitation? You can impl the call method with an async block and your future associated type be impl Future + Send + 'a?

  • @jacobcombe2012
    @jacobcombe2012 14 годин тому

    Missed these videos!!

  • @johanngambolputty5351
    @johanngambolputty5351 6 годин тому +2

    Pretty sure async is the last bit of rust I haven't touched yet, hope it gets simpler by the time I get around to it. But then again I haven't yet really needed to write anything that has functions that wait for a bit and need to give way.

    • @fasterthanlime
      @fasterthanlime  5 годин тому +1

      It definitely has gotten a lot simpler, you can see the whole history over at areweasyncyet.rs - writing futures manually was the only option in the beginning, and now there's really no reason to do it!

  • @deado7282
    @deado7282 4 години тому +2

    Ok... I'll keep fiddling around with go because I won't be able to convince anyone else learning these concepts, problems & solutions. Including me.
    I know stuff in theory but using it on a day to day basis & creating maintainable code. I have time & skill issue there.
    Interesting though.

  • @SimonBuchanNz
    @SimonBuchanNz 14 годин тому +3

    I was expecting a mention of + use, which I haven't had a chance to use yet but is apparently about specifying lifetimes for futures?

  • @taquanminhlong
    @taquanminhlong 28 хвилин тому +1

    🎹🎹🎹 💯💯💯

  • @urisinger3412
    @urisinger3412 4 години тому

    what if we could add bounds to functions in traits? ```rust
    trait Foo{
    async fn bar(&self) + Send + Sync + 'static -> i32{
    ...
    }
    }```

  • @vitasomething
    @vitasomething 17 годин тому +12

    where are your cat ears?

    • @fasterthanlime
      @fasterthanlime  16 годин тому +19

      I keep my cat ears were nobody would look for them: on my two cats.

  • @BarronKane
    @BarronKane 17 годин тому +3

    I love these videos, and I've been in and out of rust for years. After doing a project in C# with linq and cosmos, it's so difficult to consider another project in rust just with ease of use alone. I could say similar things about swift.
    Having async stabilized like this is a huge boon for rust, I really look forward to seeing more progress. I hope the rust foundation gets comfortable enough to visit older STD libraries to smooth them out, some of them have quite a bit of bloat or cost associated with them that really require alternate packages.

  • @narigoncs
    @narigoncs 16 годин тому +1

    This video was the best christmas gift I could've gotten. Thanks!

  • @foxquirk
    @foxquirk 6 годин тому

    I never really understood the advantage with async. It seems like too much needless complexity for me. I would much rather run around calling libc::ppoll on file descriptors like a cavewoman than having to deal with all that.

  • @trippstreehouse
    @trippstreehouse 12 годин тому

    what song is playing in the first 15 seconds of this video

  • @StefaNoneD
    @StefaNoneD 4 години тому

    This it too fast for me to digest. 😵‍💫

  • @comosaycomosah
    @comosaycomosah 15 годин тому +1

    Been getting rusty on rust lately lol i started aoc in rust and only made it to like problem 6...i did do aoc cybersecurity tho lol i have a lot of fun with rust but still not 100% comfortable with it yet tbh

  • @shirshak6738
    @shirshak6738 14 годин тому +2

    i wish they can fix all these async rust issue. idc if breaking change has to be made here.

  • @JG-nm9zk
    @JG-nm9zk 17 годин тому +3

    There are still fundamental problems with rust async. What color is your runtime? Not only what color is your function?

    • @HowDoYouUseSpaceBar
      @HowDoYouUseSpaceBar 17 годин тому

      I like blue!

    • @us4tiyny4n
      @us4tiyny4n 17 годин тому +1

      I mean isn’t it a universal problem though?

    • @fasterthanlime
      @fasterthanlime  16 годин тому +5

      Where some see problems, others see flexibility! tokio is not the be-all end-all, see monoio, glommio, etc,

    • @JG-nm9zk
      @JG-nm9zk 16 годин тому

      The problem is that each of your dependencies have to be written for the same version of the same runtime to be used in the same context. I know about those other runtimes. More runtime doesn't help this problem at all.

    • @quintencabo
      @quintencabo 14 годин тому

      ​Not with the go keyword with channels but I guess it's too much overhead for rust​@@us4tiyny4n

  • @alexandrep4913
    @alexandrep4913 9 годин тому

    This language is such an eye soar, its like looking at chicken scratch

  • @jonathan2847
    @jonathan2847 14 годин тому +1

    Async has always been a mistake everywhere. It is an antipattern that infects libraries and bubbles up everywhere.

    • @PaleyBlog
      @PaleyBlog 13 годин тому +3

      What is the alternative?

    • @ankur-dhama
      @ankur-dhama 8 годин тому

      @@PaleyBlog Go has the alternative, essentially using the idea of "green threads".

    • @l-const
      @l-const 2 години тому +1

      @@ankur-dhama lol rust doesn't want a runtime or have an abstraction-scheduler over os threads, runtimes in embedded like embassy or rtic that are interrupt driven async runtimes wouldn't work for that. You are comparing rust with solutions for languages that are not targeting system level or embedded software.

  • @nometutentegiapreso
    @nometutentegiapreso 2 години тому

    Thanks for the Christmas gift 😊 are we going to see you at RustNL/RustWeek in May? "No spoilers" is also a valid answer 😉