CPPCON Day #5. Miscellaneous

 
Author:  Follow: TwitterFacebook
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”.

Serialization with boost.hana

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).

Unbelievable optimization: C++ loop into x86 POPCNT

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 />).

Join our mailing list:

Comments

  1. OmariO says

    I promise to see“Eight Ways to Handle Non-blocking Returns in Message-passing Programs: from C++98 via C++11 to C++20” from the very beginning to the very end when it appears on youtube 🙂

    • "No Bugs" Hare says

      Well, it might be not the most exciting talk (unlike writing which I’m doing for like 20 years now, this is just my 3rd conference talk, so my presentation skills still require work; make sure not to expect anything like Scott Meyers or something ;-)). In any case – I will post slides+kinda-script here soon, so it will be another option if the talk looks too boring ;-).

    • "No Bugs" Hare says

      Well, with my formal education being rocket science (continuum mechanics in the context of rocket engines) – I didn’t have any chances to miss you talk ;-). More seriously, your talk provided a good insight on _objective_ advantages of C++ over Fortran for calculations – which is a thing I didn’t know before.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.