Meeting C++ 2017 trip report

I was at Meeting C++ 2017 to give a talk and then relax while listening to other speakers. That didn’t go exactly as planned.

About 6 months ago, I sent the abstract of one of my submissions to CppCon to my colleague Jonathan Boccara for advice. A few messages in the discussion he asks “did you also submit for Meeting C++?” and I admitted the thought hadn’t crossed my mind. To me, speaking at one conference like CppCon was already a big step and it would be redundant to propose the same talk at two different conferences anyway.

Turns out I was dead wrong, because first of all the hardest part in a talk is giving it the first time at a conference. After that, it becomes easier and easier so it does actually amortize the cost of preparing it (that and you gain more confidence with experience).

Second, each conference has its own public and even if some do attend most/all of them, that’s clearly a minority. For the rest, it’s probably the only time they get to see you live on stage and can then talk in person.

There are also replays on YouTube but let’s be honest: watching talks takes time and we’re all busy. So by speaking at conference you give people a chance to watch talks they probably wouldn’t have otherwise.

Keynotes

Sean Parent’s “Better Code: Human interface”

Of course it began with Sean Parent, which I was very eager to meet in person. His talk about removing raw loops from your code is still one of my favourites and if you still haven’t watched it, stop wasting your time reading my blog and do so now. His keynote built upon a previous one from CppCon 2015 about relationships and the importance for us to learn to reason about them when we design software. One of the key takeaways was that user interactions define the way your code will be constructed much more that developers usually realize because the relationship between objects derives from that. One example was two linked toggle settings in a UI where setting one implies the other (but not the other way around). There are a couple of way to express that and more than one correct answer, but in a lot of applications no two will behave the same way.

Sean has put a lot of thinking into that and written a couple of academic paper with a researcher that you can find here. It’s odd to see that it took a C++ developer to work on a formal representation of UX specifications, especially since C++ is rarely seen as a front-end language.

Kate Gregory’s “It’s complicated!”

The second keynote was given by the great Kate Gregory who is really talented at engaging audiences. Her subject was simplicity. The fact that we always want things to be more simple, more expressive and more elegant. Verboseness in code is usually the sign of over-complicated design so we try to make things plain and unambiguous. As she pointed out, guidelines are usually no exception but that thinking can lead us astray. Software IS complicated. Abstractions ARE imperfect. So while we should try to KISS, guidelines can’t be oversimplified.

An example I found was Sean’s “No Raw Loops” that he put in his slides in his C++ Seasoning talk. That’s a good phrase on a presentation because it’s short and easy to process, but that’s a terrible guideline. If you make it one, you’ll end up with convoluted lambdas inside calls to std::for_each just to write a simple “multiply all values in this array by 2”. Sometimes there’s an algorithm you can use, sometimes you can make a new one, that’s great and should try to if that makes sense. But also sometimes you just want to mutate the content of a std::vector with a simple operation and that’s not so great as an algorithm.

As he puts it, it’s more suited as a goal:

There’s not one C++ Standard Guideline that directly says “No Raw Loops” but instead you can see the same idea in:

Wouter van Ooijen’s “What can C++ offer embedded, what can embedded offer C++?”

I’ll admit being less excited by the last keynote since embedded is not really my domain, but there were a couple of takeaways for me anyway and I thank Wouter for that.

The most important was the fact that there is actually a very wide range of technologies that are considered “embedded”, from the very specialized chips that control spaceships to the Raspberry Pi. While there are similarities between them, one could argue that a Pi is actually much closer to a mobile phone, a tablet or even a desktop PC than an Arianne flight control module.

It is therefore important to avoid broad generalities such as “you don’t use exceptions in embedded” because the constraints vary a lot from one kind to another. Some devices don’t have the space to store the full C++ runtime, while others come with a full Linux kernel and an X server.

Tracks

It would take me forever to discuss each talk I went to, especially since I could at most see 1/4 of all. Instead I’ll try to make a listing with some personal notes:

  • Practical C++17, in which Jason Turner rated all the new C++17 features he used in his project, ChaiScript. The results might very well surprise you, and I was especially astonished to see no mention of std::variant and std::optional. He apparently didn’t need (or like) them. Odd.
  • How C++ Debuggers Work, I already made the joke on Twitter but I’ll do it again: at some point in your life, your kids may ask you “how debuggers are made?”. You’ll be able to dodge the bullet here by directing them to Simon Brand’s talk which explains it all :)
  • C++ API & ABI versioning was obviously an exceptional talk delivered in a genius fashion and… All right, it was pretty close to the one I gave at CppCon, except I reworked the last part to discuss both semver and the “Live at Head” philosophy that was demonstrated at CppCon this year, because I think both can work, depending on your case. I’ll make a note to elaborate on that in a future post.
  • There is a new future was a nice overall presentation from Felix Petriconi about the state of futures in C++, covering both std::future, boost::future and the alternative Felix made with Sean Parent that you can find at http://stlab.cc/libraries/concurrency/.
  • Dealing with software dependencies showed that a young first timer like Kiki de Rooij can actually get a talk at Meeting C++ and I think that should inspire us all to try. Granted she got help from his colleague and co-presenter Peter Bindels but still, this is pretty darn impressive. The talk itself dealt with the difficult matter of code dependencies and how to break cycles. I’m not entirely sold on the automatic tool they proposed to find them (it could report false positives in otherwise sane codelines) but I’m a bit curious on how they achieved such speed. You can find the source there: https://github.com/tomtom-international/cpp-dependencies. And the talk itself makes a nice introduction to John Lakos’ three parts talk on “levelization”.
  • Modern CMake for modular design was a replacement I made at the last minute and it was pretty much the same as the CppCon version. Still the feedback was positive and I hope it will help the viewers.
  • Fun with (user-defined) attributes introduced me to a large panel of uses for C++11 attributes. From Jonathan Muller I learnt that 1/ [[nodiscard]] is awesome and 2/ you need an external tool (like clang parser) to actually make use of user defined attributes, at least until we get support for static reflection or metaclasses.
  • True parallelism with no concept of threads was an interesting exploration of cooperative multi processing without the use of coroutines. Afred Bratterud showed that he basically reimplemented a very similar concept without OS support, just by doing software call stack switching on x86. Sadly I missed the end since I had to prepare for the next session :(

Lightning talks

There were 3 slots for lightning talks on Saturday, plus the “secret bonus track”. Yes, Meeting C++ had a secret bonus lightning talk session. And it was pretty cool. And no I’m not going to spoil it, but the recordings will once they get published.

Anyway there were too many talks to summarize here so I’ll wait for the videos to be uploaded if I were you. Speaking of that, Jens announced that he expects to upload the keynotes and the lightning talks in the coming month, then take a well deserved break, and then publish the regular talks somewhere at the beginning of next year.