Deep .NET: A Complete .NET Developer's Guide to Span with Stephen Toub and Scott Hanselman

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

КОМЕНТАРІ • 160

  • @MarkRendle
    @MarkRendle 4 місяці тому +10

    It's crazy how simple Span is on the inside considering the impact it's had on .NET in recent years.

  • @BloodHaZaRd666
    @BloodHaZaRd666 4 місяці тому +93

    Like video at 0 seconds just because of @Stephen Toub

    • @Aweklin
      @Aweklin 4 місяці тому +4

      Not you alone. I did exact same thing, because it's the wizards show!

    • @AvenDonn
      @AvenDonn 4 місяці тому +4

      Like this comment at 1 second because I had to stop to like the video first because of Stephen Toub

    • @thomastaylor648
      @thomastaylor648 4 місяці тому +3

      We need more Stephen Toub's

  • @BryanKelly
    @BryanKelly 4 місяці тому +8

    How does Span relate to Memory? I'd love to see a follow up to this that gets into that detail.

    • @user-dc9zo7ek5j
      @user-dc9zo7ek5j 3 місяці тому +5

      Memory is on the heap, Span is stack only. You can use Memory just like any other non-ref type, but Span can be used only within the function. Also, Memory can be used in async await, while the other cannot (because of stack only constraint). Memory behaves like Span, but it is much closer to ArraySegment without being array only type. I don't think I have used this type anywhere, but I have seen it being used around the Stream class.

  • @marklord7614
    @marklord7614 4 місяці тому +115

    Man, these guys are killing it with the series -- great topics.

  • @FICHEKK
    @FICHEKK 4 місяці тому +15

    Learning from Stephen Toub is such a pleasure, man is a .NET master!

  • @TheChonsey
    @TheChonsey 4 місяці тому +10

    Awesome content. Please make a video on System.IO.Pipelines

    • @caunt.official
      @caunt.official Місяць тому

      I hate that .NET Pipelines are all about numbers. What I would like to see, is pipeline of T, so I can have abstraction for any pipeline I want to build

  • @allied-data
    @allied-data 4 місяці тому +3

    Scott and Stephen: Outstanding series!

  • @amrswalha
    @amrswalha 4 місяці тому +4

    Scott and Stephen are doing a great job, all the best.

  • @dy0mber847
    @dy0mber847 4 місяці тому +5

    Incredible as always

  • @WantMore-mc8dx
    @WantMore-mc8dx 2 місяці тому

    Great duo - love it that Scott wants it zoomed in :)

  • @ChaoticNeutral6
    @ChaoticNeutral6 4 місяці тому

    That was wild, I definitely want to see a part 2. Would also be cool to go through stuff like MemoryMarshall and its methods

  • @Муслим-с2щ
    @Муслим-с2щ 4 місяці тому +3

    Like in the good old days of Channel 9 👍

  • @mrqbboy
    @mrqbboy 4 місяці тому

    I'm going to repeat myself, but thanks Scott and Stephen.

  • @JakobStrasser
    @JakobStrasser 4 місяці тому

    Thanks, very informative!

  • @lolroflxd
    @lolroflxd 4 місяці тому +1

    Awesome ❤

  • @kishananem
    @kishananem 4 місяці тому

    Hello Scott/ Stephen
    Please do videos about algorithms used in framework.
    Please like comments who interested in this. They may do video.

  • @Corvinaification
    @Corvinaification 4 місяці тому

    Amazing!

  • @paulscarlett4346
    @paulscarlett4346 4 місяці тому +2

    "Please - May I have more?"

  • @jr.BoarOfGold
    @jr.BoarOfGold 4 місяці тому

    I leave my instant like

  • @rham1985
    @rham1985 3 місяці тому

    think i've heard is as:
    The two hardest things for programmers:
    * Naming things
    * Cache invalidation
    * Off by one errors

  • @babyboie20
    @babyboie20 3 місяці тому +1

    really like the topic but holy crap can we use dark mode next time. I literally get pain in the back of my eyes every time switching from dark to light.

  • @kaolyfe-cw2cm
    @kaolyfe-cw2cm 4 місяці тому

    Ahhh, so this is what a code 🥷 looks like...thank you for the in-depth look Scott and Stephen.

    • @josefwurzel5072
      @josefwurzel5072 4 місяці тому

      Haha, exactly. I just imagined us mere mortal developers, developing away our daily lifes in the 2D layout of the streets. While Stephen, with his black ninja suit jumps from roof to roof, doing seemingly miraculous things in 3D space, hidden in the darkness and the shadows 😀 and we just go "wtf??"

  • @tedchirvasiu
    @tedchirvasiu 4 місяці тому +1

    C##

  • @dskim2459
    @dskim2459 4 місяці тому

    why dooes audio quality from .net never improve? please give them a good mic

  • @lukeP01
    @lukeP01 4 місяці тому +2

    I'm not smart enough for this video

  • @LogicException
    @LogicException 4 місяці тому +5

    Great talk but this "please zoom in" is so annoying. Videos aren't made here for people who spend an hour on the toilet on their smartphone. Anyone with a normal monitor, be it 1080p or 4k, should be able to read this. We can only talk about it if you have a critical visual impairment, but even then the video would be bad because it's way too fast.
    So here's a request: save the constant "please zoom in" and trust people to use their eyes and brains.

    • @David-id6jw
      @David-id6jw 4 місяці тому +5

      I don't necessarily want to have to have the video in fullscreen just to be able to read the text. In interviews like this, readability in lots of different contexts is important. Hanselman has the experience; let him do his job.

    • @LogicException
      @LogicException 4 місяці тому

      @@David-id6jw I certainly let him do his job, but I don't have to like the result. But a serious question: Why no full screen? What do the bars to the left and right of the video, the dead space, make more valuable than running the video on fullscreen?

    • @David-id6jw
      @David-id6jw 4 місяці тому +5

      @@LogicException I've got it playing in a browser tab (with all the UA-cam stuff around it), possibly reading comments while listening, or switching tabs to look things up (like the mentioned disasmo extension, which I'm already finding useful), or whatever else. Maybe I'll pop it out in a picture-in-picture window so I can still see it while I'm looking at other things. The only time I'll fullscreen the video is if I'm doing absolutely nothing else than watching the video. If I have any reason at all to switch to another window (such as checking certain things in Visual Studio, or completely unrelated things like email or chat), fullscreen is pointless.
      If the video text is sized such that you can't read it outside of fullscreen, effectively demanding complete attention from the user, then I'm much less likely to watch it.

    • @fabii5555
      @fabii5555 4 місяці тому +3

      Well, I always watch UA-cam on my phone sitting/laying on the couch. So for me, zooming is really important!

  • @markcooke4866
    @markcooke4866 4 місяці тому +1

    I think Scott confused a lot of people with the floppy disk jumper reference 💾🏃

  • @Tamazakis
    @Tamazakis 4 місяці тому +36

    TimeSpan well spent! Thank you :)

  • @1camper69
    @1camper69 4 місяці тому +35

    These talks from Stephen are truly the best dotnet content available. Stephen has the knowledge and goes next level in explaining it extremely clear but simple and is just a joy to listen to.

  • @barrysphone
    @barrysphone 4 місяці тому +32

    This series is awesome, please keep it going for a long time. Stephen's knowledge is incredible and his enthusiasm is infectious. The dynamic between Scott and Stephen make this series unmissable.

  • @MatteoGariglio
    @MatteoGariglio 4 місяці тому +37

    This series of videos featuring Stephen Toub is truly remarkable and incredibly interesting. Thank you!

  • @ElSnakeObwb
    @ElSnakeObwb 4 місяці тому +28

    Love this series. keep it up

  • @CuriouslyContent
    @CuriouslyContent 4 місяці тому +25

    I can't get enough of this content :) Who would have thought that an hour long video on spans is literally the most exciting thing on my feed this week!

  • @The.WorldVentures
    @The.WorldVentures 4 місяці тому +67

    How does someone even become as great as Stephen Toub, man the guy knows his stuff.

    • @jackkendall6420
      @jackkendall6420 4 місяці тому +12

      You do it as your fulltime job for multiple decades, haha.

    • @kaolyfe-cw2cm
      @kaolyfe-cw2cm 4 місяці тому

      Pray enough to the coding gods...j/k 😄

  • @lstutzman
    @lstutzman 4 місяці тому +9

    Fantastic content guys!! Can’t wait for the next one. A deep dive into the GC would be cool

  • @lordtony8276
    @lordtony8276 4 місяці тому +9

    "Have you got anything without Span?"
    "Well, there's Span Span List and Span, that's not got much Span in it."

    • @p.j.wilkins1321
      @p.j.wilkins1321 3 місяці тому

      Lobster Thermidor aux crevettes with a Mornay sauce, garnished with truffle pâté, brandy, and a fried egg on top, and Span.

  • @alexisfibonacci
    @alexisfibonacci 4 місяці тому +3

    I haven't seen Bart De Smet in years. Is he available to talk about IObservable? Why has there been less emphasis on it in recent times? Also IQbservable..

  • @fieryscorpion
    @fieryscorpion 4 місяці тому +6

    This is amazing!
    Now I need a video on Multithreading and Parallel Processing from Scott and Stephen!

  • @nepalxplorer
    @nepalxplorer 4 місяці тому +9

    WOW!!! Love these series, please don't stop!

  • @wimzi9887
    @wimzi9887 4 місяці тому +2

    I wanna watch Stephen build a complex project from start to finish. I would love to see how he works.

  • @superpcstation
    @superpcstation 4 місяці тому +5

    Please don't stop making these!

  • @solidusflux
    @solidusflux 3 місяці тому +1

    Excellent content. Also: these light mode users bring balance to the force

  • @deivycode
    @deivycode 3 місяці тому +1

    Where we can learn this kind of stuff is actually very amazing.

  • @SlackwareNVM
    @SlackwareNVM 4 місяці тому +3

    I'm interested in the meaning behind that last constructor check. Also, what are the tradeoffs from the alternative implementations you mentioned?
    Would love to know more about Memory as well. I don't yet have proper intuition of how to use it.

  • @preet1979
    @preet1979 4 місяці тому +1

    This was a great video. All I need now is another deep dive video into Memory to complete my understanding of it. Thanks again for such a great video.

  • @behboodik
    @behboodik 4 місяці тому +7

    Every video with Stephen in it is a treasure

  • @djchrisi
    @djchrisi 4 місяці тому +1

    28:30 unsafe ist really a great keyword because it truly scares developers off ;)

  • @YuriBez2023
    @YuriBez2023 4 місяці тому +1

    @37:11 - Stephen's fingers were off-by-one there.

  • @piotrszuflicki1527
    @piotrszuflicki1527 2 місяці тому +1

    When will we see next episode from Deep Dive series?

  • @SlackwareNVM
    @SlackwareNVM 3 місяці тому +1

    Any continuation of the series coming soon?

  • @weird_wyrd
    @weird_wyrd 4 місяці тому +2

    That floppy drive jumper comparison got me. The assembly I could follow, ain't never heard of a jumper before. Today I learned a couple things! Great content!

    • @OlivierDALET
      @OlivierDALET 3 місяці тому +1

      Jumpers were a little switch on 3'1/2 floppy discs that revealed or hid a hole: very modern tech compared to the little adhesive tape you had to stick on 5'1/4 discs to achieve the same (that is write-protect your disc)

  • @fatlumlatifi2897
    @fatlumlatifi2897 4 місяці тому +2

    Excellent video, please keep Mr. Toub on a few more episodes. As of topics to cover if possible please make video on how to interop or preferably make binding of C libraries on .NET.

  • @lejoyke
    @lejoyke 3 місяці тому +1

    Although I don't understand some things, I still feel excited. Please continue to keep up

  • @delphiguy23
    @delphiguy23 4 місяці тому +2

    I saw Stephen Toub, I clicked.... freaking awesome presentation learned a lot from this.

  • @DavidPereira-lc1yq
    @DavidPereira-lc1yq 4 місяці тому +1

    This is freaking awesome!!! Right from the source, you should build a comprehensive "deep C# course" with all of this, for people that would like to purse perf related topics. Right now, I don't think there's a place where you can do that. It's basically spread around books, courses, blogs, etc etc.
    Really nice this one.

  • @Grimlock1979
    @Grimlock1979 4 місяці тому +2

    Funny how he doesn't start talking about spans until half way through the video.

  • @norm6096
    @norm6096 4 місяці тому +2

    You guys are awesome combo, thanks for the videos! :)

  • @kapsir7255
    @kapsir7255 2 місяці тому

    Big thanks for the Deep .NET series, these are sooo great 🚀
    One question regarding Span: Are there as many improvements in the compiler for netfx as in .NET too? Is it worth to update APIs in legacy code with the System.Memory NuGet package?

  • @heischono4917
    @heischono4917 4 місяці тому

    I wonder what Scott is using a floppy for? :D Wonderful video, I hope we get more f this kind. Greetings from Norway :)

  • @LasseVågsætherKarlsen
    @LasseVågsætherKarlsen 4 місяці тому +1

    Man, you guys nailed it as usual, absolutely love these videos. GC next? 🙂

  • @lis2889
    @lis2889 3 місяці тому

    Hi! Thanks for the video! Could you please record similar one about GC. Please 🥺

  • @StackOverflowMan
    @StackOverflowMan 4 місяці тому

    "readonly ref struct" appears in C# 8, while Span appreared earlier in .net core 2, and than Span was just a struct.
    Would be interesting to see how it evolve.

  • @ethanr0x
    @ethanr0x 2 місяці тому

    70% of the "dumb" questions of Scott are so out of place...ridiculous

  • @schlott1970
    @schlott1970 4 місяці тому +1

    My biggest question was how, using span, was the compiler able to keep such a tight loop when enumerating? Also could have mentioned that span does not allocate any memory or copy stuff around! This was a good one Scott/stephen! Thankyou

    • @davidantolingonzalez4929
      @davidantolingonzalez4929 4 місяці тому +1

      It does allocate memory for the Span (two fields), but it does on the stack, not on the heap. Also, since it only stores an address of memory and an int, no copy of data is needed.
      The tight loop is achieved because T reference is basically a pointer so for enumerating the only thing it has to do is add "one" to the pointer times length, exactly the same as an array.

  • @anm3037
    @anm3037 4 місяці тому

    Any interface for all collections (Array, List, etc) that can be converted to Span

  • @KvapuJanjalia
    @KvapuJanjalia 4 місяці тому

    Looking forward to deep dives into memory of T, sequence of T, pipes and buffers.

  • @colhountech
    @colhountech 4 місяці тому +1

    Best Content On youtube today. I love the relaxed page and the high intensity content. It's almost an anti pattern of all the click-bate, gapless, b-roll crap on youtube today.
    If stephen does a workshop of stuff like this in NDC London next year, I'll drop $2000 to attend like when Dave and Damiean did the early workshops on .net core in circa 2017.

  • @ivandrofly
    @ivandrofly 4 місяці тому

    At the beginning of the video, while using Rider and I'm like it's still hard to see the IL code in Visual Studio 😆😆

  • @imranhussain8700
    @imranhussain8700 4 місяці тому

    Tell us in the comment what you like and what you don't like.
    There are five videos now and I am still figuring out what are don't like.
    is there anything in these videos that we don't like, I don't think so.

  • @chaouanabil3087
    @chaouanabil3087 3 місяці тому

    it was from a month and didn't see it till today!!! i hope next one would be Memory and Pipes and Channels

  • @gilbertsenyonjo963
    @gilbertsenyonjo963 17 днів тому

    Good stuff! Loved it. Thank you dotnet team.

  • @Cymricus
    @Cymricus 4 місяці тому +1

    the people in chat being negative about copilot are gonna get behind if they don’t use the very powerful tools at our disposal.
    you really don’t want to be behind in a world with generative AI.

  • @kamlezadeh
    @kamlezadeh 4 місяці тому

    Can we have a video explaining ArrayPool and MemoryPool please?

  • @MehrdadSoltani-qn2ny
    @MehrdadSoltani-qn2ny 4 місяці тому +1

    one of the best demo/tutorials I have ever seen about Span.

  • @freierNamen
    @freierNamen 4 місяці тому +1

    Oh no, it happened again!
    The video is over and I've already seen all parts of the series😢😂
    Thank you so much! Love every second of it...

  • @skarcade
    @skarcade 4 місяці тому +1

    How many times was he told to zoom in during this video? 🔍😂

  • @robl39
    @robl39 4 місяці тому

    Can you guys please deep dive the csc or the CLR?

  • @zumalifeguard3493
    @zumalifeguard3493 4 місяці тому +1

    It's kinda freaking me out honestly that Scott doesn't know arrays in C# are always contiguous. I know he's a very good developer. Just surprised I guess. Arrays have to be contiguous or couldn't effectively rely on locality of references. That's the big reason why std::vector is now recommended as the primary algorithm in C++, instead of things like linked-lists, etc., because in modern architecture, it's actually faster to work with contiguous arrays for a lot of things that previously used to be not be option -- all because of modern hardware.

    • @user-dc9zo7ek5j
      @user-dc9zo7ek5j 3 місяці тому

      I know right? Very strange... Maybe his confusion was with reference types, but their reference is still stored contiguous in the array.

  • @ivandrofly
    @ivandrofly 4 місяці тому

    34:31 - Pause
    39:00 - utf8 syntax from c# 11

  • @yonatan2608
    @yonatan2608 4 місяці тому

    These kind of videos should be in 202 schools.

  • @evarlast
    @evarlast 3 місяці тому

    Best C# feature in 10-15 yrs.

  • @mey33am
    @mey33am 4 місяці тому +1

    Keep posting Stephan! We need more content like this, Thank You

  • @richmenaft
    @richmenaft 4 місяці тому

    Please, do this series in dark mode...

  • @theandrewharry
    @theandrewharry 3 місяці тому

    I wish I could like this 💯 times

  • @MladenMihajlovic
    @MladenMihajlovic 4 місяці тому +2

    You should really put "deep dive" in all the titles - much easier to find.

    • @shanselman
      @shanselman 4 місяці тому +1

      fair...there's a playlist also

    • @MladenMihajlovic
      @MladenMihajlovic 4 місяці тому +1

      @@shanselman Oh cool didn't know that. Favoritttettteeteed ;-) Playlists don't seem to come up when searching youtube sadly.

  • @davidelettieri
    @davidelettieri Місяць тому

    Keep this series going!

  • @moverecursus1337
    @moverecursus1337 2 місяці тому

    well, this is awesome

  • @__angle
    @__angle 4 місяці тому

    🥰

  • @dsellers
    @dsellers 4 місяці тому

    👏

  • @hashdynamics978
    @hashdynamics978 4 місяці тому

    👏

  • @tayyabshaikh3286
    @tayyabshaikh3286 4 місяці тому

    Pure Knowledge Sharing.. & No dumb podcast like others.. Truly Marvelous.

  • @Aaron31056
    @Aaron31056 4 місяці тому

    Amazing

  • @SahilDesai-sx3sn
    @SahilDesai-sx3sn 4 місяці тому

    knowledge SPANNING multiple videos.

  • @WizardofWestmarch
    @WizardofWestmarch 4 місяці тому

    At 38:48 Toub is talking about how if you have a readonly span it will put it in the data block of the binary. Do things like ImmutableArray get the same benefit or is the JIT compiler extra aware of ReadOnlySpan to do that optimization?

  • @onodera3964
    @onodera3964 3 місяці тому

    Great series, loving it. Some of the topics I would love to see covered next:
    - how equality works (intermediate)
    - how the allocator and and the GC work (expert)
    - how exceptions work (expert)
    - how analyzers work
    - how generators work
    - how JIT works

  • @imranhussain8700
    @imranhussain8700 4 місяці тому

    Async/Await
    LINQ
    RegEx
    Span
    😀😀😀😀😀😀😀😀😀😀😀😀😀😀
    Loving it.
    Thank you very much. Great Content.

  • @rodrigolima206
    @rodrigolima206 4 місяці тому

    Very nice explanation thanks a lot. I would like to see something related to streams and how they work I was always curious about that. If possible, of course. Thanks again .

  • @apostolosmihailidis5467
    @apostolosmihailidis5467 Місяць тому

    These guys taught us so many things in that small "Span" of time ! Thanks a lot 🙏 Stephen's knowledge is so valuable !

  • @Matt-tp9lh
    @Matt-tp9lh 3 місяці тому

    Awesome series! Please do a video on the async runtime of c# next about how the default task scheduler works, especially interested in knowing how tasks get scheduled and as developers using the async runtime how do we avoid common pitfalls of inefficient patterns

  • @JavedaliShaikh-yy1jr
    @JavedaliShaikh-yy1jr 4 місяці тому

    Just Brilliant! Keep making more of these.. Thanks.