Meeting 5 October 2017

CppCon 2017 Trip Reports

Bjarne Stroustrup - Learning and Teaching Modern C++ (follow-up)

Reddit thread

CppCon 2017: Herb Sutter - Meta: Thoughts on generative C++

CppCon 2017: Titus Winters “C++ as a ‘Live at Head’ Language”

  • Software engineering is about resilience to change over time.
  • Semantic versioning (SemVer): x.y.z
  • As C++ code is distributed in source form, we should live at head.

Hyrum’s Law:

With a sufficient number of users of an API, it doesn’t matter what you promise in the contract, all observable behaviours of your system will be depended on by somebody.

Abseil.io

C++ community Slack server

https://cpplang.now.sh

C++, yay! Slack, boo.

Bartek Filipek’s mailing list

Subscribe and get:

  • C++17 Ref Card - one-page PDF with a concise description of all C++17 features
  • C++17 in Detail - 50-page PDF compiled from his recent blog series

Blog

Using MinGW and Cygwin with Visual C++

STL’s MinGW 15.2

Website

Why is the std::function operator() const?

Reddit

STL:

It’s indeed a Boost/TR1-era mistake that the LWG has recognized, although we can’t do anything about it.

Apple open-sourced the Darwin kernel

GitHub

XNU kernel is part of the Darwin operating system for use in OS X and iOS operating systems. XNU is an acronym for XNU is Not Unix. XNU is a hybrid kernel combining the Mach kernel developed at Carnegie Mellon University with components from FreeBSD and C++ API for writing drivers called IOKit. XNU runs on I386, X86_64 for both single processor and multi-processor configurations.

ComputeCpp for Windows

CodePlay announcement

ComputeCpp Community Edition is now available on Windows. This means it is now possible to develop SYCL applications using Windows and Visual Studio.

SYCL (pronounced ‘sickle’) is a royalty-free, cross-platform abstraction layer that builds on the underlying concepts, portability and efficiency of OpenCL that enables code for heterogeneous processors to be written in a “single-source” style using completely standard C++.

The Price of Shared Pointers

  • make_shared and weak_ptr: potential memory overhead
  • enable_shared_from_this
  • atomic_shared_ptr removed from C++11
  • MESI cache management protocol: Modified, Exclusive, Shared, Invalid
  • GotW 91
  • Audience didn’t agree with the presenter (quite rightly)

Stringify

A single-header-file library to pretty-print STL containers (implicitly GPL)

GitHub

Based on printers (GPL)

llvm::Expected

liberasure

GitHub

A no-dependencies C++ extensible type erasure library + lecture material.

static_any: a low-latency stack-based Boost.Any

A container for generic (as general) data type like boost.any. However:

  • It is ~10x faster than boost.any, mainly because there is no memory allocation
  • As it lies on the stack, it is cache-friendly, close to your other class attributes
  • There is a very small space overhead: a fixed overhead of 8 bytes

“Virtual concepts”

Ericsson’s CodeCompass

Open-source C, C++ and Java code navigator based on Clang/LLVM

Expression Template Library (ETL) 1.2

ETL is a header only library for C++ that provides vector and matrix classes with support for Expression Templates to perform very efficient operations on them.

At this time, the library support compile-time sized matrix and vector and runtime-sized matrix and vector with all element-wise operations implemented. It also supports 1D and 2D convolution, matrix multiplication (naive algorithm and Strassen) and FFT.

Orbit Profiler

Orbit is a standalone profiler and debugging tool for Windows. Its main purpose is to help developers understand and visualize the execution flow of a complex application. By giving a bird’s eye view of what is happening under the hood, Orbit gives the developer a deeper understanding of complex systems and allows to quickly find performance bottlenecks.

C++17 class template argument deduction

Article by Arne Mertz

Before C++17:

1std::pair<int, double> myPair1(22, 43.9);
2auto myPair2 = std::make_pair(22, 43.9);

Since C++17:

1std::pair myPair{22, 43.9};

Deduction guide:

1namespace std {
2    template<class T1, class T2>
3    pair(T1 const&, T2 const&) -> pair<T1, T2>;
4}

Quotes

David Leinweber:

Give someone a program, you frustrate them for a day; teach them how to program, you frustrate them for a lifetime.

Fred Brooks (unconfirmed):

What one programmer can do in one month, two programmers can do in two months.