Bitesize Modern C++ : Range-for loops--Glennan Carnie

Today is a description of a C++11 new feature:

Bitesize Modern C++ : Range-for loops

by Glennan Carnie

From the article:

If you’re using container classes in your C++ code (and you probably should be, even if it’s just std::array) then one of the things you’re going to want to do (a lot) is iterate through the container accessing each member in turn.

Without resorting to STL algorithms we could use a for-loop to iterate through the container...

CppCon 2015 Call for Lightning Talks

cppcon-024.PNGCppCon 2015 is the largest community gathering for the breadth and depth of modern C++. If you haven't registered yet, now's a great time.

It's not just about listening to the over 100 talks by speakers who are world experts in their fields -- it's also about the interaction between attendees. Here's another part of that, in today's news:

CppCon 2015 Call for Lightning Talks

From the announcement:

The response to last year’s Call for Lightning Talks was so strong that this year we are adding a second evening session, so plan on joining us for the fun on Tuesday and Wednesday evenings.

Lightning talks are 5 or 15 minutes talks on any topic that will be interesting to C++ programmers. Expect fast paced fun with talks that are funny or intriguing from speakers at all experience levels.

If you’ve never seen a lightning talk before checkout some of last year’s on our YouTube channel. They cover a single topic and they start with the good stuff and make a point. Anyone can do one, but be sure to practice because 5 minutes goes by incredibly fast and 15 minutes isn’t much easier. If there’s one technique you wish everyone knew, one little known fact that should be well known, one tool that makes your life easier every day, or a collection of little things that you can fit into 5 or 15 minutes, you can propose a lighting talk, and you should.

Anyone can submit a talk, you don’t need to be a conference speaker (or even a registered attendee). We are looking for talks from experienced speakers, but also new speakers and students. To submit a talk, just email open-content@cppcon.org and tell us what you want to talk about, what length you need (5 or 15 minutes), and a little bit about yourself (one sentence is fine). Even if you don’t plan to submit, plan to attend, it’s sure to be fun!

CppCon 2015 Program Highlights, 7 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

One of C++ selling point is the performance it allows, while still offering a good hardware abstraction. It enables not only fast programs, it enables efficient ones.

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Faster Complex Numbers
  • C++ Coroutines - a negative overhead abstractions
  • High-performance, async-only and monadic future<T>
  • constexpr: Introduction and Applications
  • The Birth of SG14: better C++ support for Games Developers with Low latency needs

 

Faster Complex Numbers by André Bergner, Lead Developer Traktor, Native Instruments

Complex numbers are an important tool from mathematics enabling many problems to be written in a more generic form. The C++ standard library comes with an implementation to work with complex numbers in a natural way.

Motivated by useful real world examples from theoretical physics and audio dsp I will discuss benchmarks of std::complex and demonstrate how alternative implementations, naïve or advanced ones based on expression templates, outperform std::complex and can compete with hand-crafted C code (depending on compiler and std lib). A quick introduction to expression templates will be provided.


C++ Coroutines - a negative overhead abstractions by Gor Nishanov, Principal Software Design Engineer, Microsoft

C++ coroutines are one of the few major features that may land in C++17. We will look at the current standardization status, available experimental implementations and develop a small coroutine adapter over raw C networking APIs that will beat hand-crafted state machine in performance.


High-performance, async-only and monadic future<T> by Travis Gockel, Senior C++ Pirate, SolidFire

std::future provides us a mechanism for asynchronous communication between a provider and receiver. However, the C++14 standard does not allow for actual asynchronous programming, as the only ways to interact with an std::future are blocking calls. The proposed then helps, but the interface is awkward and can be extremely slow when handling exceptions. Here, I will talk about completion a high-performance, async-only and monadic alternative to std::future and how it is used at SolidFire.


constexpr: Introduction and Applications by Scott Schurr, C++ Developer, Ripple Labs

