Events

CppCon 2015 Program Highlights, 13 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 current processors have many cores. To use them well and safely for concurrent programming is not always easy.

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

In this post:

  • Racing the file system
  • Transactional Memory in Practice
  • Single Threaded Functional to Massively Parellel Stochastic with AMP
  • How to make your data structures wait-free for reads
  • Parallel Program Execution using Work Stealing
  • Executors for C++ - A Long Story

 

Racing the file system by Niall Douglas, Consultant for Hire, ned Productions Ltd

Almost every programmer knows about and fears race conditions on memory where one strand of execution may concurrently update data in use by another strand of execution, leading to an inconsistent and usually dangerous inconsistent read of program state. Almost every programmer therefore is aware of mutexes, memory ordering, semaphores and the other techniques used to serialise access to memory.

Interestingly, most programmers are but vaguely aware of potential race conditions on the filing system, and as a result write code which assumes that the filing system does not suddenly change out from underneath you when you are working on it. This assumption of a static filing system introduces many potential security bugs never mind ways of crashing your program, and of course creating data loss and corruption.

This workshop will cover some of the ways in which filing system races can confound, and what portable idioms and patterns you should employ to prevent misoperation, even across networked Samba shares. Finally, an introduction of the proposed Boost library AFIO will be made which can help application developers writing filing system race free code portably.


Transactional Memory in Practice by Brett Hall, Principal Software Engineer, Wyatt Technology

Transactional memory has been held up as a panacea for concurrent programming in some quarters. The C++ standardization committee is even looking at including it in the standard. But is it really a panacea? Has anyone used it in a shipping piece of software? There are scattered examples, mostly from the high-performance and super-computing realms. On the other end of the spectrum, at Wyatt Technology we've been using transactional memory in a desktop application that does data acquisition and analysis for the light-scattering instruments we build. That application is called Dynamics and we've been using a software transactional memory system in it for four years now. This talk will detail how our system works, how well it worked, and what pitfalls we've run into. Prior experience with transactional memory will not be assumed, though it would help if you have experience programming threads with locks and an open mind about alternatives and why we're looking for them.


Single Threaded Functional to Massively Parellel Stochastic with AMP by Kevin Carpenter, Software Engineer, Carpenter Systems LLC

Come with us as we take a legacy MFC financial modelling application that is largely function in design and transform it to something new. We will take a portion of this large financial simulation application and change its single threaded ways into parallel processing stochastic model. Transforming single class’s with a hodge-podge of functions into an object oriented parallel design using c++ amp and implementing Stochastic modelling methodology. Aside from focusing on the key portions of converting functional single threaded code to a parallel design we will also touch on some of the details of financial modeling for interest rate risk.


How to make your data structures wait-free for reads by Pedro Ramalhete, Cisco

In this talk we will describe a new concurrency control algorithm with Blocking write operations and Wait-Free Population Oblivious read operations, which we named the Left-Right algorithm.

We will show a new pattern where this algorithm is applied, which requires using two instances of a given resource, and can be used for any data structure, allowing concurrent access to it similarly to a Reader-Writer lock, but in a non-blocking manner for reads, including safe memory management without needing a Garbage Collector.


Parallel Program Execution using Work Stealing by Pablo Halpern, Mr, Intel Corp.

If you've used a C++ parallel-programming system in the last decade, you've probably run across the term "work stealing." Work stealing is a scheduling strategy that automatically balances a parallel workload among available CPUs in a multi-core computer, using computation resources with theoretical utilization that is nearly optimal. Modern C++ parallel template libraries such as Intel(R)'s TBB or Microsoft*'s PPL and language extensions such as Intel(R) Cilk(tm) Plus or OpenMP tasks are implemented using work-stealing runtime libraries.

Most C++ programmers pride themselves on understanding how their programs execute on the underlying machine. Yet, when it comes to parallel programming, many programmers mistakenly believe that if you understand threads, then you understand parallel runtime libraries. In this talk, we'll investigate how work-stealing applies to the semantics of a parallel C++ program. We'll look at the theoretical underpinnings of work-stealing, now it achieves near optimal machine utilization, and a bit about how it's implemented. In the process, we'll discover some pit-falls and how to avoid them. You should leave this talk with a deeper appreciation of how parallel software runs on real systems.

Previous experience with parallel programming is helpful but not required. A medium level of expertise in C++ is assumed.


