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


Richard Anthony Hein Richard.Hein Stay on Target
  • Bjarne Stroustrup: Trends and Future of C++

    , exoteric wrote

    I wonder if there is a book on idiomatic, modern C++ using (albeit draft) C++0x features? Also, are concepts completely dead (not in terms of 0x which obviously they are)?

    From a quick search, there are some books in progress, but nothing yet.  The final draft of the standard is available online.  From Wikipedia, "There are unofficial plans to have the concepts back in the standard in some form,[4] however no official decision has been made yet."

  • Bjarne Stroustrup: Trends and Future of C++

    @Sven Groot:  I know I made it sound like RAII to implement user types with value semantics was new, but I know the pattern isn't new (although I didn't know it had a name), because I see it used in a few places in the code base I'm maintaining, and it is familiar and makes perfect sense to a C# developer.  However, the question is why isn't it used more often?  Boris talks about that in his presentation - copying all that data.  The hit on efficiency with all the copying going on makes people go back to using pointers and dynamic allocation, giving up on value semantics.  That's where C++0x comes in, introducing RValue references and move constructors. 

    Also, as Boris also mentions, when dealing with things that can't or shouldn't be copied, but can be moved, such as file handles, then RValue references and move semantics again save the day.  Then again, Boris talks about shared pointers, and how you can still implement value semantics for members which you need to have more fine-grained lifetime control over.  (I realize that shared pointers have been part of Boost and TR1, but it's now part of the standard).  So, while RAII isn't new, it's now something you can use everywhere to implement value semantics.

    This makes me happy. Smiley

  • Does Youtube perform well for you lately?

    (EDIT:  Just read DCMonkey's post ... so I'm fixing mine ...) 

    @DCMonkey:  I have the same problem when I go fullscreen on only one of my systems, 50% (or so) of the time the video doesn't render - just a black screen with audio.  I then just have to escape out of fullscreen, and go back to fullscreen and the video renders again.  It's very annoying.  I'm using IE9 RTW, but that can't be the sole problem because on other systems with IE9 RTW I don't have any problems.  I also only ever see this with YouTube.

  • Bjarne Stroustrup: Trends and Future of C++

    @Charles:  I watched Boris Jabes' presentation twice, before and after reviewing a lot of other C++0x/11 stuff and watching your interview with Herb Sutter, and I've just reviewed the slides from Bjarne.

    From a novice C++ programmer, who hasn't had more than a few hundred hours of C++ altogether in real world usage (well, maybe 500 or so, if I really think about it, but not continuously; and more everyday now because I've been assigned to deal with our legacy C++ code at work since January), let me explain why I haven't really wanted to program in C++.  It's just so easy to screw up.  Plain and simple.  I love higher level languages because they make it easier to say what you intend from the top down.  C++ is so bottom up and confusing because of the massive amount of tricks people can employ to obscure what is going on.  If they fail to implement a copy constructor, then watch out!  If they fail to implement the = operator properly, doom and memory leaks.  It's just a nightmare of details that take you away from getting stuff done. 

    Just last week, I was debugging a memory leak.  There's a struct that contains an array of strings, but in some places, the strings are allocated with CoTaskMemAlloc, in others with new, in another, SysAllocString, and in another there's some realloc over the array.  Since the struct is passed around all over the place and/or set in various functions that are exposed to user code to invoke, and sometimes across COM boundaries to the CLR, then sometimes it requires CoTaskMemFree, but in other places, it has to be delete [] and so on, then how can I know how to free the string array properly when the destructor is called (since the struct is a member variable)?  Nightmare.  This isn't simple code. 

    Now I am glad to hear some of the experts, like Boris, talk about how C++ value type semantics are the way things should be, and now suddenly you can wrap up some handle in a struct or class with value type semantics and only have to ensure the destructor closes the handle.  You should never have to call delete x or delete [] xs again, except in the destructor where God intended it.  I love how Herb says, this is garbage collection.  Well, I never really thought about it that way until he said it.  I see what he means and agree.  Perhaps it's not automatic in the CLR sense, but it's automatic enough if you build your user defined types with value semantics and a destructor, while still being completely deterministic, and you can't leak memory.  What took so long?  Big Smile  Now, that just makes sense.  So, C++ is sane again.

    Look at Bjarne's slides about all the various kinds of initialization semantics (slides 69-80) , and how they don't play nice together.  It's entirely inconsistent.  Now, there's uniform initialization semantics that you can use for everything.  FANTASTIC!  Seriously, that's awesome.  Now I can use X{...} for anything and it will just work.  {} even helps prevent narrowing/truncation.  What a relief.  Doesn't help for reading legacy code, but, hey, one step at a time.

    I have more to think about when looking at the threading/concurrency and locking semantics of C++0x, but that also looks great so far. 

    Of course I also love the lambda expressions. Smiley  A language is no longer a real language without them, IMHO.  Wink

    In summary, I'm not much of a C++ programmer and never claimed to be, but I'm going to become a pretty good C++0x/11 programmer.

    Cheers Big Smile

  • Lambda Calculus lectures

    , fanbaby wrote

    @Richard.Hein: My bad, i thought you were talking functional programming.

    Well, I am since lambda calculus is the essence of all functional programming.  It's just that in this case I'm particularly interested in the nitty gritty details of the simplest possible programming language, which is lambda calculus.  Everything else is syntax sugar. Wink

  • Lambda Calculus lectures

    @Charles:  I haven't seen the lecture notes before, so thanks for that, it should be quite useful. 

    I haven't seen everything aggregated by the second link, but the first in the list is the same lecture as I linked above.  I have also watched some of the other ones before - not all of them, so, thanks for the links. Smiley

  • Lambda Calculus lectures

    Bart De Smet's posts on lambda calculus are also very good http://community.bartdesmet.net/blogs/bart/archive/2009/08/17/mis-using-c-4-0-dynamic-type-free-lambda-calculus-church-numerals-and-more.aspx.


    I have to go back and read them again, since I've learned a lot since I first saw them.


  • Lambda Calculus lectures

    @fanbaby:  I looked at the lectures available, thanks for the reference ... but I don't see anything in particular on lambda calculus.  Do you know if it's specifically covered?

  • Lambda Calculus lectures

    @Ian2: I looked through their lectures, and they have some very interesting ones, but I don't see anything on lambda calculus.

  • Lambda Calculus lectures

    There's finally a lambda calculus lecture series on YouTube.  Every once in a while I try to find some, but this is the first time I've found any.  Posted March 12th. http://www.youtube.com/watch?v=S_WzF6BHadc

    Edit:  I've just finished watching them, and there's only 3 so far.  In the 3rd one he makes some mistakes that he acknowledges and promises to fix it someday ....  The lectures only cover the basics however, which I'm already familiar with.  He does also have some lectures on type theory ... so I'm checking out the first one....