Video & On-Demand

Bjarne Stroustrup interview: From the Foundation and C++11, to portability and the C++ resurgence

Last Monday, Bjarne Stroustrup gave a live interview to David Intersimone of Embarcadero to kick off their CodeRage 7 conference. Bjarne discusss the new Standard C++ Foundation, the ISO C++11 standard, new language features, how C++11 builds on C++’s strengths, application portability, and C++’s ubiquitous presence in the markets.

The video is now on YouTube. Enjoy.

 

Value Semantics and Concepts-Based Polymorphism -- Sean Parent

This past year at C++Now, Sean Parent gave a talk about Value Types that blew the room away. It will deepen your understanding of the design of the STL and change the way you think about and write code. He'll also show you some lean-and-mean image-processing demos that will drop your jaw. This is why we do C++.

Value Semantics and Concepts-Based Polymorphism

by Sean Parent

Sean will further develop the Value Semantics and Concepts-based Polymorphism concepts covered in his keynote, "Now What? A vignette in 3 parts."

Note: The audio is soft. Turn your volume up. The slides, the Keynote presentation, and the source code can be found in C++Now's GitHub repo here.

Watch the video...

 

Using C++11 to Speed Up Your Qt 5 Programs -- Marc Mutz

Last month's Qt DeveloperDays Europe videos are now available, including this one showing continued rapid adoption of C++11.

Using C++11 to Speed Up Your Qt 5 Programs (PDF slides)

Marc Mutz

Qt 5 comes with much-improved support for C++11. This talk will teach you techniques that you can use to make your applications use less memory or execute faster when compiled with a C++11 compiler. The focus is on techniques that will not break compatibility with C++98 compilers. After a look at the present state of C++11 support in Qt 5.0, the talk closes with a look at what we can expect in Qt 5.1.

From the summary slide "C++11 @ QT 5.0":

  • constexpr added to many types
  • move semantics added to a few types
  • initializer_list added to most types
  • new few N-ary ctors marked explicit, N >= 2
  • = delete used almost ubiquitously
  • noexcept added in a few central places

Systematic Error Handling in C++ -- Andrei Alexandrescu

Channel 9 has just posted a video of Andrei Alexandrescu’s "Systematic Error Handling in C++11" presented at C++ and Beyond 2012 last summer in Asheville, NC. This is a great 90-minute talk with useful insights and techniques for programming in general and programming in C++11 in particular.

Systematic Error Handling in C++11

Andrei Alexandrescu

Writing code that is resilient upon errors (API failures, exceptions, invalid memory access, and more) has always been a pain point in all languages. This being still largely an unsolved (and actually rather loosely-defined) problem, C++11 makes no claim of having solved it. However, C++11 is a more expressive language, and as always more expressive features can be put to good use toward devising better error-safe idioms and libraries.

This talk is a thorough visit through error resilience and how to achieve it in C++11. After a working definition, we go through a number of approaches and techniques, starting from the simplest and going all the way to file systems, storage with different performance and error profiles (think HDD vs. RAID vs. Flash vs. NAS), and more. As always, scaling up from in-process to inter-process to cross-machine to cross-datacenter entails different notions of correctness and resilience and different ways of achieving such.

To quote a classic, "one more thing"! An old acquaintance -- ScopeGuard -- will be present, with the note that ScopeGuard11 is much better (and much faster) than its former self.

Shevlin Park: A C++ AMP Implementation in Clang/LLVM Using OpenCL -- Dillon Sharlet

At the November 2012 LLVM Developers' Meeting, Dillon Sharlet of Intel gave a presentation on Shevlin Park, a prototype implementation of C++ AMP in Clang/LLVM using OpenCL. In this talk Dillon briefly discusses C++ AMP in comparison to OpenCL, details the implementation and shows the results of performance analysis on the prototype implementation.

Shevlin Park: A C++ AMP implementation in Clang/LLVM using OpenCL (MP4 video) (PDF slides)

Dillon Sharlet - Intel

We describe “Shevlin Park,” a prototype implementation of Microsoft’s C++ AMP built on Clang, LLVM, and OpenCL.

We fully describe Shevlin Park’s implementation including how Clang/LLVM can be augmented to easily accommodate C++ AMP programming constructs, how C++ AMP computation can be expressed as OpenCL compute kernels, and finally how the C++ AMP runtime library can be easily implemented on an OpenCL runtime.

Using several benchmarks, we evaluate Shevlin Park’s performance, Microsoft’s DirectX based C++ AMP, and also conventional OpenCL.

Modules update video available -- Doug Gregor

MP4 video of Doug Gregor's talk on Modules is now available via llvm.org. Combining links here:

Modules (MP4 video) (PDF slides)

Doug Gregor - Apple

The C preprocessor has long been a source of problems for programmers and tools alike.

Programmers must contend with widespread macro pollution and #include-ordering problems due to ill-behaved headers. Developers habitually employ various preprocessor workarounds, such as LONG_MACRO_PREFIXES, #include guards, and the occasional #undef of a library macro to mitigate these problems.

Tools, on the other hand, must cope with the inherent scalability problems associated with parsing the same headers repeatedly, because each different preprocessing context could effect how a header is interpreted – even though the programmer rarely wants it.

Modules seeks to solve this problem by isolating the interface of a particular library and compiling it (once) into an efficient, serialized representation that can be efficiently imported whenever that library is used, improving both the programmer’s experience and the scalability of the compilation process.

 

Exception-Safe Coding in C++ -- Jon Kalb

Jon Kalb from the C++ Now 2012 conference.

Exception-Safe Coding in C++

by Jon Kalb

Are you 100% confident that your code is exception-safe?

Safe usage of exceptions is a non-trivial problem that the industry has struggled with for the better part of two decades. If you have fear, uncertainty, or doubt about exception safety or just want to see the best practices for using exceptions in C++, this session is for you. We'll start with "What is the problem we are trying to solve?" and discuss alternatives, acknowledge the challenges associated with with exception usage, and cover some well-meaning but misguided attempts at safety. I will then present a set of guidelines that are the basis for safe exception usage and solid implementation techniques, including how to transition from an exception-unsafe legacy code base.

When we are finished you will know how to produce code that is easier to write, easier to understand, faster, and 100% robust in the face of exceptions.

This is a two part video series. Links:

Enjoy!

Podcast: Hanselminutes interviews Herb Sutter

A few weeks ago at the Build conference, Scott Hanselman sat down to talk with Herb Sutter about C++ and modern UI/UX. The podcast is now live here:

The Hanselminutes Podcast, Show #346

“Why C++” with Herb Sutter

Topics Scott and Herb discuss include:

  • 2:00 Scott mentions he has used C++ in the past. C++ has changed. We still call it C++, but it’s a very different language now.
  • 5:30 (Why) do we care about performance any more?
  • 10:00 What’s this GPGPU thing? Think of your GPU as your modern 80387.
  • 13:45 C++ is having a resurgence. Where is C++ big?
  • 18:00 Why not just use one language? or, What is C++ good at? Efficient abstraction and portability.
  • 21:45 Programmers have a responsibility to support the business. Avoid the pitfall of speeds & feeds.
  • 24:00 Herb's experience with his iPad, his iPhone, and his Slate 7 with Win8.
  • 28:45 We’re in two election seasons – (a) political and (b) technology (Nexus, iPad Mini, Surface, ...). Everyone is wallpapering the media with ads (some of them attack ads), and vying for customer votes/$$, and seeing who’s going to be the winner.
  • 35:00 Natural user interfaces – we get so easily used to touch that we paw all screen, and Scott’s son gets so used to saying “Xbox pause” that anything that doesn’t respond is “broken.”