Executors for C++ - A Long Story by Detlef Vollmann

Executors will be a base building block in C++ for asynchronous, concurrent and parallel work. The job of an executor is simple: run the tasks that are posted. So the first proposals for executors in C++ had a very simple interface. However, being a building block, the executor should provide an interface that's useful for all kind of higher level abstractions and needs to work together with different types of concurrency, like co-operative multi-tasking or GPU like hardware. This presentation will look at the evolution of the executor proposals for C++ and what they'll provide for normal application programmers.

CoderPower exclusive C++ Back to School Challenge

Summer is almost over, meaning it’s time to return to reality. To help you reconnect with coding and open a new season of series, CoderPower offers an exclusive opportunity to discover the innovative interface of the new HP all-in-one computer, the HP Sprout.

Untill Oct. 26th, you can get to know the Sprout SDK in an environment that will show you, step-by-step, how easy and fun coding on Sprout really is. 

Your mission: follow the three warm-ups made by the @CoderPower team, that will teach you how to return the SDK version number and to use the monitor GUID as well as the touch mat. Do the complementary exercises and level up your skills! Write, copy and paste your code in the panel on the right side of the screen. The technology is all along simulated by a mocking system that send you back an answer. If it is the correct one, well done! If not, use your super-coder abilities to spot your mistake and try again!

Then enter the weekly challenges, for examples: “Show the mat keyboard” or “Extract Outline”. For starters, 2 challenges will be released the two first weeks and one challenge per week until Oct. 26th. So you have to perform well in 10 challenges to be the best C++ coder!

The rules are easy: You have to code against the clock. Quicker you are, more points you get. Points are cumulative between challenges and at the end of the challenge, the contestant with the biggest score on the leaderboard will win a HP Sprout. Be aware that you can only take a challenge once! Do your best on the first try!

To get started, click here http://bit.ly/1KhxOw9

CppCon 2015: More Lightning Talks -- Kate Gregory

cppcon-009.PNGReminder: The CppCon regular registration rate ends in 2 1/2 days! After that late registration will still be available.

CppCon 2015: More Lightning Talks

by Kate Gregory

From the announcement:

One of the big surprises last year at CppCon was the tremendous response to the lightning talks. People kept submitting them, and we just kept adding sessions. This year, we’re adding those sessions in advance as the submissions come in, so that you can plan to attend. (And yes, you can still submit a talk. We have time slots we can hold more lightning talk sessions in.) We’ve just added two more sessions – Tuesday lunch and Wednesday morning – to accommodate the submissions already received. You’ll see the lightning talk sessions in yellow on the program. The abstract is vague, and it’s not going to get less vague. You don’t know precisely what you’re going to get until you show up.

What roughly will you get? A number of different talks – some funny, some very technical, some personal, some inspirational, some that will make your grateful you have the job you do and not the speaker’s job. Some will be 5 minutes long and some 15 minutes long. A few might be followups to something that’s already happened. Others might be a way to invite you to something that hasn’t happened yet. Some will be the very first public speaking that speaker has ever done, and some will be a chance to let your hair down with a speaker you’ve seen being serious many times before. Some might not interest you, but that’s ok – they’re short, you can be bored for 5 or 15 minutes, and then there will be a different one. They’re little bite size goodies, and for many of us they were a very enjoyable highlight of the conference. Add some to your schedule now, and be prepared to get up a little early or stay on site a little late to get the full benefit of your time here!

Posted in News

CppCon 2015 Program Highlights, 12 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.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 3).

In this post:

  • Generic Lambdas from Scratch
  • Large Scale C++ With Modules: What You Should Know
  • Shared_Future from Scratch
  • Comparison is not simple, but it can be simpler
  • The Importance of Being const
  • Intro to the C++ Object Model

 

Generic Lambdas from Scratch by Arthur O'Dwyer, software engineer, Mixpanel

Lambdas (even those mysterious generic lambdas) are just syntactic sugar atop constructs that are perfectly understandable when approached from the right direction.

We'll start with the implementation of C-style functions, then move to overloading, function templates, non-static member functions, C++11 lambdas, and then demystify C++14 generic ("auto") lambdas. Finally, we'll detour into the implementations of std::function and std::bind to show how they're different from lambdas.


