Pacific++ is the first programming language conference I've been to, and I have to say that actually being there is a big step up from just watching videos on youtube. The conference was small and intimate, which was great. I think I probably managed to talk to nearly half of the about 70 attendees. We got mugs
I've been building a toolchain for our internal use so that we're able to make use of the new coroutines features that shipped with clang 5. I'd kind of expected this to be a short term thing so hadn't put too much effort into it, so it was interesting to learn that Google actually do this weekly just using HEAD of master for all of their builds. Maybe tidying this up for long term use will be good.
One thing Chandler didn't talk about is how they distrubute the toolchain to developers, a problem I think we've solved quite well using docker. I think it's something that I should probably blog about.
Making use of the llvm linker (
-fuse-ld=lld, it's much faster) and the use of the link time optimiser (
-flto=thin) also looked worthwhile.
He also showed us the CFI sanitizer (
-fsanitize=cfi) which is designed to help harden your code in production (important for our networking code).
Chandler only needed four and half minutes to compile all of clang, but he did later admit that he was using a 128 core monster he has at home built especially to make clang builds fast.
Next up Toby Allsopp talked about coroutines (video). He gave a general high level overview of how they work and some of the things you can do with them, and most importantly, showed the benefits they bring in terms of code clarity. He has some great diagrams of the control flow through the coroutine and its calling function which would certainly help my tutorial articles. I'll be linking his from the introduction article once it's up on youtube.
Matt Bentley took us through his higher performance list implementation (video) which uses an allocation scheme that tries to keep list cells contiguous in memory as far as possible. It turns out that there are many places that the common wisdom of always just using a vector isn't the best for performance and he showed us places where list implementations (especially his) do win out.
Dean Michael Berris explained how XRay works, which is a tool for gathering performance data about the execution of your code, and is fast enough that it can be used in production systems with the data gathering turned on and off whilst the system is running.
This looks like a very interesting capability that is now included in newer versions of clang (and is yet another reason why building your toolchain is worthwhile).
Dean took us through the low level implementation details of how the instrumentation is turned on and off at runtime and why the overhead is so low. He also showed some of the (offline) analysis tools that come with XRay.
Right now it doesn't support shared objects (dynamic linking with .so files), but Dean promised me that was work in progress. Still more reason to stay as near to HEAD with llvm as possible—and, if whoever is working on it needs somebody to test it out then please let me know :)
The final talk was Christian Blume's about his transwarp library, which is able to build up a graph (acyclic tree only) of tasks with the dependencies and then execute it multiple times (the other approach is to build the tree for each group of tasks and then rip it down when they've executed).
It takes a very different approach to how this would look with coroutines or the ranges TS, which may be easier to work with where the dependancy graph is only known at runtime.
At the end of the time there was much lively discussion in the bar followed by the speaker's dinner which I'd decided to pay the extra for given that I was there on my own and figured it would be a good opportunity to talk to more people (spoiler, it was well worth it).
At the dinner Chandler came out with a very interesting rant on the difficulties compilers have with user defined literals, especially for compile string handling of the type I've been playing around with in f5-cord's
tstringclass — Oops, and somethingh I'll have to think more about. Not only are there parsing problems with them, but more importantly, compile time substring processing is especially costly in terms of compile times (thankfully not something I care about).
The second day started off with Jason Turner (video) telling us about the importance of
noexcept. I'd always not worried too much about it because I thought that the overhead of having to manage the terminate condition mandated in the standard would negate any possible code generation improvements. Jason managed to show that was categorically false, and even more importantly demonstrated many code improvements directly driven by trying to make things
noexcept that should be.
Carl Cook showed a number of techniques used by high frequency trading developers to reduce latency when trading. I've been watching a lot of high throughput videos by games developers and then applying those techniques to Postgres database designs, so it was interesting to see some low latency examples too. For some of the things we want to do latency can be important so now I need to think about how to apply these techniques to databases.
Wanting to implement state machines was a big reason for me to pick up coroutines, after watching Dominic Robinson's ACCU talk, so it was great to see what Nick Sarten had done through using
std::variant. He benchmarked a few different approaches, including one based on inheritance. This implementation, like a coroutine based one, performs a memory allocation on state change and the benchmarks showed just how expensive that would be. Something we're going to need to think a lot more about.
Sarah Smith is a much braver person than me clearly. I've done some live coding talks, but she built an entire application using Qt and then ran it on her desktop and phone (iOS, of course the Android had problems connecting to the dev environment, as they always do).
She also talked about her history and how she ended up a mobile developer and entrepreneur. I always love to hear stories about how people ended up where they are.
The final talk was Tom Isaacson showing how, what look like the same warnings, actually differ a lot between compilers and how that affects cross platform development. I don't switch warnings to errors because of the range of different compilers we use, but I can certainly see the appeal and it would be good to tighten this up and turn on more warnings. He showed some interesting ones that are not turned on by default.
This was my first C++ conference (actually, my first real tech conference), and it was well worth the trip. I've watched a lot of videos from other conferences, and although great, it's not anything like actually being there and getting to talk to people.
I think my next mission should be to make it to the ACCU conference in the UK.
I'll link the videos as they come online. If any other links are wrong, or could be better elsewhere please let me know. I've probably misunderstood what people were trying to say in their talks, mistakes are my own.