Loading…
C++Now 2019 has ended

Log in to bookmark your favorites and sync them to your phone or calendar.

lecture [clear filter]
Monday, May 6
 

09:00 MDT

C++ Constants
This that talk is about actual constants in C++, not the more abstract “constants” you might experience while coding C++, like that euphoric sense that you’re making the world a better place. The notion of “constant expressions” underwent a very fundamental change in C++11, and has evolved with every iteration of the standard since then. This presentation will look at some of the major ideas underpinning “constants” in modern C++, including why things are the way they are and what new capabilities C++20 brings.

Speakers
avatar for Daveed Vandevoorde

Daveed Vandevoorde

VP Engineering, Edison Design Group
David ("Daveed") Vandevoorde is a Belgian computer scientist who lives near Princeton, NJ, USA. He is vice-president of engineering at the Edison Design Group (EDG), where he contributes primarily to the implementation of their C++ compiler front end. He is an active member of the... Read More →


Monday May 6, 2019 09:00 - 10:30 MDT
Paepcke Auditorium
  lecture

11:00 MDT

Beyond C++17 (Part 2 of N)
Last year on C++Now I provided a "Beyond C++17" talk that described a current status of work on C++20. For last 12 months we received not only a lot of new features but some existing things were changed too. This talk will scope only on such additions and changes assuming that the audience is already familiar with the contents described a year ago. I will talk about contracts, generic functions, constraints, concepts, ranges, constexpr'ing all the things, immediate functions, "fixing" UTF-8 and aggregates, and many other hot topics.

Speakers
avatar for Mateusz Pusz

Mateusz Pusz

Principal Software Engineer | Founder & C++ Trainer, EPAM Systems | Train IT
A software architect, principal engineer, and security champion with more than 15 years of experience in designing, writing, and maintaining C++ code for fun and living. A trainer with 10 years of C++ teaching experience, consultant, conference speaker, and evangelist. His main areas... Read More →


Monday May 6, 2019 11:00 - 12:30 MDT
Hudson Commons
  lecture
  • Level Beginner, Intermediate, Advanced, Expert
  • Tags C++20, library

11:00 MDT

Matchine: Pattern Matching for Open Sum Types
C++17 offers std::variant to model closed sum types and do pattern matching on them using std::visit (and eventually std::overloaded). While this is not as powerful as pattern matching in languages having this built in, it still allows to have a decent declarative design using mere library features.

It is also common to have this problem over an underlying open sum type, which can be modeled by means of inheritance and dynamic_cast or std::any, thus, relying on RTTI. This approach has two flaws compared to std::variant: firstly, dispatching using RTTI is much slower than std::variant and, secondly, C++ lacks a declarative counterpart for open sum types.

In this talk I will present solutions to both problems. I will show how a declarative dispatcher that works similarly to std::visit and the proposed std::overloaded can be implemented over open sum types. Further I will present an implementation that allows to model open sum types by inheritance but without relying on RTTI. By using both tools together a fast declarative pattern matching over type hierarchies can be built. The presented tools have been open sourced to 'matchine', a small library, and are already running in production code.

In the (more crazy) final part I will explore further possibilities of pattern matching as library feature. In particular I want to show some experiments of sorting the matching cases at compile time in order to do a binary search at run (match) time.

Speakers
avatar for André Bergner

André Bergner

Software Engineer, Apple
André likes challenges – that's why he enjoys writing C++ and tries to do things with it that it wasn't supposed to do. He works as an principal software engineer at Native Instruments in Berlin. He holds a PhD in theoretical physics and besides C++ is toying a lot with deep learning... Read More →


Monday May 6, 2019 11:00 - 12:30 MDT
Flug Auditorium

11:00 MDT

Property-Based Declarative Containers
Complex domains with volatile concerns are increasingly converging on “declarative” APIs to provide a consistent and high-level abstraction from which the developer may reason about system status, configuration, and behavior. Declarative APIs present an illusion of simplicity and consistency, hiding the volatile transformations that occur within the running system, and the edge cases and interactions among coupled concerns. A declarative approach is especially well-suited to remain stable, while permitting the internal system behavior to change implementation and evolve over time.

A “declarative container” similarly presents this illusion of consistency, and simplicity: Properties are extracted to describe the contents of a container, but the container implementation remains opaque. This presents an interface independent of the data layout and possibly evolving algorithms used to maintain invariants within that container.

Declarative containers are in contrast to C++ std:: containers which are decidedly non-opaque. Whereas the std:: containers guarantee data layout and specify Big-O traversal complexity, a declarative container is assumed to be opaque, and is interrogated only through property extraction. As a result: Algorithms express differently, because the declarative container interface is not based on item iteration.

We discuss a unified model of declarative property-based containers that provide the expressive simplicity of a declarative API, while still enabling the efficiency and control offered through std:: containers, iterators, and algorithms. The declarative container opaquely aggregates domain-specific types, and we explore the authoring of domain-specific algorithms reliant upon the properties exposed by the container. No iterators are invalidated or harmed in this process (and indeed, iterators serve no purpose whatsoever in the declarative container interface).

Speakers
avatar for Charley Bay

Charley Bay

Charley Bay
Charley is a software developer with over three decades of experience using C++ in multiple regulated and high-performance fields focused on large-scale and distributed systems in performance-sensitive environments including time-sensitive processing of large data sets, performance... Read More →


Monday May 6, 2019 11:00 - 12:30 MDT
Bethe
  lecture

14:30 MDT

A Multithreaded, Transaction-Based Read/Write Locking Strategy for Containers
With the multithreading tools available in the modern C++ standard library, it is easier than ever to create multithreaded programs. When we write such applications, there are sometimes cases in which a container simply must be shared among multiple threads. Of course, sharing is trivial if the only operations on the container are reads. In the case where reads greatly outnumber writes, acceptable performance is often attainable with a reader/writer mutex type, like std::shared_mutex. But suppose that the number of writes is similar to, or even greater than, the number of reads -- how does one then perform simultaneous reads and writes on a single container?

One common usage pattern is that, for a given operation, sets of related records are read and updated together. In order to prevent data races and inconsistent views of the data, such sets must be locked together as a unit before any of them can actually be read or updated. Further, it is very easy to accidentally create deadlocks by choosing a seemingly correct locking order. In order to avoid these problems, we require that our locking algorithm provide three important properties: atomicity, consistency, and isolation.