Large Scale C++ With Modules: What You Should Know by Gabriel Dos Reis, Principal Software Development Engineer, Microsoft

To be completed.


Shared_Future from Scratch by Arthur O'Dwyer, software engineer, Mixpanel

The contents of header are probably still a bit mysterious to most people. Sure, we know that setting the value of a promise causes the corresponding future to resolve; but how does that happen behind the scenes in a way that allows us to move futures around? How are we going to implement the new features in the Concurrency TS, such as .then() and .when_all()? How (if at all) do futures interact with std::thread, std::async, and "executors"?

We'll present an extremely simplified implementation of futures and shared_futures, without the template metaprogramming that comes along with future and future and so on, but showing all the pointers and synchronization primitives.


Comparison is not simple, but it can be simpler by Lawrence Crowl

The standard's algorithms typically require a 'strict weak ordering'. I will explain what this really means and show that even simple uses of sort can have latent failures. Programmers can avoid the problems today with a bit of work. Changes to the standard will reduce errors and programming effort.


The Importance of Being const by Richard Powell, Audio Software Engineer

Why do we use const? It helps the compiler enforce program invariants, find trivial bugs, and generally makes code better. But with C++11 has an extended meaning, specifically in regards to multi-threaded code.

This talk will be an intro to the const keyword and what it means to declare objects, pointers and member functions as const. We will also explore some subtle issues encountered with const, mutable, and multithreaded code.


Intro to the C++ Object Model by Richard Powell, Audio Software Engineer

This talk is to help you learn about how objects are represented in C++. I find it very helpful to have a mental model of how objects exist in the program memory space to understand how my code operates within program execution.

CppCon 2015 Program Highlights, 11 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.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Concurrency TS: The Editor's Report
  • `for_each_argument` explained and expanded
  • std::allocator Is to Allocation what std::vector Is to Vexation
  • <functional>: What's New, And Proper Usage
  • Type Traits - what are they and why should I use them?

 

Concurrency TS: The Editor's Report by Artur Laksberg, Software Engineer, Microsoft

In this presentation we will talk about the new C++ concurrency features that have been included in the Concurrency Technical Specification.

The TS should be of interest to anyone writing concurrent code in C++. The proposal includes improved futures for wait-free composition of asynchronous operations (including their relationship with C++ 'await'), new synchronization constructs as well as atomic smart pointers.


`for_each_argument` explained and expanded by Vittorio Romeo

During January 2015, Sean Parent posted a very interesting short piece of code on Twitter. The code iteratively iterates at compile-time over any number of function arguments, forwarding them one by one to a callable object.

How does this code work? What are the possible use cases? Can we make it even more generic and useful?

My talk answers all of the questions above, using independently compiled chronologically sequential code segments that show the audience the analysis and improvement process of `for_each_argument`.


std::allocator Is to Allocation what std::vector Is to Vexation by Andrei Alexandrescu, Founder, D Language Foundation

std::allocator has an inglorious past, murky present, and cheerless future. STL introduced allocators as a stop gap for the now antiquated segmented memory models of the 1990s. Their design was limited and in many ways wasn't even aiming at helping allocation that much. Because allocators were there, they simply continued being there, up to the point they became impossible to either uproot or make work, in spite of valiant effort spent by the community.

But this talk aims at spending less time on poking criticism at std::allocator and more on actually defining allocator APIs that work.

Scalable, high-performance memory allocation is a topic of increasing importance in today's demanding applications. For such, std::allocator simply doesn't work. This talk discusses the full design of a memory allocator created from first principles. It is generic, componentized, and composable for supporting application-specific allocation patterns.


<functional>: What's New, And Proper Usage by Stephan T. Lavavej, Senior Software Engineer, Microsoft

<functional> gained lots of machinery in C++11, with further changes in C++14 and C++17. This talk will cover what's new in 11/14/17, focusing on how to use it properly. For example, you've probably used std::function, but do you know the criteria for activating the Small Functor Optimization? (It's not just being small!) We'll also look at bind(), mem_fn(), C++17's invoke(), and more.


Type Traits - what are they and why should I use them? by Marshall Clow, Qualcomm

In this talk, I will answer the questions, "What are type traits?" and "Why are type traits useful?", along with some examples of why when when they should be used.

CppCon 2015 Program Highlights, 10 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.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 1).

