Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Lucian Wischik: Async Compiler - Bug Fixes, Updates and Core Improvements

Download

Right click “Save as…”

Lucian Wischik is an engineer who spends a great deal of his time making Async magic happen in the C# and VB compilers. With the recent release of Visual Studio Async CTP SP1 Refresh, come several low-level improvements in how asynchrony is orchestrated by the compiler infrastructure. Many bug fixes and improvements in the core Async technology have been orchestrated by Lucian. What's new at the compiler level? What are the improvements and how do they manifest themselves to programmers? As you learned from Stephen Toub, making your own awaitable types is easier in this release. In this episode of Going Deep, Lucian drills down even deeper to show you exactly why, and covers a lot of ground. So pay attention! Tune in. Enjoy.

PS: One of these days, I will pronounce Lucian's last name correctly. I promise.

Get the bits. Write code:

Details and Download Page: http://msdn.microsoft.com/en-US/vstudio/async

Forum for Feedback and Questions: http://social.msdn.microsoft.com/Forums/en-US/async/threads

 

Tags:

Follow the Discussion

  • Allan LindqvistaL_ Kinect ftw

    good stuff Smiley any chance you'll be talking about release schedule anytime soon? .net 4.5 maybe? Wink

  • felix9felix9 the cat that walked by itself

    very detailed report, nice stuff. happy to see such kind of transparency from large company like Microsoft.

    It seems like Async has a huge impact on the language spec, the languages is getting really complicated. no wonders many think we need languages designed with this in mind from the very beginning.

  • CharlesCharles Welcome Change

    @felix9: Lucian is as detailed oriented as you can get! I want to get him on C9 more often. It's important to note that Lucian implemented much of the compiler changes himself! He's a rock star.

    C

  • Adam SpeightAdam​Speight2008 The Bandito Coder

    @Charles: When a programmer becomes one of the greats, they only need one name.

    Erik (Meijer), Anders (Hejlsberg), Dijkstra, Lucian (Wischik)

    Charles (Torre)

  • CharlesCharles Welcome Change

    @AdamSpeight2008: Smiley Though you can certainly remove my name from that list!!! I just talk about programming these days.... I used to be a competent programmer, but the days of Charles cranking code seem to be mostly over (well, who knows what the future holds....). Funny that my name would appear in a list like yours! Smiley Charles, Dijkstra, Meijer, Lucian!!! LOL.

    Thanks for the kind thoughts,
    C

  • Allan LindqvistaL_ Kinect ftw

    @Charles: you may not be cranking out code but you're just as well known as the other guys Smiley

    not to mention a whole lot fewer people would even know about anders, erik and the others if it wasnt for you and the rest of channel9

  • Eric AguiarHeavens​Revenge Know Thyself

    Async integrated into PLINQ sounds like it would be pretty fun to implement and overly powerful in use Smiley

    Lucien also does pretty well at being able to speak to "us" through you+camera with you as a catalyst with questions.

    Anders/Mads arent so fun to talk to recently since they are only about high level features, or a sneek peak into what is in the works which is ok but not my cup of tea, unless they gave funny corner-case code samples on the whiteboard. So personally I love the nitty-gritty details of this sort from who implemented and designed the compiler code rewriting/restructuring techniques just before code generation.

  • Adam SpeightAdam​Speight2008 The Bandito Coder

    Lucian (as noted by himself) munged C# style generics into his VB.net example.

    So what would it take to allow this style to be legal in vb.net (whilst preserving the vb.net style).

    For example via an attribute. 

     

    [Generics.CSharpStyle]
    Public Function GetLength<T>(ByVal obj As T) As Integer
      Return obj.ToString.Length
    End Function 
    
    [Lambda.CSharpStyle]
    Public Sub Example()
    Dim x = (obj)=>obj.ToString.Length
    End Sub

  • Just FYI, I've tried three times now to download and play this content through the Zune desktop software. Each time I try to play it, it gets about 20 seconds in and then drops out with an error message about the file being "corrupt or not valid".

    I'm currently downloading the WMV version directly from the site, which I assume will work.

  • CharlesCharles Welcome Change

    @dpratt71: Strange. Please let us know.

    C

  • Async integrated into PLINQ?
    Async in linq+plinq+rx feels at first like it would be great. But let's think through some examples...

    string[] urls = new[] {"htp://a.com", "htp://b.com"}
    IAsyncEnumerable<string>[] values =
                  async from url in urls
                  select await new WebClient().DownloadStringTaskAsync(url);

    Note: we're not planning to ship IAsyncEnumerable<T>. But you could easily write it yourself. It would involve the signature "async Task<bool> MoveNextAsync() {...}". Also we're not planning on "async linq". I wrote this example just as a strawman.

     

    Anyway, this example is a bad use of async! Look what it would translate into:

    values = urls.SelectAsync(async (url) => await wc.DownloadStringTaskAsync(url) );

    which is identical to this more efficient version:

    values = urls.Select( (url) => wc.DownloadStringTaskAsync(url) );

     

    The "await" operator unwrapped the Task<string> that came out of DownloadStringTaskAsync into just a string, and then the "async" modifier morally wrapped it right back up into a Task<>.

     

    Let's also be clear that async will always involve some overhead. It's nice to think of LINQ expressions operating over large sets of data, i.e. precisely the places where we don't want this overhead.

     

    There seem to be other places where plinq+rx uses of async would be useful, but without going to the level of integrating async into linq expressions...

  • @AdamSpeight2008: I do prefer the C# syntax for generics when writing on whiteboards! And we're often asked for C# syntax for array indices, e.g. here:

    http://blogs.msdn.com/b/lucian/archive/2010/02/13/req8-use-for-arrays.aspx

    But having TWO different syntaxes in VB to write exactly the same thing? I'm sorry but I really don't like that!

     

    --
    Lucian

  • IvanIvan

    I have some small CS bacground, so I know that this stuff is extremely hard but still it is strange that MS didn't catch the finally bug in internal testing. I mean it is huge. And return; bug -ouch I think that like 30+% of the CS students would catch that.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.