This talk will describe an algorithm, implemented in C++, that performs such locking based on the concept of strict timestamp ordering. Using only facilities from the C++17 standard library, it employs a straightforward and novel approach to multi-threaded, transactional record locking that requires minimal spatial overhead and yet fulfills the requirements of atomicity, consistency, and isolation. We'll discuss the pros, cons, and limitations of the algorithm, and provide some measurements comparing the algorithm's performance to that of other techniques.

Speakers
avatar for Bob Steagall

Bob Steagall

Chief Cook and Bottle Washer, KEWB Computing


Monday May 6, 2019 14:30 - 16:00 MDT
Flug Auditorium
  lecture

14:30 MDT

How I learned to Stop Worrying and Love the C++ Type System
Ward Cunningham's CHECKS pattern language of the 1990s contains the Whole Value Pattern. That pattern claims that using plain value types such as integers, strings or double, especially on a function's interface are not a good practice, because their use is error prone. There are stories about programmers calling a function taking several ints with the wrong sequence of numbers and searching for the bugs. Some claim that named parameters solve those problem, but in my opinion they don't.

C++ has the huge benefit to allow us to define own encapsulated types that are implemented as efficient as the built-in types and that can be clearly distinguished from each other. Unfortunately due to C++'s legacy there are some holes in the type system, like integral promotion and numeric conversions or type aliases, that add to the problem of using plain types for domain values. We should change that practice.

What is a domain value? Even the standard library suffers from using type aliases where a proper domain type would have lessened the issues. The recent discussion of std::span's index type (int or unsigned) shows that. If the standard library would have defined a proper index_type and size_type that are not just integers, that discussion would have been moot and the desired and needed operators for these types could have been defined in a way avoiding the pitfalls of while(v.size()-1 >=0).

This talks demonstrates how to implement and use simple wrapper types and how we could teach that. It also introduces a work-in-progress framework supporting mixing in the minimum set of operators in a type safe way, so that problems of integral promotion or numeric conversion can not happen. Feedback on the latter is appreciated. It deliberately does not attempt to be a full units framework, but to allow distinguish things like width, height and radius from each other and from 42.

Speakers
avatar for Peter Sommerlad

Peter Sommerlad

Professor, IFS Institute for Software
Cevelop, Safe C++, CUTE unit testing


Monday May 6, 2019 14:30 - 16:00 MDT
Hudson Commons
  lecture

14:30 MDT

Value Proposition: Allocator-Aware (AA) Software
The performance benefits of supplying local allocators are well-known and substantial [Lakos, ACCU’17]. Still, the real-world costs associated with orchestrating the integration of allocators throughout a code base, including training, supporting tools, enlarged interfaces (and contracts), and a heightened potential for inadvertent misuse cannot be ignored. Despite substantial upfront costs, when one considers collateral benefits for clients – such as rapid prototyping of alternative allocation strategies – the case for investing in a fully allocator-aware (AA) software infrastructure (SI) becomes even more compelling. Yet there remain many “concerns” based on hearsay or specious conjecture that is either overstated or incorrect.

In this densely fact-infused talk, we begin by introducing a familiar analogy to drive home the business case for AASI. Next we identify four syntactic styles based on three distinct models: C++11, C++17, and a brand new language-based approach being developed by Bloomberg for C++23 (or later). Costs – both real and imagined – will be contrasted with performance as well as other important (“collateral”) benefits. The talk will conclude with a closer look at the economic imperative of pursuing a low-cost language-based alternative to AA software in post-modern C++.

Speakers
avatar for John Lakos

John Lakos

Software Engineer, Bloomberg Lp
John Lakos, author of Large-Scale C++ Software Design, serves at Bloomberg LP in New York City as a senior architect and mentor for C++ Software Development world-wide.  He is also an active voting member of the C++ Standards Committee’s Evolution Working Group. Previously, Dr... Read More →


Monday May 6, 2019 14:30 - 16:00 MDT
Bethe
  lecture

16:30 MDT

Embedded Domain Specific Languages for Embedded Bare Metal Projects
Embedded Domain Specific Languages allow us to express ideas at a higher level. They often provide a declarative abstraction that improves readability and reduces errors. EDSLs allow programmers to concentrate on value.

Embedded projects often worry about program and data size. They can have limited ROM or program execution space and stack is a premium. Between space accounting and general attitudes in the domain, nice abstractions are often exchanged from some hand crafted contortion to save a few bytes. Between a resource obsession and sometimes a loathing of abstraction, we can't have nice things.

So, are EDSLs too expensive for embedded projects? Does the EDSL confuse more than help? Is abstraction worth it? C++14 and C++17 bring an expressiveness and performance to the language that increases the attractiveness of C++ in the embedded world.

This session will discuss the benefits of EDSLs and explore a few different open-source libraries that Ciere uses in embedded projects. We will take a look at the resource cost of abstractions and understand which techniques to use and which to avoid. To aid in our understanding, a basic filter computation EDSL will be developed during the session and will be used to demonstrate the cost of competing techniques.

Whether you are developing for small embedded systems or want a better understanding of using and writing EDSLs, this session will provide you with tools and techniques. Join us and improve abstractions in your code.

Speakers
avatar for Michael Caisse

Michael Caisse

Ciere Consulting
Michael Caisse has been crafting code in C++ for 30-years. He is a regular speaker at various conferences and is passionate about teaching and training. Michael is the owner of Ciere which provides Software Contracting services, C++ training, and Project Recovery for failing multidisciplinary... Read More →


Monday May 6, 2019 16:30 - 18:00 MDT
Hudson Commons
  lecture

16:30 MDT

test_resource: the pmr detective
This session will provide an introduction to pmr::test_resource, which supports testing memory allocation related behavior on a per-object basis.

pmr::test_resource is a C++17 memory resource designed for testing that can be plugged into any test framework. It is the modernized version of the bslma::TestAllocator used in production for over two decades at Bloomberg, where it has helped to expose a variety of bugs, such as memory leaks, overruns, multiple deletes, exception-safety guarantee failures etc. This presentation will show the use of test_resource in detecting errors related to memory allocation. We walk through code to demonstrate several bugs and show how they misbehave, how we diagnose them, and a reasonable fix. pmr::test_resource is being proposed for the Library Fundamentals 3 TS and full
source code for test_resource, bslma::TestAllocator and the examples is available on GitHub.