In this post:

  • Tuning C++: Benchmarks, and Compilers, and CPUs! Oh My!
  • Value Semantics: It ain't about the syntax!, Part I and Part II
  • Five amazing things you couldn't imagine C++ can do
  • C++ Atomics: The Sad Story of memory_order_consume: A Happy Ending at Last?
  • A C++14 approach to dates and times

 

Tuning C++: Benchmarks, and Compilers, and CPUs! Oh My! by Chandler Carruth, C++ Language and Compiler Lead, Google

A primary use case for C++ is low latency, low overhead, high performance code. But C++ does not give you these things for free, it gives you the tools to control these things and achieve them where needed. How do you realize this potential of the language? How do you tune your C++ code and achieve the necessary performance metrics?

This talk will walk through the process of tuning C++ code from benchmarking to performance analysis. It will focus on small scale performance problems ranging from loop kernels to data structures and algorithms. It will show you how to write benchmarks that effectively measure different aspects of performance even in the face of advanced compiler optimizations and bedeviling modern CPUs. It will also show how to analyze the performance of your benchmark, understand its behavior as well as the CPUs behavior, and use a wide array of tools available to isolate and pinpoint performance problems. The tools and some processor details will be Linux and x86 specific, but the techniques and concepts should be broadly applicable.


Value Semantics: It ain't about the syntax!, Part I and Part II by John Lakos, Software Infrastructure Manager, Bloomberg LP

When people talk about a type as having *value* *semantics*, they are often thinking about its ability to be passed to (or returned from) a function by value. In order to do that, the C++ language requires that the type implement a copy constructor, and so people routinely implement copy constructors on their classes, which begs the question, "Should an object of that type be copyable at all?" If so, what should be true about the copy? Should it have the same state as the original object? Same behavior? What does copying an object mean?! By *value* *type*, most people assume that the type is specifically intended to represent a member of some set (of values). A *value-semantic* *type*, however, is one that strives to approximate an abstract *mathematical* type (e.g., integer, character set, complex-number sequence), which comprises operations as well as values. When we copy an object of a value-semantic type, the new object might not have the same state, or even the same behavior as the original object; for proper value-semantic types, however, the new object will have the same *value*. In this talk, we begin by gaining an intuitive feel for what we mean by *value* by identifying *salient* *attributes*, i.e., those that contribute to value, and by contrasting types whose objects naturally represent values with those that don't. After quickly reviewing the syntactic properties common to typical value types, we dive into the much deeper issues that *value* *semantics* entail. In particular, we explore the subtle *Essential* *Property* *of* *Value*, which applies to every *salient* mutating operation on a value-semantic object, and then profitably apply this property to realize a correct design for each of a variety of increasingly interesting (value-semantic) classes.


Five amazing things you couldn't imagine C++ can do by Sasha Goldshtein

Modern C++ is incredibly flexible. It's truly the multi-paradigm language Bjarne Stroustrup envisioned. In this talk, we will explore five functions or small libraries that make use of modern C++'s amazing features. Among them: compile-time- and runtime-safe printf, automatic recursive serialization of containers, a simple but complete parallelism framework using only portable C++, and two others to keep you motivated.


C++ Atomics: The Sad Story of memory_order_consume: A Happy Ending at Last? by Paul McKenney, Distinguished Engineer, IBM Linux Technology Center

One of the big advantages of C++ atomics is that developers can now let the compiler know about the intent behind their multi-threaded synchronization mechanisms. At least they can tell the compiler as long as the synchronization mechanism in question is not RCU. You see, all production compilers promote RCU's memory_order_consume to memory_order_acquire. Although this promotion does ensure correctness, it also ensures the additional overhead of memory-barrier instructions on weakly ordered systems and of needlessly suppressed compiler optimizations on all systems.

All previous attempts to resolve this issue have foundered on either standard-committee reluctance to eviscerate the standard for a special case, compiler-writer reluctance to eviscerate their compilers for a special case, and kernel-developers reluctance to eviscerate their source base for late-to-the-party compiler support.

But now there is a glimmer of hope in the guise of a small set of small patches to the Linux kernel that eliminate the most challenging use cases. Will this hope be realized? Come to this talk to here the story, which by September will hopefully have a happy ending!


A C++14 approach to dates and times by Howard Hinnant, Senior Software Engineer, Ripple Labs