I'm excited about constexpr. It's probably my favorite C++11 feature and it's gotten even better with C++14. This talk will introduce constexpr to the uninitiated. We'll start with C++11 and continue into the improvements introduced with C++14. We'll look into useful ways to think about constexpr code. We'll also cover some tips and tricks with writing constexpr code.

But when I talk to other developers about constexpr they seem puzzled. What sorts of useful computations can the compiler possibly do before runtime?

I'd like to take this session to explore some of the capabilities that constexpr brings to the table. We'll look at compile-time parsing, floating-point computations, and containers. We'll also talk about motivations for computing these at compile time.


The Birth of SG14: better C++ support for Games Developers with Low latency needs by Nicolas Guillemot (Graphics Software Engineer, Intel), Sean Middleditch (Lead Server Engineer, Wargaming Seattle, Inc.) and Michael Wong

C++ is paramount for games development, and low-latency real-time applications everywhere. But has it recall improved since C++98/03? What features in C++ 11/14 has helped, and what else do we still need from C++ 17/22? In last year's CPPCon, there was clearly demand for even better support for this community as evidenced by the large number of games submission and an impromptu BoF.

But this industry has a demanding schedule and cannot freely attend ISO C++ standard meetings. So when the prophet cannot go to the mountain, the mountain has decided to come to the prophet!

This year, we like to announce the formation of an official SG14 that will go where the community is, at CppCon 2015 will be an official SG14 meeting followed by an SG14 meeting at GDC 2015 hosted by Sony.

This talk will describe the initial findings of the unofficial real time google group https://groups.google.com/forum/#!forum/unofficial-real-time-cxx as described in: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4526.pdf where we considered improvements such as flat map, intrusive container, and other suggestions for better support for games development and low latency in ISO C++.

KDAB starts the C++ roadshow across the US in September

KDAB offers his current C++11/14 course, a two day training for just $499:

C++ US Roadshow

by KDAB

Details:

In September, well-known software trainers KDAB, will visit Boston, Chicago, Austin and the Bay Area with a 2 day training class designed for seasoned C++ users on “What’s new in C++11 and C++14?” for just $499 per person.

What’s in it for me?

The importance of C++11/C++14 in the C++ ecosystem is growing fast and inevitably will become the version most used before long. Every professional developer should invest in learning it and introducing its benefits into projects...

CppCon 2015 Program Highlights, 6 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

Programming is not all about creating softwares. It is also important to verify that the program works as expected. Tests are used for that.

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Test Driven C++ With Catch
  • Your Tests Are Terrible: Tales from the Trenches
  • Testing Battle.net (before deploying to millions of players)
  • Advanced Unit Testing in C++
  • The current memory and C++ debugging tools used at Electronic Arts

 

Test Driven C++ With Catch by Phil Nash

C++ has been notorious for being a second class citizen when it comes to test frameworks. There are plenty of them but they tend to be fiddly to set-up and ceremonious to use. Many of them attempt to follow the xUnit template without respect for the language environment they are written for. Catch is an attempt to cut through all of that. It is simple to get and simple to use - being distributed in a single header file - yet is powerful and flexible. Catch includes a number of innovations that make testing in C++ more natural - and fun - than ever before. This presentation introduces you to the unique approach that Catch brings to unit and integration testing - and how to use Catch to drive your design with TDD or BDD.


Your Tests Are Terrible: Tales from the Trenches by Titus Winters, Software Engineer, Google

Thousands of Google engineers have collectively written about 100,000 separate C++ test binaries in the last 15 years. Not all of those was a perfect test. In this talk we’ll focus on how to write good tests and adopt a good testing philosophy, with lots of examples of what not to do (and why).


Testing Battle.net (before deploying to millions of players) by Ben Deane, Principal Software Engineer, Blizzard Entertainment

Battle.net is the online service that runs Blizzard's games. As such, it is a large scale distributed system with many interacting parts and dependencies on various services and data. While developing Battle.net servers, I needed a way to isolate and test functionality that I was working on.