Speakers
avatar for Attila Feher

Attila Feher

Senior Software Engineer, Bloomberg LP
Working with C++. Original proposer of the C++11 alignment features.


Monday May 6, 2019 16:30 - 18:00 MDT
Bethe
  lecture
 
Tuesday, May 7
 

09:00 MDT

Compile Time Regular Expressions with Deterministic Finite Automaton
In this talk I will present an advancement on the Compile Time Regular Expression (CTRE) Library. The library was designed with new C++20 features, and it uses novel techniques. This presentation independently sums up the work since my previous CppCon talk about the library.

The primary topic of this talk will be an explanation of the new Deterministic Finite Automaton (DFA) engine in the library and how it's built and optimised during compilation. I will explain the differences and limitations of the new engine in comparison to the previous Back Tracking engine. I will address these differences with a benchmark and I will discuss the generated assembly.

Even if you are not interested in regular expressions, you will learn new techniques in compile-time meta-programming and see new C++20 features in action.

Speakers
avatar for Hana Dusíková

Hana Dusíková

Staff Scientist, AVAST
Hana works as a staff scientist at Avast Software. She is the Czech National Body chair for SC22 and WG21. She is also chair of WG21's Study Group for Compile-Time Programming, where C++'s future Reflection facilities are being developed.


Tuesday May 7, 2019 09:00 - 10:30 MDT
Paepcke Auditorium

11:00 MDT

Implementing Physical Units Library for C++
This talk will present the current state of my work on designing and implementing Physical Units Library for C++. I will present all the challenges, design tradeoffs, and potential solutions to those problems. During the lecture, we will also see how new C++20 features help to make the library interface easier to use, maintain, and extend. Among others, we will see how we can benefit from class types provided as non-type template parameters, how new class template argument deduction rules simplify the interfaces and the full power of using concepts to constrain template types.

Speakers
avatar for Mateusz Pusz

Mateusz Pusz

Principal Software Engineer | Founder & C++ Trainer, EPAM Systems | Train IT
A software architect, principal engineer, and security champion with more than 15 years of experience in designing, writing, and maintaining C++ code for fun and living. A trainer with 10 years of C++ teaching experience, consultant, conference speaker, and evangelist. His main areas... Read More →


Tuesday May 7, 2019 11:00 - 12:30 MDT
Bethe
  lecture

11:00 MDT

Sane Modern Special Member Functions
C++ 11 introduced move operations and thus made the old "Rule of Three" obsolete. While some just transformed that to become the "Rule of Five/Six" there is also a school of thought to propose "Rule of Zero". For beginners or pre-C++11 programmers this can be highly confusing.

Howard Hinnant gave a great presentation on the language rules which special members are defined or declared when, but we often lack the teachability on what to actually use.

Based on Howard's table and some categorization of class types, I suggest a consistent but may be surprising means to what special members to define or declare in what cases. Since I want to reduce of clutter there are some surprising suggestions. While unfamiliar today, I would like to make these suggestions more popular, so that we can get less code and thus more software.

Speakers
avatar for Peter Sommerlad

Peter Sommerlad

Professor, IFS Institute for Software
Cevelop, Safe C++, CUTE unit testing


Tuesday May 7, 2019 11:00 - 12:30 MDT
Flug Auditorium
  lecture

14:30 MDT

Better CTAD for C++20
Class Template Argument Deduction (CTAD), introduced in C++17, is a useful feature that allows us to write cleaner and shorter code by omitting class template arguments. Unfortunately, the actual language rules behind CTAD are quite complex, and there are many pitfalls. CTAD sometimes deduces unexpected template arguments, and often just doesn’t work at all on certain classes, even if most users would expect that it should.

This talk summarises the actual language rules behind CTAD and its most annoying flaws and pitfalls. We will then talk about how the upcoming C++20 standard will remove some of those flaws, leading to better and safer CTAD that is easier to use.

Speakers
avatar for Timur Doumler

Timur Doumler

Cradle
Timur Doumler is a C++ developer specialising in audio and music technology, an active member of the ISO C++ committee, and Conference Chair of the Audio Developer Conference (ADC). He is passionate about building communities, clean code, good tools, and the evolution of C++.


Tuesday May 7, 2019 14:30 - 16:00 MDT
Hudson Commons
  lecture

14:30 MDT

The Truth of a Procedure
One way of modeling a procedure mathematically is to treat it as a statement about the ways in which events can be arranged by a computer. This conception brings programming into the domain of mathematical logic, the study of truth and proof in formal languages.

In this lecture, I will explain how to read a procedure and its interface as a sentence, how that sentence may be true or false, possible or impossible, necessary or provable.

This presentation of programming from a logician’s perspective is intended to complement the topologist’s perspective of last year’s keynote, “The Shape of a Program,” but is independent of the material covered there.

Speakers
avatar for Lisa Lippincott

Lisa Lippincott

Software Architect, Tanium
Lisa Lippincott designed the software architectures of Tanium and BigFix, two systems for managing large fleets of computers. She's also a language nerd, and has contributed to arcane parts of the C++ standard. In her spare time, she studies mathematical logic, and wants to make computer-checked... Read More →


Tuesday May 7, 2019 14:30 - 16:00 MDT
Bethe
  lecture

16:30 MDT

C++: Engineers Wanted, Programmers not so Much
The software development world is groaning as it transforms into a mature engineering discipline. As C++ software projects both grow and age, a fundamental shift in mindset is happening, that from the programmer to the engineer.

This talk explores the recent shifts in focus from language, to system, to business value in both the commercial and C++ standardization settings. We'll see, in particular, how this impacts conventions, maintenance, specifications, tools, and ideologies.

Speakers
avatar for David Sankel

David Sankel

Bloomberg
David Sankel is a Software Engineering Manager/TL at Bloomberg and an active member of the C++ Standardization Committee. His experience spans microservice architectures, CAD/CAM, computer graphics, visual programming languages, web applications, computer vision, and cryptography... Read More →


Tuesday May 7, 2019 16:30 - 18:00 MDT
Hudson Commons
  lecture

16:30 MDT

