VC++ and Win8 Metro apps: May 18, livestream and on-demand

Want to know how to write cool tablet apps using Visual C++?

On May 18, Microsoft is hosting a one-day free technical event for developers who want to write Metro apps for Windows 8 using Visual C++. I’m giving the opening talk, and the rest of the day is full of useful technical information on everything from XAML and DirectX to networking and VC++ compiler flags.

Please note: This event is Windows-specific, and talks will use both portable ISO C++ as well as Visual C++-specific libraries and compiler extensions; for brevity these are being referred to as "C++" to highlight to a Microsoft-specific audience that that this day is about Visual C++, not about Visual C# or Visual Basic or JavaScript.

From the page:

Join the Microsoft Visual C++ and Windows teams in Redmond on May 18, 2012 for a free, all-day event focused on building Windows 8 Metro style apps with C++. 

These Windows-specific talks will use both portable ISO C++ and Visual C++-specific compiler extensions; for brevity below we’ll refer to both as "C++" (i.e., this day is about Visual C++, not Visual C# or JavaScript).

We will have pragmatic advice for every developer writing Metro style apps and games with XAML and/or DirectX and C++.

Register now!

Agenda:

  • Visual C++ for Windows 8, Keynote by Herb Sutter
  • Building Windows 8 apps with XAML and C++
  • Building Windows 8 games with DirectX and C++
  • Introduction to the Windows Runtime Library  (WRL)
  • Writing Connected apps: Writing networking code with C++
  • Combining XAML & DirectX in a Metro style apps
  • Writing WinRT components to be consumed from any language
  • VC11 compiler flags for getting the most out of C++

All sessions will be recorded and available for on demand viewing on C9.

I wish I’d blogged about it right away when it was announced a week or so ago, because registration filled immediately before I could blog it (I think on the first day), and then when the room was expanded it filled again right away again before I could blog about it. Then I procrastinated for a few days. You can still register here for the waitlist to see it in person, but I have good news…

All sessions will be broadcast livestream and then available for viewing on demand. If you’re halfway around the world, or just halfway across the country, it’s hard to fly somewhere for a one-day event anyway; thanks to livestream and on-demand, the Internet is our friend. I look forward to seeing and e-seeing many of you there.

C++ and Beyond Panel: Modern C++ = Clean, Safe, and Faster Than Ever

I just posted the following panel announcement to the C++ and Beyond site. The three-day event (plus evening-before reception) with me, Scott Meyers, and Andrei Alexandrescu will be held on August 5-8, and early-bird registration is open until May 31.

 


image_thumb[1]C++11 is kind of like “C++ Dreamliner.” It’s built with world-class modern materials. It took a couple more years to finish than originally expected. But now it’s starting to roll out worldwide and flying more safely and efficiently than ever. (European readers may equally consider it “C++ 380.”)

As I write and teach about C++11, I emphasize that:

Modern C++ is clean, safe, and fast – modern C++ code is as readable and as type- and memory-safe as code written in any other modern language [*], and it has always been the king of ‘fast’ and is now faster than ever with new features like move semantics.

Bjarne Stroustrup made me add, at the end of the “clean and safe” part:

“[*] When used in a modern style.” – Bjarne Stroustrup

Bjarne and I claim this to be true. Others have disputed various parts of this statement – whether C++11 really has a usable safe subset, whether C++ is really necessarily faster than code in other languages, and other questions. What’s the truth?

These answers matter. Type safety and memory safety are important not only for writing reliable code that will fail or be abused less often, but also for improving developer productivity so that developers can spend less time on overhead “taxes” like checking for unsafe casts or buffer overruns. And the claim that C++ really is the king of “fast” has been consistently challenged for most of its history.

In this panel, Scott, Andrei, and I will weigh in with discussion – and data – on these important and current questions.

Talk Video: Welcome to the Jungle

Last month in Kansas City I gave a talk on “Welcome to the Jungle,” based on my recent essay of the same name (sequel to “The Free Lunch Is Over”) concerning the turn to mainstream heterogeneous distributed computing and the end of Moore’s Law.

Perceptive Software has now made the talk available online [EOA: the talk itself starts six minutes in]:

Welcome to the Jungle

In the twilight of Moore’s Law, the transitions to multicore processors, GPU computing, and HaaS cloud computing are not separate trends, but aspects of a single trend – mainstream computers from desktops to ‘smartphones’ are being permanently transformed into heterogeneous supercomputer clusters. Henceforth, a single compute-intensive application will need to harness different kinds of cores, in immense numbers, to get its job done. – The free lunch is over. Now welcome to the hardware jungle.

I hope you enjoy it.

Warning: It’s two hours (with Q&A) because of the broad and deep material. There’s a nice pause point between major sections at the one-hour mark that makes it convenient to split it into two one-hour lunchtime brownbag viewings.

Talk + panel online: “(Not Your Father’s) C++” + “Native Languages” Panel

imageLast week at the Lang.NEXT 2012 conference in Redmond, I gave a 40-minute C++ talk and participated on a native languages panel. Both are now online at Channel 9.

Here’s the 40-min C++ talk, taken from the C9 site:

(Not Your Father’s) C++
Herb Sutter 

What makes ISO C++11 "feel like a new language"? What things that we know about past C++ do we need to unlearn? Why is C++ designed the way it is – historically, and in C++11? Finally, what is the difference between managed and native languages anyway, and when is each applicable? This talk gives an overview and motivation of modern C++ and why it’s clean, safe, and fast – as clean to code in and as type-safe as any modern language, and more than ever the king of "fast."

And the panel (my favorite highlight is at 24:00-28:00):

Lang.NEXT 2012 Expert Panel: Native Languages
Walter Bright, Robert Griesemer, Andrei Alexandrescu, Herb Sutter

Native programming languages panel hosted by Martyn Lovell.

I hope you enjoy them.

We want await! A C# talk that’s applicable to C++

A nice talk by Mads Torgersen just went live on Channel 9 about C#’s non-blocking Task<T>.ContinueWith() library feature and await language feature, which are a big hit in C# (and Visual Basic) for writing highly concurrent code that looks pretty much just like sequential code. Mads is one of the designers of await.

If you’re a C++ programmer, you may be interested in this because I’ve worked to have these very features be offered as proposals for ISO C++, just with a few naming tweaks like renaming Task<T>.ContinueWith() to std::future<T>::then(). They were initially presented at the recent Kona meeting in February, and we’ll dig deeper next month at the special ISO C++ study group meeting on concurrency and parallelism.

Here’s the talk link and abstract:

Language Support for Asynchronous Programming

Mads Torgersen

Asynchronous programming is what the doctor usually orders for unresponsive client apps and for services with thread-scaling issues. This usually means a bleak departure from the imperative programming constructs we know and love into a spaghetti hell of callbacks and signups. C# and VB are putting an end to that, reinstating all your tried-and-true control structures on top of a future-based model of asynchrony.

While we were chatting after the talk, I managed to gently twist Mads’ arm and he has graciously agreed to come to the May 7-9 ISO C++ parallelism study group special meeting to present this to the committee members in detail and answer questions about await’s design and C# users’ experience with it in production code, which will help the committee decide whether or not this is something they want to pursue for ISO C++.

I hope you enjoy the talk. While at Lang.NEXT, I also participated in a panel and gave a C++ talk but those sessions aren’t live yet; I’ll post links once they are.

Trivia: If you noticed the Romanian accent in the first question from the audience, it’s because it came from Andrei Alexandrescu, who was sitting beside Walter Bright, both of whom were two of the other speakers at the conference. It was fun to be in a room full of language designers and implementers sharing notes about each other’s languages and experience.

Interview: C++–A Language for Modern Times

imageLast week I spent 30 minutes with interviewer Robert Hess to talk about the differences between managed and native languages, and why modern C++ is clean, safe, and fast – as “clean and safe” as any other modern language, and still the king of “fast.”

The interview just went live today on Channel 9. Here’s the blurb from the site:

C++: A Language for Modern Times

C++ has been around for what seems like forever. It might seem like it’s taken a back seat to languages that provide better application isolation and better development throughput, but in truth it remains one of the most widely used languages in the world. In order to gain some better insights on how C++ measures up in a "managed" world, I’ve invited Herb Sutter, Program Manager for Visual Studio, to explain how C++ has evolved and how it remains a great choice for many modern day development tasks.

I’ve said some of these things before, but it’s important to get the word out – modern C++11 is not your daddy’s C++, and as people return more and more to C++, we have some work still to do to help people unlearn some negative things that are no longer true (and in some cases never were true) about C++ as we know and use it today.

C++ and Beyond 2012: Aug 5-8, Asheville, NC, USA

imageFebruary and March have been killer busy, so that I forgot to repeat an important announcement here: registration is open for C++ and Beyond 2012! I’m looking forward to teaching for three days again with Scott Meyers and Andrei Alexandrescu at one of the top C++ conference highlights of the year.

This year, C&B will be held on August 5-8 in beautiful Asheville, North Carolina, USA. Registration is limited to 120 people, and now that I’m a month late in repeating this announcement I see that it’s already over 25% booked… seats are going faster than in either of the previous years, but fortunately there are still lots of spaces available as I write this.

This is becoming yet another big year for C++ in the industry, as C++ use and interest continues to surge and even the ISO C++ committee isn’t slowing down after delivering C++11 but is actually accelerating, ramping up work for the next round on concurrency/parallelism, networking, filesystem, and other short-term topics of interest as mentioned in my trip report. As usual, C++ and Beyond will feature the most important material you can use today and information about what to expect that’s coming down the pike short-term tomorrow.

Only two of the session descriptions have been posted so far, but they’re already deeply interesting and brand-new material never presented before – by us or by anyone, as far as I’m aware. Here they are…

1. “Universal References in C++11” (brand-new talk by Scott Meyers)

Scott’s first-announced talk on “Universal References in C++11” targets a key underpinning of two C++11 marquee features – move semantics and perfect forwarding. I’ve seen drafts of the material, and this is going to be a deeply illuminating talk that covers not only the “what” and “how” of thinking about and effectively using T&& declarations in C++, but also the “why” – the thinking behind the language rules that helps us to understand the reasons why this important C++11 feature was designed the way it is, and what other topics and techniques it affects.

2. “You Don’t Know [keyword] and [keyword]” (brand-new talk by Herb Sutter)

Yes, the title really is “You Don’t Know [keyword] and [keyword],” at least for now. Here’s the description I just posted:

I plan to give a brand-new talk for the first time at C&B, but I’m conflicted regarding what to say about it here because it’s recently been a bit of a startling realization to me about C++11, and I think it may be a bit startling for others too. I don’t want to be a tease, but I also want to save it as a surprise for C&B itself.

In the meantime, here’s a teaser…

In addition to the many new C++11 features that everyone’s listing, it has dawned on me over the winter that there’s actually another major change that isn’t being talked about anywhere, or even being listed as a change in C++11 at all as far as I know, because I and other key experts and committee members I’ve asked didn’t fully realize that we altered the basic meaning of not one but two fundamental keywords in C++. It’s a change that has profound consequences, that rewrites and/or invalidates several pieces of pre-C++11 design guidance, and that’s directly related to writing solid code in a concurrent and parallel world. This isn’t just an academic change, either – everyone is going to have to learn and apply the new C++11 guidance that we’ll cover in this session.

I plan to talk about it first at C&B, in a session tentatively titled as above – I’ll fill in the keywords later. You may already guess a few keyword candidates based on the description above, and here’s a final hint: You’ll hardly find two C++ keywords that are older, or whose meanings are more changed from C++98 to C++11. (No, they aren’t auto and register.)

I hope you can come, and I’m looking forward to seeing many of you in Asheville this summer.

“Welcome to the Jungle” in Kansas City – March 20, 2012

WelcomeThanks to Perceptive Software who are bringing me to Kansas City in two weeks to give a free talk on “Welcome to the Jungle.”

The talk will be based on my recent essay of the same name (sequel to ”The Free Lunch Is Over”) concerning the turn to mainstream heterogeneous distributed computing and the end of Moore’s Law, with ample time for Q&A and discussion.

Here are the coordinates:

Computing Trends with Herb Sutter: Welcome to the Jungle

When: Tuesday, March 20 at 1:00 – 3:00 P.M.

Where: Boulevard Brewery, 2501 Southwest Blvd, Kansas City, MO, USA 64108

Abstract: In the twilight of Moore’s Law, the transitions to multicore processors, GPU computing, and HaaS cloud computing are not separate trends, but aspects of a single trend – mainstream computers from desktops to ‘smartphones’ are being permanently transformed into heterogeneous supercomputer clusters. Henceforth, a single compute-intensive application will need to harness different kinds of cores, in immense numbers, to get its job done. – The free lunch is over. Now welcome to the hardware jungle.

This is a free lecture; all are invited, but you should register to make sure you’ll have a seat. Note that this talk is live only and is not being recorded or webcast.

I look forward to meeting many of you there in person.

My two //build/ talks online

//build/

My two talks from last week’s //build/ conference are online.

My personal favorite is Writing Modern C++ Code: How C++ Has Evolved Over the Years. The thesis is simple: Modern ISO Standard C++ code is clean, safe, and fast. C++ has got a bad rap over the years, partly earned, but that’s history. This talk is a “welcome to modern C++” for programmers who may never have seen C++ before, or are familiar only with older and more difficult C++.

If you’re already a modern C++ developer you may be thinking, “but I do most of those things already, why is there a whole talk on this at a Microsoft conference?” Because as interest and use of Standard C++ is heating up again, it’s important to ensure that people have a good experience as they return to C++, or turn to it for the first time. Thus we sometimes have called this the “happy path” talk — designed to show the simple happy path through modern C++ that avoids needless pitfalls.

My other talk was Using the Windows Runtime From C++. This is Windows 8-specific and talks about the “foreign object model” language extensions used by Visual C++ 11 to talk to the new native ABI-safe WinRT types. These extensions should be used sparingly, only on the thin module boundaries around otherwise nice and portable Standard C++ code, and it was necessary to add them only because Standard C++ types aren’t ABI-safe and accessible safely from other languages. (If ISO C++ were to get a module system at some point that includes being able to talk about ABI-safe types on module boundaries, that would be happiness indeed!) There is also a template library called Windows Runtime C++ Template Library (WRL) that is another way to access basically the same functionality using template syntax; pick whichever you like best.

Thanks to all who attended!

C9 interview with Scott Meyers, Andrei Alexandrescu, and me

Scott Andrei Herb at C&B 2011
Scott Andrei & Herb at C&B 2011

After the end of the C++ and Beyond event earlier this month, Charles Torre interviewed all three of us for Channel 9.

I thought it came out really well, and stayed firmly focused on C++ — including even during the parts we talked about D and other languages, where the focus was on how their best parts could be applied to C++.

Charles also taped more of the seminar, including the panels and my opening ‘keynote-y’ talk about the what’s and why’s of the C++ Renaissance. Some of those will also appear on C9 over time; I’ll blog about them as they go up.

Some highlights of this particular interview:

[00:00] Event debriefing

[01:38] Scott on C++ developers

[03:18] Modern C++

[04:17] Why D, Andrei? And what from D could and should be brought into C++?

[17:25] What problems does D solve that C++ can’t?

[22:03] C++ and D interoperability (COM is old, but COM is good)!

[24:22] C++11 and Beyond

[26:01] Herb, ISO C++ Committee’s next phase – what are you going to do? [note: see also more details in my trip report for the standards meeting held the following week]

[28:22] Scott, Andrei and Herb share perspectives on the ISO standards process, philosophies of language design, what C++ gets wrong, what it gets right

[49:48] Perspectives on this year’s event and if/when C++ and Beyond will happen again