Having been back from CppCon 2019 for
over a week, I thought it was about time I wrote up my trip report.
The venue
This year, CppCon was at a new venue: the Gaylord Rockies Resort near Denver,
Colorado, USA. This is a huge conference centre, currently surrounded by vast
tracts of empty space, though people told me there were many plans for
developing the surrounding area.
There were hosting multiple conferences and events alongside CppCon; it was
quite amusing to emerge from the conference rooms and find oneself surrounded by
people in ballgowns and fancy evening wear for an event in the nearby ballroom!
There were a choice of eating establishments, but they all had one thing in
common: they were overpriced, taking advantage of the captured nature of the
hotel clientelle. The food was reasonably nice though.
The size of the venue did make for a fair amount of walking around between
sessions.
Overall the venue was nice, and the staff were friendly and helpful.
Pre-conference Workshop
I ran a 2-day pre-conference class, entitled More Concurrent Thinking in C++:
Beyond the Basics, which was
for those looking to move beyond the basics of threads and locks to the next
level: high level library and application design, as well as lock-free
programming with atomics. This was well attended, and I had interesting
discussions with people over lunch and in the evening.
If you would like to book this course for your company, please see
my training page.
The main conference
Bjarne Stroustrup kicked off the main conference with his presentation on
"C++20: C++ at 40". Bjarne again reiterated his vision for C++, and outlined
some of the many nice language and library features we have to make development
easier, and code clearer and less error-prone.
Matt Godbolt's presentation on "Compiler Explorer: Behind the Scenes" was good
and entertaining. Matt showed how he'd evolved Compiler Explorer from a simple
script to the current website, and demonstrated some nifty things about it along
the way, including features you might not have known about such as the LLVM
instruction cost view, or the new "run your code" facility.
In "If You Can't Open It, You Don't Own It", Matt Butler talked about security
and trust, and how bad things can happen if something you trust is
compromised. Mostly this was obvious if you thought about it, but not something
we necessarily do think about, so it was nice to be reminded, especially with
the concrete examples. His advice on what we can do to build more secure
systems, and existing and proposed C++ features that help was also good.
Barbara Geller and Ansel Sermersheim made an enthusiastic duo presenting "High
performance graphics and text rendering on the GPU for any C++ application". I
am excited about the potential for their Copperspice wrapper for the
Vulkan rendering library: rendering 3D graphics portably is hard, and text more
so.
Andrew Sutton's presentation on "Reflections: Compile-time Introspection of
Source Code" was an interesting end to Monday. There is a lot of scope for
eliminating boilerplate if we can use reflection, so it is good to see the
progress being made on it.
Tuesday morning began with a scary question posed by Michael Wong, Paul McKenney
and Maged Michael: "Will Your Code Survive the Attack of the Zombie Pointers?"
Currently, if you delete
an object or call free
then all copies of those
pointers immediately become invalid across all threads. Since invalid pointers
can't even be compared, this can result in zombies eating your brains. Michael,
Paul and Maged looked at what we can do in our code to avoid this, and what they
are proposing for the C++ Standard to fix the problem.
Andrei Alexandrescu's presentation
on
"Speed is found in the minds of people" was
an insightful look at optimizing sort
. Andrei showed how compiler and
processor features mean that performance can be counter-intuitive, and code with
a higher algorithmic complexity can run faster in the right conditions. Always
use infinite loops (except for most cases).
I love the interactive slides in Hana Dusikova's
presentation
"A State of Compile Time Regular Expressions". She
is pushing the boundaries of compile-time coding to make our code perform better
at runtime. std::regex
can be slow compared to other regular expression
libraries, but ctre
can be much better. I am excited to see how this can be
extended to compile-time parsing of other DSLs.
In
"Applied WebAssembly: Compiling and Running C++ in Your Web Browser",
Ben Smith showed the use of WebAssembly as a target to allow you to write
high-performance C++ code that will run in a suitable web browser on any
platform, much like the "Write once, run anywhere" promise of Java. I am interested
to see where this can lead.
Samy Al Bahra and Paul Khuong presented the final session I attended: "Abusing
Your Memory Model for Fun and Profit". They discussed how they have written code
that relies on the stronger memory ordering requirements imposed by X86 CPUs
over and above the standard C++ memory model in order to write high-performance
concurrent data structures. I am intrigued to see if any of their techniques can
be used in a portable fashion, or used to
improve Just::Thread Pro.
Whiteboard code
This year there were a few whiteboards around the conference area for people to
use for impromptu discussions. One of them had a challenge written on it:
"Can you write a requires
expression that ensures a class has a member
function with a specified signature?"
This led to a lot of discussion, which Arthur
O'Dwyer
wrote up as a blog post. Though
the premise of the question is wrong (we shouldn't want to constrain on such
specifics), it was fun, interesting and enlightening trying to think how one
might do it — it allows you to explore the corner cases of the language in
ways that might turn out to be useful later.
My presentation
As well as the workshop, I presented a talk on "Concurrency in C++20 and beyond",
which was on Tuesday afternoon. It was in an intermediate-sized room, and I
believe was well attended, though it was hard to see the audience with the
bright stage lighting. There were a number of interesting questions from the
audience addressing the issues raised in my presentation, which is always good,
though the acoustics did make it hard to hear some of them.
Slides are
available
here.
~trip_report()
So that was an overview of another awesome CppCon. I love the in-person
interactions with so many people involved in using C++ for such a wide variety
of things. Everyone has their own perspective, and I always learn something.
The videos are being uploaded incrementally to
the CppCon YouTube channel, so
hopefully the video of my presentation and the ones above that aren't already
available will be uploaded soon.
Posted by Anthony Williams
[/ news /] permanent link
Tags: conferences, C++, cppcon, ccia, book, workshop, slides
Stumble It!
| Submit to Reddit
| Submit to DZone 
Comment on this post
Follow me on Twitter