In this talk I will cover my experience designing for testability of components in a distributed system, and practical ways to structure classes and data to facilitate testing. I will also present my solution to the problem of testing my code for correctness, performance and scalability without having to deploy a full-scale environment and spin up a million clients.

 

Advanced Unit Testing in C++ by Matt Hargett 

This session goes in-depth into advanced techniques to isolate and unit test C++ classes, especially those in legacy code that isn't easy to change. This builds on the Pragmatic Unit Testing in C++ talk from last year, with live code examples of safe refactorings, injecting mock objects, and potential pitfalls across different platforms and toolchains.

 

The current memory and C++ debugging tools used at Electronic Arts by Scott Wardle, Senior Software Engineer, EA

Scott Wardle a senior software engineer Electronic Arts will talk about the current memory and C++ debugging setup and tools used in games.

PS4 and Xbox One have virtual memory and 64 bit address spaces, GPU and CPU are getting closer in the ability to work virtual memory. So our tools are getting better and better and closer to PCs. Most of a games memory goes towards art and level data like bitmap textures and polygon meshes. So artist and designer need to understand how much their data takes up. Giving them call stacks of memory allocations does not help. They want to know how big is a group of building is. Why is this group of building bigger than this one? Maybe this one has some animation data or one of the textures is too big. But there are 10,000s of objects built by 100s of people all around the world.

Integrating an HTML Editor into Qt using Javascript and QWebView

Part 8 of my series about writing applications in C++ using Qt and boost:

Integrating an HTML Editor into Qt using Javascript and QWebView

by Jens Weller

From the article:

This time its about integrating an HTML Editor into Qt using QWebView and Javascript! I'll start with text editors in general, and then continue to the integration, based on QWebkit and TinyMCE3. The end result is a little bit of hackery, but it is a working solution...

CppCon 2015 Call For Open Content -- Jon Kalb

cppcon-026.PNGCppCon isn't just a lecture-based conference, it's an interactive cultural event. Here's an important aspect of CppCon, open to the public:

CppCon 2015 Call For Open Content

by Jon Kalb

From the announcement:

This year CppCon is increasing the number of Open Content sessions. In addition to the early morning and evening sessions offered last year, we’ll also be offering Open Content session over the lunch break.

Open Content is just that, open! Attendees and regular program speakers alike can propose sessions on anything that interests them. These might feature a single facilitator leading a room through an exercise, activity or demo, a panel of 3-5 people taking questions from the room, a “hackathon” on a specific project, or an open conversation among the whole room. The projector is available for slides or note taking.

Open Content is designed for flexibility so that a “Birds of a Feather” talk may be proposed even after the conference has begun. A speaker who gets a lot of post-talk questions may agree to host a Q&A session in the Open Content time. An attendee inspired by a session may host a session to explore a topic further or start on a group implementation of something.

To propose a session, simply email open-content@cppcon.org and tell us the title, description, and speaker(s)/moderators(s). If you have time constraints such as “after a specific session” or “not on the same day as a specific session” let us know in the email. (For example, someone who will be grilled at Grill The Committee on Monday can’t do an open session Monday evening.)

These sessions will be open in another way too -- Open Content does not require conference registration. That’s right, everyone who is in the area is welcome to come and join us for all the evening/lunch sessions, including proposing or leading a session. This is part of our goal to be an inclusive conference for the entire C++ community.

For now, please email your submissions as soon as you can so that our planning work can get underway. See you in Bellevue!

CppCon 2015 Program Highlights, 5 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

The C++ language would be far less useful without its tools. The good compilers, the dependancy managers,...

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Cross-Platform Mobile App Development with Visual C++ 2015
  • Doxygen to DoxyPress : A Journey from C++98 to C++11
  • Beyond Sanitizers
  • What's New in Visual C++ 2015 and Future Directions
  • CLANG + C2 - Engineering/Futures/Measurements

 

Cross-Platform Mobile App Development with Visual C++ 2015 by Marc Gregoire, Software Architect, Nikon Metrology

