CppCon Program Highlights, 1 of N

The CppCon 2014 conference program has been posted for the upcoming September conference. We previously posted part of the CppCon program in six program preview blog posts, each containing a few session titles and abstracts. Several people have expressed that they prefer being able to absorb the program in this way as "bite-sized" blog posts, so we're going to continue posting a few additional sessions at a time this way, sometimes with commentary, until the entire conference program has been posted also via this blog series.

Note: Early Bird registration ends tomorrow.

 

Multi-device development across iOS, Android, Mac, Windows, and other platforms is increasingly in demand, and C++ is the only modern language supported on all of those platforms. We find many developers are still unaware of how C++ is being quietly adopted across major companies as the language of choice for sharing code to develop their cross-platform apps -- even in apps originally written in other platform-specific languages. In these talks, the CppCon program covers development in this exciting modern area, and we think you'll see that the speakers are Those Who Know and Those Who Do in some of the leading efforts in our industry.

In this post:

  • Practical Cross-Platform Mobile C++ Development at Dropbox
  • From the Dropbox Trenches: A Deep Dive into Two Cross-Platform Mobile Apps Written in C++
  • UI Prototyping and Development for Multiple Devices in C++
  • Multiplatform C++

Practical Cross-Platform Mobile C++ Development at Dropbox

The conventional wisdom of multi-platform mobile development comes down to two choices: write all your complex logic at least twice or settle for a slow, non-native experience for your users. Come learn how Dropbox has embraced a third option, where fast, cross-platform code in C++ is married to a smooth, native UI for the best of both worlds.

In Dropbox’s new generation of iOS and Android apps, we leverage the strengths of the platform frameworks while only writing and maintaining one version of complex logic like data syncing. We’ll explain the benefits and pitfalls of interfacing C++ to platform-specific code via Objective-C++ and JNI and how code generation has freed us from much of the effort involved. We’ll share the benefits we’ve gained from C++11/14, as well as the drawbacks, and how we’ve overcome each platform’s quirks. Finally, we’ll share tools that let you try this out yourselves.

Speakers:

  • Alex Allain, Platforms and Libraries Lead, Dropbox. Alex has been writing about C++ since 1998, when he started Cprogramming.com. In 2012, he published Jumping into C++ to teach new programmers how to think like a professional C++ programmer. At Dropbox, Alex leads the Platforms and Libraries team, helping make the dream of cross-platform C++11 a reality. Prior to Dropbox, Alex led a team at Liquid Machines focused on injecting code into applications to perform binary hooking.
  • Andrew Twyman, Software Engineer, Dropbox. Andrew Twyman has been developing products and libraries in C++ for almost 10 years. He loves building robust systems and solving tricky low-level problems. Starting in 2012, Andrew helped spearhead Dropbox’s new approach to cross-platform mobile development. Now on the Platforms and Libraries team, Andrew is helping bring cross-platform goodness to Dropbox’s new generation of mobile and desktop apps. Prior to Dropbox, Andrew was an architect at Liquid Machines, where shared libraries supported parallel development of more products than there were developers.

 

From the Dropbox Trenches: A Deep Dive into Two Cross-Platform Mobile Apps Written in C++

At Dropbox we’ve spent the last year and a half building two cross platform mobile apps: the email client, Mailbox, and the photo gallery, Carousel. We started with the goal of a native look and feel with seamless performance but also needed to leverage a small team to build these apps on multiple platforms. We ultimately accomplished this by using C++ to share significant amounts of code in each app.

We’ll cover what portions of our apps we built in C++ and why we left some portions in the platform languages of Java and Objective-C, deep diving into some of the most important components. We’ll also discuss some unexpected benefits, areas we faced technical and human challenges, and some tips and tricks that you can use to leverage C++ to build very high performance apps.

Speakers:

  • Tony Grue, Engineering Manager, Dropbox. Tony has been building mobile applications, mostly in C++, for the last 8 years.  He worked on Dropbox for Android as it grew from a few million to more than 100 million installs. Now he leads the Carousel for Android and lib-carousel teams at Dropbox. Before Dropbox, Tony was at Microsoft where he contributed to the email, SMS, and visual search clients on Windows Phone.
  • Steven Kabbes, Mobile Engineer, Dropbox. Steven was a member of the founding team of Mailbox and designed many of the core email sync algorithms that power it. Since then he has been working on cross platform mobile building the C++ layer of Mailbox which powers clients on iOS, Android and Mac. Steven is especially passionate about developer libraries, specifically ones that enable fast iteration on the next generation of products. https://avatars3.githubusercontent.com/u/592178

 

UI Prototyping and Development for Multiple Devices in C++

Using C++ for multi-device user interface and app development should be pretty straightforward. However, since the Standard C++ Language and Library specification does not specify a user interface library, it’s actually quite challenging given that the two leading mobile platforms provide non-C++ User Interface APIs. Even more challenging is the new world of mobile devices and the myriad form factors, layouts, resolutions, sensors, and services that an application developer has to deal with. Plus, the deployment model for remote devices makes testing UI changes slower due to the increased build and turnaround time. This session will describe how C++ can be used effectively for multi-device UI development and also deliver a rapid prototyping experience to minimize the deployment time to the device for testing.

