Job Title: Sarcastic Architect
Hobbies: Thinking Aloud, Arguing with Managers, Annoying HRs,
Calling a Spade a Spade, Keeping Tongue in Cheek
I’m back from #CPPCON2017 now, and can report on the last day of it.
First (and IMO foremost <wink />), there was my own talk on “Eight Ways to Handle Non-blocking Returns in Message-passing Programs: from C++98 via C++11 to C++20”. Not sure whether it was exciting enough (and 3 or 4 people left the talk <sad-face />), but overall – hopefully it wasn’t too bad. I’ll try to publish slides+transcript of the talk tomorrow.
Then, there was an interesting talk by Juan Arrieta, “Traveling the Solar System with C++: Programming Rocket Science” (oops, apparently it was so exciting, that I didn’t make any pictures of it). Apart from an exciting historical lecture (including human computers in JPL), the most interesting part was about advantages of C++ over Fortran in scientific apps. In particular – C++ templates allow to write generalized functions working with any type easily, and types can include complex – which, in turn, allows to calculate derivatives without a risk of catastrophic cancellation (for further details – make sure to watch the talk when it becomes available on YouTube).
Then, there was a talk by Yu Qi, “Compile-time reflection, Serialization and ORM Examples”.
My personal takeouts out of it: (a) for the time being, serialization with boost::hana and/or boost:fusion is possible, but boy, it is both ugly and cumbersome. (b) let’s root for real static reflection in C++20.
The next talk was “Unbolting the Compiler’s Lid: What Has My Compiler Done for Me Lately?” by Matt Godbolt. IMO, another MUST watch. Not only because it is a talk by the guy-who-has-wrote-and-is-working-on Compiler Explorer, but also because the talk demonstrates how smart modern compilers are. On the following slide – there is one of the most exciting optimizations shown: the compiler replaces the whole loop-counting-number-of-bits-set with a single x86 instruction POPCNT (while I know about POPCNT for like 20 years, I didn’t know that modern compilers are smart enough to do this kind of optimizations).
Also – make sure to visit Compiler Explorer to see optimizations which different compilers with different settings can do for your code.
And the last (but certainly not least) talk I attended on CPPCON2017, was the one by Nathan Sidwell, on “Implementing C++ Modules in G++”. Very briefly, my takeouts out of it:
- modules rock! The main advantage is that we’ll get another long-overdue layer of abstraction (and encapsulation(!)) on top of classes.
- Well, modules will rock when we have them
- which is going to take a while <sigh />
[η»ε:Tired hare:]This concludes an exciting week on CPPCON2017. I have learned a lot (yes, apparently it is possible to teach an old rabbit new tricks <wink />) – and overall, IMO C++ does move ahead, and I tend to like new stuff much better than quite a few of the changes made between C++03 and C++17 (hey, I’d wish they did static reflection, modules, and metaprogramming, ahead of lambdas <wink />).