Tacit DSL All the Things
Can't we just add a functional programming language to C++ as a DSL that integrates seamlessly? Would that be a good thing? Would I have to understand category theory to use it? Whether or not you are a fan of domain-specific languages it seems we are getting one in C++20's standard library. The ranges DSL brings with it some high-level concepts and with a little abuse many more concepts, from functional programming. At the same time, there seems to be interest in other DSLs bringing other functional concepts such as monadic extensions to optional or monadic composition of asynchronous tasks. But why in separate DSLs? This seems odd because unifying things is at the very heart of functional programming.

In this talk, I will make the argument that with 3 small extensions to the ranges DSL syntax we can make one DSL to rule them all lifting may existing C++ language and library features into a more functional or declarative paradigm as well as unifying many boost libraries. After refreshing the core concepts of the ranges DSL and presenting my proposed extentions we will take a whirlwind tour of how I think we should add functional programming paradigms to C++ in a unified manner. We will rethink sum types, fusion metaprogramming, event-based programming, monads, Haskell do notation, closure's transducers, rust's match, named/deduced parameters, state machines, "terser" lambda syntax, pointfree programming, generative programming, and declarative programming paradigms.  

Speakers
avatar for Odin Holmes

Odin Holmes

chaos monkey, Auto-Intern GmbH
Odin was allocated from a pool of hippies in the middle of the forest. He spent most of his career designing electronic circuits and programming micro controllers in assembler. One day after having shot himself in the foot particularly badly a friend introduced him to C++, a seriously... Read More →


Tuesday May 7, 2019 16:30 - 18:00 MDT
Bethe
  lecture

16:30 MDT

The C++20 Standard Library - Beyond Ranges
The C++20 Standard Library - Beyond Ranges

C++20 has a large number of new library features. This survey course provides students with a broad overview of the changes and new facilities in the C++20 standard library. Ranges are briefly discussed, but the focus is on the myriad of other standard library changes targeted at C++20. These include expanded chrono support, concepts library, string output formatting, span, flat_map, contains on associative containers, heterogeneous lookup on associative containers, uniform container erasure, u8string and u8string_view, bit manipulation facilities, functions and types to support relational comparisons, sync_buf and osync_stream, and threading primitives such as atomic_ref.

The tutorial will be up to date with the latest working draft following the Kona meeting and will include pointers to current implementations as well as the state of compiler support.

Chock full of example codes, this tutorial will focus on practical application of the new c++20 standard library facilities.

(90 minutes)

Speakers
avatar for Jeff Garland

Jeff Garland

CrystalClear Software
Jeff Garland has worked on many large-scale, distributed software projects over the past 25+ years. The systems span many different domains including telephone switching, industrial process control, satellite ground control, ip-based communications, and financial systems. He has written... Read More →


Tuesday May 7, 2019 16:30 - 18:00 MDT
Flug Auditorium
  lecture

21:00 MDT

C++Now and CppCon, the View From Inside
Video, Slides.

* What the C++Now and CppCon are. Brief history, purpose, and difference.
* How to attend CppCon and get money for that.
* How to attend C++Now and CppCon for free or partially for free.
* How to avoid the expenses for the conference ticket, hotel, flight, pre-conf- and post-conf-classes.
* How certain parts of the conferences work. Roles, tools, how one can participate and what it gives.
* Future of C++Now and CppCon.
* Annual time line of CppCon and C++Now. When to do what.

Bonus Topics:
* How speakers can make their talk(s) available not only in the talk's language but in other languages also, and thus to become more visible around the world.
* In which companies one needs to work to be sent to C++Now and CppCon.
* What one needs to do to be sent to the conferences.
* What the employers might want to know before sending their employees to the conferences.

Speakers
avatar for Robin Kuzmin

Robin Kuzmin

Sr. SW Engineer, MS
Crazy about C++ passionate bug preventer, meticulous code reviewer,thorough analyst of the design decisions. 5 years in C++, 13 years in C, mostly in firmware development and hardware simulation.-----* Speaker Liaison for 2018 - 2019 CppCon and C++Now.* Volunteer Shift Leader, Surveys... Read More →


Tuesday May 7, 2019 21:00 - 22:00 MDT
Flug Auditorium
  lecture
 
Wednesday, May 8
 

09:00 MDT

The C++ Reflection TS
What is the C++ Reflection TS and what will it do for me? The answer: a lot. This talk explains this exciting new language feature, demonstrates how it is used, and discusses the direction reflection is taking within the C++ standardization committee.

David Sankel is a co-author of the Reflection TS and currently serves as its project editor.

Speakers
avatar for David Sankel

David Sankel

Bloomberg
David Sankel is a Software Engineering Manager/TL at Bloomberg and an active member of the C++ Standardization Committee. His experience spans microservice architectures, CAD/CAM, computer graphics, visual programming languages, web applications, computer vision, and cryptography... Read More →


Wednesday May 8, 2019 09:00 - 10:30 MDT
Paepcke Auditorium
  lecture
  • Level Intermediate, Advanced, Expert
  • Tags ISO C++

11:00 MDT

Audio in standard C++
Today, almost every computer, tablet and phone comes with audio input and output. Computer games and many other kinds of applications would be unthinkable without sound. Yet, the C++ language has no notion of it. Literature on audio in C++ is sparse. For even the simplest possible audio functionality, programmers need to deal with a confusing landscape of complex platform-specific APIs and proprietary 3rd party libraries. But audio in C++ doesn't have to be hard!

First, we show how audio signals can be digitally represented in C++, covering basic concepts such as channels, audio buffers, PCM, and sample rate. We explain the principles of communicating with your soundcard and playing, recording, reading and writing audio data. In the second half of the talk, we will discuss a proposal to add a minimal, modern audio API to the C++ standard library. We will show the basic design, the current state of the implementation, and simple example apps. We finish with an update on the current state of this proposal.

Speakers
avatar for Timur Doumler

Timur Doumler

Cradle
Timur Doumler is a C++ developer specialising in audio and music technology, an active member of the ISO C++ committee, and Conference Chair of the Audio Developer Conference (ADC). He is passionate about building communities, clean code, good tools, and the evolution of C++.


Wednesday May 8, 2019 11:00 - 12:30 MDT
Bethe
  lecture

11:00 MDT