Speaker: John "JT" Thomas, Director of Product Management at Embarcadero Technologies. JT has more than 15 years of product management and product development experience including hands-on experience with the early versions of Delphi and C++Builder at Borland Software. Previously, JT held product management positions at mobile Linux vendor MontaVista Software and at Research in Motion. He earned his Computer Science degree from University of California, Santa Cruz and his MBA and MSE from San Jose State University.Website: http://www.embarcadero.comTwitter handle: @FireMonkeyPM

 

Multiplatform C++

C++ is a multiplatform language, yet many difficulties arise when you want the same code to compile properly and function identically on different platforms. If you put aside the obvious system programming related obstacles, and the differences you might have between compilers (especially when it comes to supporting C++11 and C++14), you come to the surprising conclusion that what is truly hard is all the "little things" you didn't anticipate.

This talk will be about our experience with our own software, quasardb, that runs every day on three OS (FreeBSD, Linux and Windows), is built with three compilers (clang, gcc and msvc) and supports two architectures (IA32 and AMD64).

How to build natively the same software on Windows and Linux, provided that they have radically different tool chains? How to work around the subtle, but existing differences between Linux and FreeBSD? How do you solve cross-tools, cross-platform file editing problems? How to prevent your maintenance costs from increasing dramatically?

Speaker: Edouard Alligand, Chairman & CTO, Bureau 14. Edouard has more than thirteen years of professional experience in software engineering. After years hacking the kernel of various operating systems, Edouard founded Bureau 14, the home of the hyperscalable database quasardb. Combining an excellent knowledge of low level programming with a perverse love for template meta-programming, Edouard likes to come up with uncompromising solutions to seemingly impossible problems. He lives in Paris, France. Website: https://blogea.bureau14.fr/ http://twitter.com/edouarda14

 

N4110: Exploring the design space of contract specifications for C++ -- J. Daniel Garcia

A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4110

Date: 2014-07-06

Exploring the design space of contract specifications for C++

by J. Daniel Garcia

Excerpt:

This paper explores the design space for introducing contracts as part of the interface of functions and types. The goal is to address the problem of specifying an interface (with special attention to standard library interfaces) making a clear distinction between a contract violation and an explicitly thrown exception. Preconditions and postconditions are attached to function declarations (i.e. to interfaces) rather than to de nitions, and are, in principle, checked before and after a function's de nition is entered. No macros are needed.

N4121: Compile-Time String: std::string_literal<n> -- Andrew Tomazos

A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4121

Date: 2014-07-04

Compile-Time String: std::string_literal<n>

by Andrew Tomazos

Excerpt:

We propose the addition of a class template std::string_literal<n> to the LFTS (and eventually merged into the Strings Standard Library) for the purposes of working with text at compiletime.

The proposed template is a pure library helper class and does not require core language changes or compiler support.

This proposal is depended upon and is blocking N3815 > N4027 > N4113 (Reflection Type Traits) from SG7, which needs to produce compiletime text for reflection of entity names.

N4095-97: File System TS Issues Lists -- Beman Dawes

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document numbers: N4095-97

Date: 2014-07-05

File System TS Active Issues List (Revision R2)

File System TS Closed Issues List (Revision R2)

File System TS Defect Report List (Revision R2)

by Beman Dawes

4098-99: File System TS Working Draft and Editor's Report -- Beman Dawes

New WG21 papers are available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4098-99

Date: 2014-07-05

File System TS Editor's Report, Post-Rapperswil

Working Draft, Technical Specification — File System

by Beman Dawes

Excerpt:

N4099 is the latest File System TS Working Draft. It contains the changes to the File System TS working paper as directed by the committee at the Rapperswil meeting. It also contains editorial changes not requiring committee approval. Details of the changes are listed below.

N4074: Let return{expr} Be Explicit, Revision 2 -- Herb Sutter

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4074

Date: 2014-07-02

Let return{expr} Be Explicit, Revision 2

by Herb Sutter

Excerpt:

This paper is a followup to N4029 to follow EWG preference for a variation on that proposal, namely allowing explicit constructors to be called by the syntax return {expr};, with the same semantics as initializing a local variable using return_type var{expr};. This addresses EWG issue #114.

Thanks to Richard Smith for his assistance with the proposed wording. Thanks to Peter Dimov, Gabriel Dos Reis, Howard Hinnant, Stephan T. Lavavej, Mike Miller, Bjarne Stroustrup, Ville Voutilainen, Jona-than Wakely and all others who provided comments on this topic and/or drafts of this paper.

Trip Report: Summer ISO C++ meeting

hsr-aerial.pngThe summer 2014 WG21 (ISO C++) meeting was held in Rapperswil, Switzerland on June 16-21. Many thanks to HSR Hochschule für Technik Rapperswil for hosting us!