A new date and date/time library designed for C++14 is presented. This library stresses ease of use, easy-to-read code, catching common errors at compile time, and uncompromising run-time performance.

The design starts with the C++11 std::chrono library, and extends it into the realm of calendars, giving a seamless experience built upon chrono::system_clock::time_point, the durations you already know such as chrono::hours and nanoseconds. Functionality that allows easy and efficient conversions between the std::chrono types and year/month/day - hh::mm::ss data structures is presented.

When dates (and times) are known at compile-time (e.g. leap second transitions), all computations are available at compile time (constexpr). When only parts of a date are known at compile time, run-time efficiencies are still gained by compile-time computing parts of the date.

The syntax of the library is built around a few easy-to-learn rules, and strictly checked at compile time. This makes it easy to learn, and very forgiving for the novice.

C++ User Group Meetings in September

The monthly listing of C++ User Group Meetings:

C++ User Group Meetings in September

by Jens Weller

The list of Meetings:

9.9 C++ UG Utah - Regular Monthly Meeting
9.9 C++ UG San Francisco/ Bay area - Presentation and Q&A
9.9 C++ UG Washington, DC - Q & A / Info Sharing 10.9 C++ UG Dresden - Scripting in C++
14.9 C++ UG Denver - Denver Tech Center C++ Developers
14.9 C++ UG Bristol - Tim Perry
14.9 C++ UG Zentralschweiz - Coding Dojo
16.9 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
16.9 C++ UG North West/Seattle - The BBC micro: bit and C++
17.9 C++ UG Chicago - "Cross-compiling to C++" and "Can you make me more productive
21.9 C++ UG Austin - North Austin Monthly C/C++ Pub Social
23.9 C++ UG San Francisco/ Bay area - Workshop and Discussion Group
23.9 C++ UG Washington, DC - Q & A / Info Sharing
24.9 C++ UG Rhein-Neckar - C++ Usergroup Meeting
24.9 C++ UG Bremen - C++ - Vorstellung eines Frameworks für den Integrationtest
24.9 C++ UG Arhus - Libreoffice Hackfest
30.9 C++ UG San Francisco/ Bay area - CppCon Trip Report

CppCon 2015 Program Highlights, 9 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.

 

C++ is not composed of only a language. It is also powerful librairies, helping us to get the best fonctionnalities.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Rcpp: Seamless R and C++ Integration
  • Mantid, A C++ framework for the reduction and analysis of neutron scattering data
  • Integrating generators EDSL's for Boost.Spirit X3
  • 3D Face Tracking and Reconstruction using Modern C++
  • Using Spirit X3 to Write Parsers
  • Boost Units Library for Correct Code

 

Rcpp: Seamless R and C++ Integration by Matt P. Dziubinski, Assistant Professor, Aalborg University

R is an open-source statistical language designed with a focus on data analysis. While its historical roots are in statistical applications, it is currently experiencing a rapid growth in popularity in all fields where data matters: from data science, through bioinformatics and finance, to machine learning. Key strengths contributing to this growth include its rich libraries ecosystem (over 6 thousands packages at the moment of writing) – often authored by the leading researchers in the field, providing early access to the latest techniques; beautiful, high-quality visualizations – supporting seamless exploratory data analysis and producing stunning presentations; all of this available in an interactive environment resulting in high productivity through fast iteration times.

At the same time, there are no free lunches in programming: the dynamic, interactive nature of R does have its costs, including a significant impact on run-time performance. In an era of growing data sizes and increasingly realistic models this concern is only becoming more important.

In this talk we provide an introduction to Rcpp – a library allowing smooth integration of R with C++, combining the productivity benefits of R for data science together with the performance of C++. First released in 2005, today it’s the most popular language extension for R -- used by over 400 packages. We'll also discuss challenges (as well as possible solutions) involved in integrating modern C++ code, and demonstrate the usage of popular C++ libraries in practice. We’ll conclude the talk with the RInside package allowing to embed R in C++.


Mantid, A C++ framework for the reduction and analysis of neutron scattering data by Steven Hahn, Data Analysis Software Engineer, Oak Ridge National Laboratory