Visual C++ 2015 supports the development of apps for the Windows platform as well as for Android and iOS. A single code base, possibly with a thin platform-specific UI layer, can be compiled to run on Windows, Android, and iOS. The resulting binary can be published to a device and debugged, all from within Visual C++ 2015. This presentation introduces you to such cross-platform mobile app development, including debugging and emulation, and includes a number of demos.


Doxygen to DoxyPress : A Journey from C++98 to C++11 by Barbara Geller and Ansel Sermersheim, Co-Founders, CopperSpice

This presentation will discuss the benefits of using a documentation generator for creating internal code documentation or end user documentation.  DoxyPress can be used to document your source code, generate API documentation, show class hierarchies, collaboration diagrams, and much more. DoxyPress supports several output formats including html, chm, latex, and man pages.

As part of our talk we will cover the process of redesigning source code originally designed for C++98 and how to migrate it to C++11. We will talk about the advantages and drawbacks of moving to C++11 and show how the code changed in DoxyPress.

We will show a small demonstration of DoxyPressApp, which is a a GUI program used to set up your project file which is then used by DoxyPress to generate documentation.

DoxyPress is a fork of the Doxygen documentation tool. A very basic understanding of C++ will be helpful. No prior knowledge of DoxyPress or Doxygen is required.


Beyond Sanitizers by Kostya Serebryany, Software Engineer, Google

At CppCon’2014 we presented the Sanitizers, a family of dynamic testing tools for C++. These tools allow you to find many stability and security bugs in C++ code, but they are only as good as your tests are. In this talk we will show how to improve your tests with guided fuzzing and how to protect your applications in production even if some bugs were not found. Fuzzing, or fuzz testing, is a surprisingly effective technique that allows you to discover new interesting test inputs. Coverage-guided fuzzing uses coverage-like code instrumentation to make fuzzing orders of magnitude more efficient. Taint-guided fuzzing goes even further by using taint tracking techniques. The next line of defense may be incorporated directly into production: the Control Flow Integrity instrumentation allows you to protect your program from corrupted function pointers (including pointers to virtual tables) and separating stack variables from the call stack protects from corrupted return addresses -- both with near-zero overhead. We will concentrate on particular tools implemented in the opensource LLVM toolchain (libFuzzer, DataFlowSanitizer, -fsanitize=cfi,safe_stack), but will also discuss several alternatives.


What's New in Visual C++ 2015 and Future Directions by Steve Carroll and Ayman Shoukry

In this talk, we'll discuss new features, optimizations, and scenarios in Visual Studio 2015. We'll cover new backend optimizations, improved build throughput, new productivity and diagnostics features, and give a detailed update on our conformance progress, as well as talk about cool new c++1y features that we are shipping from await to modules.

Visual Studio isn't just for Microsoft platform developers. We'll also demonstrate our latest cross platform C++ development features for Android and iOS. We'll also give a sneak peak at our work on combining the Clang frontend with our existing backend to bring Clang support for Windows to Visual Studio.


CLANG + C2 - Engineering/Futures/Measurements by James Radigan

The talk will cover the CLANG + c2.dll compiler for the Microsoft platform. It will contain parts of the talk given at //Build 2015 that can be found on line: "Compiling Objective-C Using the Visual Studio 2015 C++ Code Generation that Builds Windows, SQL, .Net, and Office". The focus this time will be on C++.

The talk will disclose the architecture of how we tied the CLANG open source front end with the Microsoft optimizing backends (several configurations are needed) and how far we are from providing a CTP for public consumption targeting 4 different architectures. Included in this section will be a disclosure of data on compile time, memory consumption, conformance and correctness.

In addition the talk will cover the nuts and bolts of several key innovative compiler and runtime technologies we will be delivering in the Visual Studio 2015 updates (Fall, Winter and Spring). New investments in the compiler and runtime space include: Improved optimization and auto-vectorization, more secure code generation, incremental whole program compilation, and new asynchronous C++ code generation.