Clang Automated Refactoring for everyone with clangmetatool
There has been an expansion on the number of tools that perform static analysis and automated refactoring, following the development of clang and, more importantly, clang's tooling library. The talk will go over background on the development of the area, explain how Bloomberg is using clang tooling to advance its automated refactoring needs, and also do a case study of the development process of a tool at Bloomberg.

We will also cover clangmetatool[1], which is the open source framework we use when producing clang tools, and walk over the entire life cycle of how a automated refactoring tool is implemented, how we manage the execution of that pipeline to completion.

[1] https://bloomberg.github.io/clangmetatool

Speakers
DR

Daniel Ruoso

Bloomberg


Wednesday May 8, 2019 11:00 - 12:30 MDT
Flug Auditorium
  lecture

14:30 MDT

Hey C, This Is What Performance Looks like (Manually Generating Optimal Assembly at Compile Time)
In my day job, I work on a lot of exotic hardware and highly constrained systems, both in resources and latency/timing. In my domain, C is king and the reason given is almost always performance. I have found, however, that at least for my domain and my needs I cannot get the performance I need from C, I need C++.
Some of the custom assembler generating metaprograms I have written beat industry standard libraries in performance by 10x and more in some benchmarks and are far safer and easier to use than the forest of macros against which they compete.

In this talk, we will discuss the trade-offs of optimization within the compiler vs. optimization implemented in the form of metaprograms in library space for niche use cases on custom hardware. As an example of the success of optimization in library space I will present a DSL I wrote for ARM Cortex SoCs which provide reasonable semantics and incredible performance when talking to the more exotic functionality offered by the hardware and not supported by the optimizer (or the language for that matter).

Speakers
avatar for Odin Holmes

Odin Holmes

chaos monkey, Auto-Intern GmbH
Odin was allocated from a pool of hippies in the middle of the forest. He spent most of his career designing electronic circuits and programming micro controllers in assembler. One day after having shot himself in the foot particularly badly a friend introduced him to C++, a seriously... Read More →


Wednesday May 8, 2019 14:30 - 16:00 MDT
Flug

14:30 MDT

Practical Interfaces for Practical Functions
Before we can make the use of formal interfaces routine, we must develop not only the mathematical theory, but also the programming practice. Practice, of course, is developed by working out examples.

In this presentation, I will work out formal interfaces for a number of familiar functions and try to draw out some lessons about writing practical interfaces.

This presentation will refer to my earlier presentation “The Truth of a Procedure” occasionally, but should be understandable to those who missed it. The examples will be given in a notation similar to that of my presentations in previous years, “What is the Basic Interface?” “Locally Atomic Capabilities and How to Count Them,” and “The Shape of a Program.”

Speakers
avatar for Lisa Lippincott

Lisa Lippincott

Software Architect, Tanium
Lisa Lippincott designed the software architectures of Tanium and BigFix, two systems for managing large fleets of computers. She's also a language nerd, and has contributed to arcane parts of the C++ standard. In her spare time, she studies mathematical logic, and wants to make computer-checked... Read More →


Wednesday May 8, 2019 14:30 - 16:00 MDT
Bethe
  lecture

16:30 MDT

Higher-order functions and `function_ref`
Most modern languages treat functions as first-class citizens, and Modern C++ is no different. The introduction of lambda expressions and utilities such as `std::function` enable countless functional programming patterns that can increase the flexibility and safety of APIs, and help reduce code repetition on the implementation side.

In this talk we're going to see examples of how higher-order functions can be used in practice to increase the quality of production code and the productivity of developers. A new abstraction proposed to the Standard Library for C++20, `function_ref`, will also be covered and compared to other techniques for the implementation of higher-order functions. `function_ref` is a lightweight wrapper over any `Callable` with a given signature that is easy for the compiler to optimize and inline.

This presentation will go over the specification and implementation of `function_ref`, also covering potential future extensions.

Speakers
avatar for Vittorio Romeo

Vittorio Romeo

Software Engineer, Bloomberg
Vittorio Romeo (B.Sc. Computer Science) has been a Software Engineer at Bloomberg for more than 3 years, working on mission-critical company C++ infrastructure and providing Modern C++ training to hundreds of fellow employees.He began programming around the age of 8 and quickly became... Read More →


Wednesday May 8, 2019 16:30 - 18:00 MDT
Hudson Commons
  lecture
 
Thursday, May 9
 

09:00 MDT

C++20 in Breadth (not depth!)
Contracts and Concepts and Modules, oh my!

C++20 is now design-complete, with just one more meeting in July to finalize the last few parts. We can now see the shape of what will be the most significant update to the language since C++11, and maybe since C++98. With multiple features that would have qualified as THE headline feature of any other release, Alisdair Meredith will walk quickly through the range of features add to or changed in the language, highlighting the landscape of the new language. Note that libraries will be mentioned in passing, but would be the subject of a separate talk in their own right.

Speakers
AM

Alisdair Meredith

Alisdair Meredith is a software developer at BloombergLP in New York, and the C++ Standard Committee Library Working Group chair.He has been an active member of the C++ committee for just over a decade, and by a lucky co-incidence his first meeting was the kick-off meeting for the... Read More →


Thursday May 9, 2019 09:00 - 10:30 MDT
Hudson Commons
  lecture

09:00 MDT

If You Can't Open It, You Don't Own It
For the past 30 years, we have dealt with penetrations into secure systems almost exclusively from the software layer: applications and operating systems. With the advent of side channel attacks like Spectre, Meltdown and Foreshadow, hardware designs are now battlefields.

For C++ and Modern C++ engineers who run close to the hardware, whether they work in the embedded world or not, the implicit trust between our code and the hardware is absolute. In this talk, we'll look at how hardware has become the newest targets for the next generation of attackers and how that affects Modern C++ systems design. Then we'll see how hardware exploit strategies drive software exploit strategies in Modern C++.


We begin with a discussion of the concept of Roots of Trust and how each successive layer forms the Root of Trust for the layer above. But what are Roots of Trust and how can a failure at one level be used to create vulnerabilities in each successive layer? For Modern C++ systems, over reliance on the implicit trust of the layers below can spell disaster. But how does one layer protect itself against the broken trust of another?