Today one of the most important barriers between performing an experiment and publishing the results is the complex and time-consuming effort that individual researchers apply to data reduction and analysis. In a neutron experiment one must relate measured counts to a physically meaningful four-dimensional scattering function. While the first neutron scatters had to manually setup their instrument and record neutron counts – in handwriting – one single point at a time, users at a modern time of flight spectrometer rapidly collect hundreds of gigabytes of data in less than one day. High performance software is now a necessity. Rapid reduction, analysis and visualization provide feedback for users, helping them make optimal use of limited beam time. Software must also be accessible to and customized by users with a wide range of abilities and interests in programming. In this talk, I will discuss Mantid-(the Manipulation and Analysis Toolkit for Instrument Data), which is the framework designed for the reduction and analysis of data acquired at muon and neutron sources. It is a partnership between multiple user facilities including Rutherford Appleton Laboratory, Oxfordshire, UK, Oak Ridge National Laboratory, Tennessee, USA and the European Spallation Source, Scandinavia. The core of the Mantid Framework is written in C++ with the user interacting via a GUI or python bindings. I will describe real-world cross-platform situations we have encountered while supporting Mantid on Linux, OS X and Windows. This plus a climate that values stability over the latest operating systems and compilers creates challenges to utilizing new language and library features available in C++11/14. To better exploit parallelism on all of the supported platforms, we are wrapping parallel loops so that different implementations can be chosen at compile time. Considerable portions of Mantid provide domain-specific user interfaces to cross-platform libraries. One example is 3D visualization of the large multidimensional datasets generated in Mantid. Our approach utilizes the application widgets and rendering libraries from ParaView. Mantid provides plugins specifically designed for the Mantid data structures. A custom interface for visualization can be started within Mantid, creating a seamless environment for novice users not comfortable with the ParaView workflow.

This research at ORNL’s High Flux Isotope Reactor and Spallation Neutron Source was sponsored by the Scientific User Facilities Division, Office of Basic Energy Sciences, US Department of Energy.


Integrating generators EDSL's for Boost.Spirit X3 by Felipe Magno de Almeida, Owner, Expertise Solutions

