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


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

    @STL:  Your description of not being able to use & on the temporary created by std::string concatenation doesn't hold for C++ in Visual Studio 2010.  For instance, when I compile the following code ...

    #include <iostream>
    using std::cout;
    using std::endl;
    #include <string>
    using std::string;
    int main () {
        string x( "hello " );
        string y( "world" );
        cout << ( x + y ) << endl;
        cout << &( x + y ) << endl;
        return 0;
    ... there are no compiler warnings and no compiler errors.  When I run that compiled code, I get the following output:
    hello world
    Aside:  Using g++ 4.5.0 with -std=c++0x, there is a compiler warning, but no compiler errors.  Here is the compiler warning:
    warning: taking address of temporary


    If I change std::string to int, then everything works as expected and I get the following compilation error for C++ in Visual Studio 2010:

    error C2102: '&' requires l-value
    .  In g++ 4.5.0, I get the following compilation error:
    error: lvalue required as unary '&' operand


    Joshua Burkholder

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

    > anyway, what will the next video be about?

    I'm open to suggestions. I'd like to cover simple techniques before advanced ones (looking at the STL's implementation would be advanced). I think I might demonstrate <type_traits>. (Note that I won't be covering iostreams in this series.)


    #include <type_traits>, decltype, and the rest of the template metaprogramming (aka using C++ to "preprocess"/modify/script C++ during compile-time) material would be interesting.  Any info on how to use std::string or char * ... or whatever ... for manipulating strings at compile-time in C++0x would be appreciated.  If the new standard still does not support manipulating strings at compile-time without work-arounds (aka boost::mpl::string), then what is the current justification that the standards committee gives for still not allowing string manipulations at compile-time?  For template-metaprogramming, I'd personnally like to see an example of loop-unrolling ... right now, if I need a for ( i = 0; i < n; ++i ) { v[i]=...; } but I just want a v[0]=...; v[1]=...; ...; v[n]=...;, then I just script that unrolled-loop to a text file and copy & paste ... which works ... but is a kludge.  I'd like C++ to do that loop-unrolling for me at compile-time ... so I can share and reuse that C++ solution.


    Also, generating random floats or doubles from a Normal distribution using #include <random> would be great ... esp. for simultations, stocastic models, and games.  Any explanation on how to create our own distributions would also be great.


    Discussing the usefulness, pros and cons, of std::valarray and std::slice from #include <valarray> ... and showing off some of the MATLAB-like functionality of std::valarray (like valarray1 + valarray2, pow( valarray1, 2. ), valarray1.sum(), valarray1.apply( user_function ), etc.)


    Finally, simultaneously returning multiple values from a function or method using #include <tuple> and then accessing those values ... esp. best practices. 


    Thanks In Advance,

    Joshua Burkholder


  • Silverlight TV Episode 1: The Joys of Trusted Out-of-Browser Applications

    I love the format of the show.  It's short, sweet, and the mistakes are still in there ... so it's not just an info-mmercial.


    I want to see the test cases/experiments of the Silverlight team trying to incorporate XNA (the 3D parts) or WPF 3D into Silverlight.


    Thanks In Advance.



  • This Week on C9: Project Natal, Qex for SQL, and Bing for Devs

    In the "Adam Kinney - Motion Capture viewer in Silverlight" section of the "This Week on Channel 9" video, it was mentioned that Nikola used the new 3D features of Silverlight 3.0 to create his Motion Capture Viewer.  That is not the case.  Nikola's Motion Capture Viewer only requires Silverlight 2.0.  Nikola coded the point, vector, matrix, quaternion, etc. classes needed for the quick software rendering of those stick figures (all of which is provided in his Silverlight 2.0 source code) ... and all easily handled by the Silverlight 2.0 player.

    Very Respectfully,
    Joshua Burkholder