Next, we'll see that side channel attacks are really a class of attacks that involve involuntary information disclosure. Spectre, Meltdown and Foreshadow are just one facet of those types of attacks. We'll look at how hardware side channel attacks that are run against hardware timing, current draw and memory all provide attackers invaluable information on the design and performance of a system. Then we'll see how these same types of attacks can be run against Modern C++ systems by profiling a running system.

We'll then discuss how having physical access to the hardware creates opportunities for attackers to design attacks that succeed at a distance. Physical penetrations range from probing data buses and pins to looking for emitted photons to tearing apart ICs. The exploitation of the hardware becomes the Achilles heal of the higher software layers because of their dependence in the hardware. But it also tells us something about the strategy for reverse engineering Modern C++ systems both in their behavior and their design. Understanding the strategies for reverse engineering software and source code shows us how to change our software designs and architectures to harden the target.

Finally, we'll discuss how hardware supply chains create opportunities for nation states to build in back doors for controlling systems at a distance. We'll see how Quality Assurance programs designed to catch tampering can be defeated by the careful selection of techniques and by simply playing the odds. We'll see how the strategies for testing are evolving to confront this new reality. And we'll look at how securing the supply chains of the future points us toward securing the supply chains in Modern C++, namely open source libraries.

Along the way, we'll see:

how C++ designers can defend against the failure of Root of Trust that's been in place for decades,
how software and hardware designs are changing to address these new threats,
how the compromises of the hardware supply chains mirror the compromises of the open source software industry, and
how the lessons learned in hardware exploitation affect the design of Modern C++ systems.

For C++ developers, understanding how the hardware layer can be compromised presents new challenges and has profound implications on the design and implementation of Modern C++ software systems.

Speakers
avatar for Matthew Butler

Matthew Butler

Laurel Lye Consulting
Matthew Butler has spent the last three decades as a systems architect and software engineer developing systems for network security, law enforcement and the military. He primarily works in signals intelligence using C, C++ and Modern C++ to build systems running on hardware platforms... Read More →


Thursday May 9, 2019 09:00 - 10:30 MDT
Bethe
  lecture

09:00 MDT

Trivially Relocatable
At C++Now 2018, Arthur presented three candidates for "The Best Type Trait C++ Doesn't Have." One of these candidates was `is_trivially_relocatable<T>`, as seen in popular third-party libraries such as Folly, BSL, and EASTL. In the past twelve months, Arthur has implemented `__is_trivially_relocatable(T)` in a branch of Clang, made it available on Godbolt Compiler Explorer, and written it up in a proposal targeting the C++2b standard — P1144 "Object relocation in terms of move plus destroy."