Based on the presentation I made on C++Now 2015 for Developing EDSL's for Boost.Spirit V2, present the development of generators for Boost.Spirit X3 (next version of boost spirit) and how that can be used for higher abstraction EDSL's while, through template metaprogramming, create parsers and generators automatically from the same grammar, using CORBA format as an example, while dealing with endianness, alignment and asymmetric grammars. This work is based on the library mORBid (https://github.com/expertisesolutions/mORBid) and (https://github.com/expertisesolutions/giop).


3D Face Tracking and Reconstruction using Modern C++ by Patrik Huber, PhD student in computer vision, University of Surrey

In this talk, I will present my work in computer vision, namely landmark detection and 3D face tracking, and the two C++ libraries that were developed in the process. The first part of the talk will give an introduction to detecting facial landmark points and work through a hello-world code example that presents and uses the superviseddescent library, a cross-platform library for cascaded regression that can be used to solve problems like landmark detection or pose estimation. The second part of the talk will present an approach that uses the found landmarks from the first part to use a 3D face model to track a person's face. With the library presented in the process, we hope to make 3D models easier to use and more widespread in the community. Both libraries are designed to be lightweight and simple to use, and try to follow modern C++11/14 programming paradigms. The talk concludes with my views on code sustainability in academia and a wish list of standard library features for computer vision.


Using Spirit X3 to Write Parsers by Michael Caisse, Ciere Consulting

Parsing is a common problem in many domains. The complexity of using a library often pushes developers to ad-hoc solutions utilizing std::string manipulations, regular expressions, or nested if/switch statements. Most “quick hack” implementations are unmaintainable.

Spirit provides a Domain Specific Embedded Language (DSEL) that allows grammars to be described in a natural and declarative manner just like writing PEG or EBNF directly in your C++ code. X3 is the third major release of the Spirit library and improves both compile and run times while simplifying the much of the library.

In this tutorial session you will be introduced to Spirit X3, attribute parsing, and variety of tips to writing efficient and maintainable parsers. We will build a JSON parser during the session to illustrate techniques and usage of the library. This session is applicable toward anyone needing to parse data.


Boost Units Library for Correct Code by Robert Ramey, Proprietor, Robert Ramey Software Development

I will give a presentation on the Boost Units library.

This library implements a zero runtime facility for performing dimensional analysis checking and automatic units conversion on C++ expressions. I have found this indispensable for coding scientific programs involving a variety of complex physical units. The documentation of the Boost Units library is totally complete and accurate, but totally inpenetrable. I had to spend way too much time figuring out how to use this. By attending this meeting, you're going to avoid this pain and just get the benefit of simpler programs that contain fewer bugs.

CppCon 2015 Program Highlights, 8 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.

 

C++ is not composed of only a language. It is also powerful librairies, helping us to get the best fonctionnalities.

The following interrelated CppCon 2015 talks tackle these issues and more (part 1).

In this post:

  • Case study: Evolving legacy code
  • Lessons in Sustainability: How to Maintain a C++ Codebase for Decades
  • CopperSpice: A Pure C++ GUI Library
  • Writing Great Libraries in 89 Easy Steps
  • Qt: modern user interfaces for C++

 

Case study: Evolving legacy code by Rachel Cheng (Software Engineer, F5 Networks) and Michael VanLoon (Principal Software Engineer, F5 Networks)

We will be presenting on the evolution of a legacy monitoring subsystem modernized to C++11 with enhanced interfaces and better programming techniques. The presentation will cover some abstracted example problem areas, the solutions, and talk about the strategy employed to modernize the code.


Lessons in Sustainability: How to Maintain a C++ Codebase for Decades by Titus Winters, Software Engineer, Google

Google maintains (we believe) the largest monolithic C++ codebase in the world with over 100M lines of C++ code. Early commits to this repository date back to the late 1990s. About 4000 engineers submit at least one change in C++ every week. We’ve learned a few things about what it takes to maintain a codebase at this scale.

In this talk I’ll present some of the lessons we’ve learned over the years with respect to policies, technology, education, design, and maintenance of a long-lived monolithic codebase.


CopperSpice: A Pure C++ GUI Library by Barbara Geller and Ansel Sermersheim, Co-Founders, CopperSpice

CopperSpice is a collection of cross platform GUI libraries derived from Qt 4.8. Our libraries use current C++11 technology to implement Reflection, without requiring moc (a code generator) or any preprocessing. We will discuss what Reflection is, how this technology can be used, and why it can be difficult to implement.

The focus of this presentation is to show the core implementation of CopperSpice. Source code from CopperSpice will be shown to explain how we implemented Reflection using pure C++11. We will also demonstrate small samples of code which use the CopperSpice libraries.

Technologies covered in this presentation will include templates, variadic templates, and template specialization.

No prior knowledge of CopperSpice or Qt is required. A working knowledge of templates in C++11 would be helpful.


Writing Great Libraries in 89 Easy Steps by Zach Laine, Sr. Programmer, Nvidia

Writing code that does what you want it to do, correctly and efficiently, is hard. Doing so when you don't even know yet what you want the code to do yet is quite a bit harder. Yet this is the job of a library writer -- the users of a library may have a very different use case from that of the original author.

How do library writers develop correct and efficient APIs that are also:

- easy to use correctly - hard to use incorrectly - highly reusable - gracefully interoperable with other code

This talk gives lots of practical advice and techniques for accomplishing those goals and more.


Qt: modern user interfaces for C++ by Milian Wolff, Software Engineer, KDAB (Deutschland) GmbH&Co KG

The C++ language evolved significantly in the recent past, and so did many frameworks and libraries in the big ecosystem surrounding it.

For twenty years now, Qt is being used on a multitude of platforms to create native looking, compelling graphical user interfaces.

It offers C++ libraries and tools for building desktop, mobile and embedded applications. Qt gives engineers APIs for developing using two dimensional controls, integrating 3D using OpenGL, embedding web content, as well as a new declarative domain-specific language called QML, which is extensible using C++. Qt is also much more than a UI toolkit and provides a multitude of helper libraries for various use-cases, such as localization, database access, XML and JSON parsing and much more.

During this talk, I will give an introduction to Qt and present its capabilities in how it can be utilized to write modern UIs using C++, both in 2D as well as 3D. Additionally, I will show how some of its features, like the integrated web engine or QML, can be leveraged to go beyond C++. While at it, I hope to clear up some outdated misconceptions about Qt and its relationship to standard C++ and the STL as well as Boost and other libraries.

Finally, I will present the KDE Frameworks, an open source collection of high quality, cross platform Qt libraries that are being used by the KDE Software Collection. KDE frameworks are to Qt as Boost is to the STL. Recent development makes it simpler than ever to use these libraries in external applications.