The meeting proceeded pretty much as usual, but because the final (we hope) approval ballot for C++14 itself is still in progress until August 15, in accordance with ISO rules we didn’t formally approve any edits to the C++ working paper. At the next meeting we expect to approve the work of this meeting and next meeting in one batch to kick off the road to C++17.

We also made good progress on most of the eight (8) Technical Specifications in flight; see the current ISO C++ status page for the list. Here are some highlights.

First, we sent three documents out for ballot. This is the first time in ISO C++ history that we have sent three documents out for ballot out of a single meeting.

  • File System TS progresses to its final ballot (DTS): We finished addressing the international review comments on the File System comment ballot (aka PDTS), so we now have what should be the final text of the TS. In the next week or two I’ll send that out for its final ballot, and barring surprises we expect the TS to be published this year. Thanks very much to project editor Beman Dawes and the many participants and international reviewers who made this a high quality document!
  • Parallelism TS progresses to its main comment ballot (PDTS): This is the "Parallel STL" TS that adds parallel and vector lane execution to STL algorithms.
  • Library Fundamentals TS progresses to its main comment ballot (PDTS): We approved adding several features to the Library Fundamentals TS, notably the generalized negator not_fun and fixes for optional<T>. With this, the feature set of “version 1” of the TS is now complete and so it’s going out for its main international review ballot. (But wait, there’s more; see below.)

But we did other things too:

  • Library Fundamentals TS “version 2” kicked off: We also approved adding the first items for “version 2” of the Library Fundamentals TS. If you’re wondering how we can do that while version 1 is still in progress, the way to think of this is that we’ve now “finished loading the train” for the feature set of Library Fundamentals TS version 1, and we now will get a round of international comments to fine-tune those features and tighten down the load so the train can start moving out of the station. But while that’s happening, over on the next track we’ve also pulled up another set of empty cars and “started loading the next train” by also approving the creation of the first working paper for the next Library Fundamentals TS, “version 2,” and voting the first items into that. If this were software, we’d call it pipelining – same pattern.
  • Networking TS ‘rebooted’: This TS took a big step forward. In recent meetings, the focus of the work had been very small – basically just network byte order conversion, IP addresses, and URIs. At this meeting, the Library Evolution group decided that they would like to make a big bet here and not just take small things piecemeal, but adopt a large and complete proposal based on Boost.ASIO as a starting point. We expect to see an updated version of the ASIO proposal at the next meeting, and hopefully be able to adopt it as our working paper there.
  • Concurrency TS: The executors proposal has been improving with work between meetings, but still does not quite have consensus. So at this meeting we have removed executors from the Concurrency TS so that this doesn’t stand in the way of progressing the core parts that do have consensus. It’s possible that executors may be reintroduced before version 1 of the TS, but we’ll see. It’s possible that this TS may be ready for its main international comment ballot (PDTS) after the next meeting, but again we’ll have to see.
  • Concepts TS: This got a very thorough wording review by the Core language working group, and we expect it to be in great shape for sending out for PDTS (comment) ballot after our next meeting this fall.

There’s more, but those are some highlights.

In my previous trip report, I wrote:

WG21 has now shipped out documents for ballot in the last three consecutive ISO C++ meetings, and the plan is for this to continue. We have been filling up our pipeline, and now we’re seeing work come out the other end at a brisk pace.

After the long and “working relatively invisibly” period of C++0x, it’s very interesting to see ISO C++ now in a mode where “shipping something out for ISO ballot” is becoming the normal outcome of every meeting. Thanks again to all the volunteers who make it possible! And stay tuned for more to come throughout this year…

This time, again, we sent out not one but three documents for ballot. Quite a meeting.

Thanks, again, to everyone who worked so hard to make this happen.

N4080: File System TS Immediate Issues for Rapperswil -- Beman Dawes

This paper was approved at the June ISO C++ meeting.

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4080

Date: 2014-06-20

File System TS Immediate Issues for Rapperswil

by Beman Dawes

N4079: C++ Standard Library Issues Resolved Directly In Rapperswil, 2014 -- Alisdair Meredith

This paper was approved at the June ISO C++ meeting for the Library Fundamentals TS.

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4079

Date: 2014-06-20

C++ Standard Library Issues Resolved Directly In Rapperswil, 2014

by Alisdair Meredith

N4078: Fixes for optional objects -- Fernando Cacciola, Andrzej KrzemieĊ„ski, Ville Voutilainen

This paper was approved at the June ISO C++ meeting for the Library Fundamentals TS.

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4078

Date: 2014-06-20

Fixes for optional objects

by Fernando Cacciola, Andrzej Krzemieński, Ville Voutilainen

Excerpt:

This document proposes a number of wording fixes, as suggested in Issaquah meeting, to optional objects proposed in N3793. In addition, this document includes the feature additions from N3982 and the review feedback from the LWG sessions in the Rapperswil 2014 meeting.