In this talk, we'll explain again what "relocation" is and why it's important. (It's the operation consisting of a move-construction and a destruction which is the backbone of vector reallocation, type-erased move-construction, and swap.) We'll explain five common library optimizations that are today applied conservatively only to "trivially copyable" types such as `int*`, and show that they can be applied just as well to "trivially relocatable" types such as `unique_ptr<int>`. Time permitting, we may show benchmarks similar to last year's 3x speedup on `vector::resize`.

Most importantly, Arthur will list several things that P1144 object relocation is NOT, and explain each of them briefly, with examples. P1144 object relocation is NOT N4158 "Destructive Move" (Pablo Halpern, 2014): We'll briefly explain N4158's mechanism and its rejection by the Committee, then show how P1144 addresses those problems. P1144 object relocation is NOT data-structure-level "position-independence" or "persistability": Arthur will explain why he believes P1144 doesn't get C++ any closer to foolproof position-independent data structures. P1144 "trivially relocatable" is NOT Itanium's "trivial for purposes of ABI" attribute: Arthur will explain why they're orthogonal.

Finally, we'll discuss open design issues. There are three reasonable syntax proposals, currently named [[trivially_relocatable]], [[maybe_trivially_relocatable]], and [[trivially_relocatable(bool)]]; we'll compare examples of library code using each of these syntaxes. We'll ask what we ought to require of a trivially relocatable type's copy constructor and assignment operators. And we'll relate P1144's object-lifetime issues to P0593 "Implicit creation of objects for low-level object manipulation."

Speakers
avatar for Arthur O'Dwyer

Arthur O'Dwyer

C++ Trainer
Arthur O'Dwyer is the author of "Mastering the C++17 STL" (Packt 2017) and of professional training courses such as "Intro to C++," "Classic STL: Algorithms, Containers, Iterators," and "The STL From Scratch." (Ask me about training your new hires!) Arthur is occasionally active on... Read More →


Thursday May 9, 2019 09:00 - 10:30 MDT
Flug Auditorium
  lecture

11:00 MDT

Experiences in Teaching Modern C++ to Beginners
The Principles of Programming in C++ course at Arizona State University (CSE100) has been taught for many years, and is aimed mostly at freshmen who are majors in electrical or biomedical engineering. Most people taking it have no experience in programming whatsoever. However, CSE100 has not been updated beyond C++98, and thus suffers from not being able to use many concepts beyond then. In the fall 2018 and spring 2019 semesters, I was able to teach it in a way that I would consider useful for "modern C++", namely some concepts from C++11, C++14, and C++17. In this talk, I elaborate on my experiences and methodologies from both semesters, and offer insights for future educators and communicators of C++ in how to approach bringing C++ programming more into the modern spotlight.

Speakers
avatar for Ryan Dougherty

Ryan Dougherty

Ph.D. Candidate, Arizona State University
Ryan Dougherty is a Ph.D. candidate in Computer Science at Arizona State University, and is interested in applications of mathematical techniques to solve real-world problems in CS. Additionally, he has taught a variety of courses at ASU, from introductory programming, to theoretical... Read More →



Thursday May 9, 2019 11:00 - 11:45 MDT
Hudson Commons
  lecture

11:00 MDT

Algorithm Intuition
Data structure intuition is something that develops naturally for most software developers. In all languages, we rely heavily on standard containers and collections. Need fast insertion/lookup? Hashmap. Need a sorted data structure that stores unique values? Set. Duplicate values? Multiset. And so on.

However, most software developers don't develop algorithm intuition quite as easily. Algorithms aren't taught as widely as data structures are, and aren't relied on as heavily. This talk aims to introduce some STL algorithms, show how they are commonly used, and show how by developing intuition about them (+ a little help from lambdas), you can unlock their true potential.

Speakers
avatar for Conor Hoekstra

Conor Hoekstra

Senior Library Software Engineer, NVIDIA
Conor is a Senior Library Software Engineer at NVIDIA working on the RAPIDS team. He is extremely passionate about programming languages, algorithms and beautiful code. He is the founder and organizer of the Programming Languages Virtual Meetup and he has a YouTube channel... Read More →


Thursday May 9, 2019 11:00 - 12:30 MDT
Flug Auditorium

11:00 MDT

The Impact of Compilers, O/Ses and Mitigations for Spectre & Meltdown upon a Low-Latency Trading System.
High-Frequency Trading (HFT) and low-latency trading are a major preserve of C++. The fact that it is amenable to extensive optimisation, including micro-optimisations, has made C++ highly effective. Moreover C++ can be very low-level to these micro-optimisations can make use of the specific machine architecture. Also the impact the O/S upon such performance-critical systems will be investigated.

This updated talk has results from some of the latest versions of G++ and Clang on Gentoo!

This talk shall investigate the use of micro-optimisations, initially via the generated assembly from versions of g++, clang and icc, then the performance of the micro-benchmarks will be investigated. These micro-optimisations will be brought together into a simple yet extremely fast FIX-to-MIT/BIT trading system for which various factors that could affect the performance shall be presented. Initially the impact of the compiler shall be analysed then affect of the O/S upon the performance of this trading system (with surprising and hopefully informative results!), followed by the affect of changing hardware. Finally the impact of the mitigations for Spectre and Meltdown shall be investigated with respect to various O/Ses - which may appear to contradict the currently-propounded beliefs of some major organisations.

The conclusion shall extract considerations that I consider key to the development of highly micro-optimised software.

Speakers
avatar for Jason McGuiness

Jason McGuiness

Director, Count-Zero Ltd
Jason is a contract programmer in C++ on Linux. His 15 years experience spans: initially a nuclear physicist then programming prototype super-computers, but now in finance; focussing on low-latency and HFT software, their architectures and the issues arising from them. He is also... Read More →



Thursday May 9, 2019 11:00 - 12:30 MDT
Bethe
  lecture

11:50 MDT

The ABI challenge
As there is an increasing number of C++ versions in production use, the challenge of making all of one's object files and libraries ABI compatible has become more urgent. It has always been important given the C++ build model, but increasingly users run into actual errors caused by this. This talk will explain how library developers can make ABI compatibility mistakes less likely to cause silent memory corruption, and more likely to cause link errors. Additionally it will talk about how library users can help. It will also touch on the importance of having build systems and tool chains that are aware of ABI compatibility.

Speakers
avatar for Arvid Norberg

Arvid Norberg

Software Engineer, Blockstream
distributed systems and bitcoin


Thursday May 9, 2019 11:50 - 12:35 MDT
Hudson Commons
  lecture

14:30 MDT

Identifying Monoids: Exploiting Compositional Structure in Code
Composition is the essence of code architecture, and monoids are a powerful and
underappreciated compositional pattern that is lurking in code of all kinds.
Identifying and exploiting monoids is perhaps the best way to improve our code's
large-scale architecture, in the same way that recognizing algorithms and
replacing raw loops is a great way to improve small-scale architecture.

When we start looking for monoids, we find that they are everywhere, and it's
not just about std::accumulate with addition! In this talk I want to develop an
intuition for recognizing this ubiquitous design pattern. I will show some ways
to think about code capabilities at a higher level, and how thinking in terms of
monoids can help us with things like API design, incremental computation,
evolving system state and distributing work. Along the way we'll also look at
how C++ language and library features can support putting monoids to work in our
code.

Speakers
avatar for Ben Deane

Ben Deane

Quantlab
Ben was in the game industry for 23 years, at companies like EA and Blizzard. For the last couple of years he's been working in the finance industry at Quantlab. He's always looking for useful new techniques in C++, and he geeks out on algorithms, APIs, types and functional progr... Read More →


Thursday May 9, 2019 14:30 - 16:00 MDT
Flug Auditorium
  lecture

14:30 MDT

Pattern Matching: Match Me If You Can
Pattern matching provides a declarative approach to perform structured inspection on
complex data types. It’s a very powerful abstraction provided by many programming
languages such as Haskell and OCaml, and more recently, Rust, Scala, and Swift.

In this talk, we’ll discuss a proposal in flight (https://wg21.link/p1371) to add pattern
matching as a language feature in the C++. We’ll discuss why pattern matching is more
relevant today to C++ than ever before, many examples of how pattern matching simplifies
the structure of code, and discuss the details of the concrete features being proposed.

The goal of the talk is to communicate the state of an early proposal and gather feedback.

Speakers
avatar for Michael Park

Michael Park

Software Engineer, Facebook
I'm a software engineer at Facebook, working on the C++ libraries and standards team. My focus for C++ is to introduce pattern matching to facilitate better code.


Thursday May 9, 2019 14:30 - 16:00 MDT
Hudson Commons
  lecture

14:30 MDT

The Ongoing Saga of ISO-C++ Executors
One of the largest and widest-reaching library design efforts undertaken by the ISO-C++ standard committee in recent years is the proposal of a generic abstraction for execution, known as an executor. Dating back to at least 2012, the effort to design an executors library for standard C++ has come to a head recently with its inclusion in the list of priorities for the C++20/23 timeframe. The effort to construct a concept-driven design that meets the needs of vastly different domains with vastly different approaches to execution and vastly different needs is one of the most ambitious generic programming exercises of its kind ever. In the past year in particular, the executors design effort has undergone significant changes to accommodate the needs of yet another domain and yet another perspective on execution. The authors of the proposals have had to invent new mechanisms for expressing the vast outer product of behaviors, semantics, performance hints, and other properties of executors in generic contexts.

While very few (if any) design efforts require the level of genericness and customizability that executor standardization demands, many of the lessons learned from the ongoing saga of executor design can be applied to any generic programming project. In addition to an update on the progress of ISO-C++ executors and a history of the design effort, this talk presents a discussion of the general principles of concept-driven design that can be extracted from the executors experience thus far. Additionally, this presentations goes into detail on the latest design iterations and outlook for executors, futures, and other concurrent programming abstractions in C++23 and beyond.

Speakers
avatar for David Hollman

David Hollman

Senior Member of Technical Staff, Sandia National Labs
Dr. David S. Hollman has been involved in the ISO-C++ standard committee since 2016. He has been a part of a number of different papers in that time, including `mdspan`, `atomic_ref`, and—most prominently—executors and futures. Since finishing his Ph.D. in computational quantum... Read More →


Thursday May 9, 2019 14:30 - 16:00 MDT
Bethe
  lecture

16:30 MDT

An Alternate Smart Pointer Hierarchy
C++ offers two-ish smart pointer types, std::unique_ptr<> and std::shared_ptr<>, with their own advantages and disadvantages. But what if these didn't exist, and your company wanted to create smart pointers to capture ownership semantics? Pure Storage had to create smart pointers for ourselves in 2009, and we rarely use the C++ smart pointers. I will discuss the semantics of our smart pointers: owned<> and delete_ptr<>, the conventions we have regarding them, and how they differ from C++'s offerings. owned<> has some advantages over unique and shared pointer, including the fact that changing from single ownership to multiple ownership doesn't change the name of the type, unlike unique -> shared.

We have additional derivations from the basic owned<> type that express ownership but also separate the view of the data from the ownership; this also has similarities to how the C++ smart pointers allow for a Deleter that is separate from the specified pointer type.

Speakers
avatar for Matthew Fleming

Matthew Fleming

Software Engineer, Pure Storage
I've been working in systems software for almost 20 years now, mostly on virtual memory and filesystems, in both C and C++. I tend to find myself gravitating lower and lower in the stack, to code primitives, library helpers, and getting very close to the hardware.


Thursday May 9, 2019 16:30 - 18:00 MDT
Bethe
  lecture

16:30 MDT

Points of Order
With C++20, orderings are finally getting a first-class post in the language. What are orderings, though? What are the basic best practices around them? What are they useful for? Where do they come from? What kinds are there? What do they represent? How do they play together? What are the representations of orderings? Is the current implementation so broken we'll just throw it out?

This talk will try to answer the above with a principled approach that explains both the mathematics of orderings and how we got where we currently are in the standard. It is the hope of the presenter to poke the audience enough to foster a discussion about missing features in the C++20 proposal, so that defects can hopefully be identified before C++20 ships.

The author is a co-author of quite a few committee papers on ordering, who has, in addition, worked with Alex Stepanov enough to have argued about ordering with him. This talk tries to illuminate the reasons for default ordering to be included in Regular in Elements of Programming, and the way the idea evolved to its current manifestation. This talk endeavors to be your definitive talk about the background of operator⇔.

Alternative aim: the talk wants to be necessary viewing on youtube. If you want your heckling to be heard, you should come. The presenter will be most pleased.

Speakers
avatar for Gašper Ažman

Gašper Ažman

SDE R&D, Citadel Securities


Thursday May 9, 2019 16:30 - 18:00 MDT
Hudson Commons
  lecture

16:30 MDT

The View from a C++ Standard Library Implementor
Implementing the C++ standard library is both similar to writing a boost library and yet quite different. In this talk, I'll lead off with what are some of the challenges that a standard library implementor faces, as well as the advantages that one has.

Then, I'll apply the principles to the task of maintaining/improving a boost library, and note where the similarities and differences lie. Many of the motivations (stability, portability, etc) are almost exactly the same.

I'll also talk about balancing the needs of different "customers"; people who use the standard library in different ways, and what you can do to keep all (most?) of them happy.

Speakers
avatar for Marshall Clow

Marshall Clow

Principal Engineer, CPPAlliance
Marshall has been programming professionally for 35 years. He is the author of Boost.Algorithm, and has been a contributor to Boost for more than 15 years. He is the chairman of the Library working group of the C++ standard committee. He is the lead developer for libc++, the C++ standard... Read More →


Thursday May 9, 2019 16:30 - 18:00 MDT
Flug Auditorium
  lecture
 
Friday, May 10
 

09:00 MDT

Taking the Plunge Towards CMake in Boost
CMake is a cross-platform build system that is used by a large portion of the open source C++ community, yet Boost still uses a build system that is largely unknown. No doubt, transitioning to CMake will help make Boost more accessible and bring in a larger community of support. Its time for Boost to take the plunge.

In this talk, we will discuss the different needs of users for CMake in Boost, the structure of CMake scripts to support such users, a look at Boost CMake modules to help improve CMake build scripts, and a migration path to move to CMake.

Speakers
avatar for Paul Fultz II

Paul Fultz II

Software Engineer, AMD


Friday May 10, 2019 09:00 - 10:30 MDT
Bethe
  lecture

09:00 MDT

The Many Variants of std::variant
There was (and still is) much controversy around the discriminated union variant type included in C++17. This talk is a first hand account of the process as well as the details of the various design deliberations and tradeoffs that were made to achieve consensus. It will get into both the performance and usability considerations that were debated, as well as some speculation as to where the C++ committee might like to take it in the future.

Speakers
avatar for Nevin Liber

Nevin Liber

Computer Scientist, Argonne National Laboratory
Nevin ":-)" Liber is a C++ Committee member and a veteran C++ developer, having first discovered the language over three decades ago while at Bell Labs. His professional career has taken him from operating systems to embedded systems, and from low latency trading platforms to analyzing... Read More →


Friday May 10, 2019 09:00 - 10:30 MDT
Flug Auditorium
  lecture

11:00 MDT

Exceptions Demystified
Exception Handling is probably one of the most controversial features in C++, with many code bases outright banning them from the start, or only allowing their use in very specific cases. The reasons for this are often unclear and founded on premises that are not well understood.

In this talk, we will explain exception handling from the bottom up, taking a close look at what a compiler actually has to do to implement the mechanism. Instead of focusing on a specific implementation, we will approach the problem from a more abstract, language-design point of view, allowing us to explore the different approaches an implementation could choose. In the end, we will gain a deeper understanding for the problems associated with the feature and how they could be mitigated in the future by alternative language features like the proposed static exceptions.

Speakers
avatar for Andreas Weis

Andreas Weis

BMW AG
Andreas Weis has been writing C++ code in many different domains, from real-time graphics, to distributed applications, to embedded systems. As a library writer by nature, he enjoys writing portable code and exposing complex functionalities through simple, richly-typed interfaces... Read More →


Friday May 10, 2019 11:00 - 12:30 MDT
Hudson Commons
  lecture