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


Cory Nelson PhrostByte
  • Mohsen Agsen - C++ Today and Tomorrow

    , new2STL wrote


    *snip*. I think what you want is support for vectorization/vectorization library. Yea, vectorization support are nice but the ones I see around (gcc, Intel) still very close to C + compiler extensions. I hope things begin to get better after the C++ and GPU talk in the C&B and in the AMD Fusion Developer's Conference.

    Actually I love the intrinsic header files (and it is the only way mix assembler code from 64bit), but I'm suspect to talk about it (I'm that type of crazy dev who like to "brush bits" sometimes Perplexed)

    Sadly most existing libraries are too inflexible or require you to jump out of C++ and use some other language to define the vector bits.

    I'm not convinced GPU stuff like AMP will help at all for SIMD on the CPU -- GPU and CPU design are just too different.  CPU requires a much more careful design, where an algorithm might look completely different between SSE2, SSE4, and AVX instruction sets.  GPU still requires a careful design, but in wildly different areas.

  • Mohsen Agsen - C++ Today and Tomorrow

    Things I would like to see for VC++ and C++ in Windows:

    • A bigger focus on modern C++ design.  Look at the PPL -- it knows that it's in C++ and takes full advantage of it.  It fits perfectly, working exactly as expected.  Contrast this with so many of the other C++ offerings at MS which rely on or try to mimic COM.  COM is not a good or friendly way to write C++!
    • A better way to use SIMD intrinsics.  They're kind of a pain right now and I think it could be made much much better, to express it as native C++.  PPL is hyped as a way to better utilize your CPU, while a lot of people are still missing out on 2x-20x increases SIMD can provide to certain problems!
    • A new, pure-native UI framework with a focus on databinding.  Direct2D and pure vector like WPF would be a plus.  Built-in async databinding would be even better! Like WPF, design as if there was a clean slate -- don't just upgrade Win32 or MFC.
    • A kitchen-sink library similar to the .NET Framework.  Windows already has APIs scattered around for much of this, but a collection of supported, modern C++ wrappers would be fantastic.
  • Herb Sutter: C++ Questions and Answers

    I'm Cory.  Thanks for answering most of my questions, Herb.  I asked all of them in the reference of C++ standardization, not in terms of Microsoft's tools, so I'm glad you picked up on that.  Sorry if there was any confusion with my short statement-questions Wink

    Happy to hear that concepts and polymorphic functions are still on the plate.  Thanks for all your hard work -- looking forward to playing with it when compilers catch up.

  • Conversation with Herb Sutter: Perspectives on Modern C++(0x/11)

    @petke that doesn't specify any parameter types, but it also doesn't have any parameters!  I meant to specify parameters, but leave their types inferred.

    Basically instead of

    [](int i) { return i * 2; }

    You would have:

    [](i) { return i * 2; }

    Which would generate a functor that takes a parameter 'i' of any type -- equivalent to this:

    struct func
       template<typename T>
       auto operator()(T i) -> decltype(i * 2) { return i * 2; }

    These are called polymorphic lambdas.  They were discussed for C++0x but dropped as it was decided to be too complex to implement in a way compatible with Concepts (which were themselves removed).  I'm hoping to see it in a future standard.


  • Conversation with Herb Sutter: Perspectives on Modern C++(0x/11)

    @exoteric: I'm not sure how well the LINQ library would work for C++ because extension methods don't have a good parallel when it comes to iterators, and lambda functions are far more verbose than they are in C#.

    var enumerable = foo.Select(x => x.y).OrderByDescending(y => y.z);

    VS (made as good as I could think)

    auto range = from(foo.cbegin(), foo.cend()).select([](my_struct const &x) { return x.y; }).sort_desc([](my_sub_struct const &y) { return y.z; });

    Now think of all the extra typing you'd have to do for a longer, more complex query with Join() etc. -- it's not nearly as concise.  We don't have anonymous types either, so for some queries things might need to be declared outside of the query.  What I wrote there is certainly doable, though, and would likely perform significantly better than the equivalent LINQ.

    I wish C++0x allowed shorter lambdas that didn't specify parameter types -- it could work if they boiled down to a template functor that takes any argument type.

  • C9 Lectures: Stephan T. Lavavej - Standard Template Library (STL), 3 of n

    shared_ptr is heavier than a GC, but most things don't need to be manually allocated or shared so you should be using it so little that it doesn't matter.


    I don't think it would be easy for a C++ GC to reach the performance of the .NET GC, because .NET is so much stricter about what you can do with an object, ie. there's nothing stopping me from holding a pointer to a member of an object and using an offset to compute the actual object's address.  I believe the .NET GC also defragments the heap, seems unlikely with C++.

  • C9 Lectures: Stephan T. Lavavej - Standard Template Library (STL), 3 of n

    Been a long time since I've posted here too Smiley  STL, I'm curious if you know why unique_ptr has array new/delete support but shared_ptr doesn't?


    And a slight correction: having the same initialism is fun, but shared_ptr etc. were not added to SGI's Standard Template Library, but to the C++ Standard Library.

  • STL Iterator Debugging and Secure SCL

    *Raises hand as one of those C++ developers that always disables secure scl.  Not only is perf affected, but depending on your usage it can bloat up the binary size quite a bit.

    First things I do when creating a new project:


    #ifndef _DEBUG
    #define _SECURE_SCL 0

    #define NOMINMAX
  • Stephan T. Lavavej: Digging into C++ Technical Report 1 (TR1)

    This video has really nothing new to C++ developers, but I think it is a good introduction to those who use other languages and are thinking of dipping their feet into C++.

    To be a little cliché here, C++'s biggest strength is also its biggest weakness: the shear power of it all.  It typically takes newbies years before they realize the full strength of it and even after that you find yourself learning new useful things all the time.  The result of this is that many will take a quick glance at it, label it overly complex, and proudly tell everyone they meet who mentions it how horrible it is.

    Rarely will newbies be told of its strong benefits (like RAII), and Stephan very clearly explains a lot of them.  Don't get me wrong - C++ is not the be-all-end-all of languages, but it definitely fits in a lot more places than some would give it credit for.

    He does go off on a few tangents, but the meat of the interview is good enough to look past that!
  • Nikola Dudar: STLCLR - STL Development in the Managed World

    Does anyone know if managed C++ is being used in any production products?

    Microsoft seems to be all but ignoring unmanaged development now, continually pounding out this "managed managed managed" mantra for C++.  But I've yet to encounter anything but unmanaged in the wild, so I would be interested to see what managed is being used for.