Meeting 5 October 2017
CppCon 2017 Trip Reports
- Matt Godbolt
- Ben Deane
- Charles L. Wilcox
- Eva Conti: A Beginner’s Guide to CPPCon 2017
- Oliver Smith aka kfsone
- Quentin Duval
- Tim van Deurzen: CppCon 2017 For Fun and Profit
- Viktor Kirilov
Bjarne Stroustrup - Learning and Teaching Modern C++ (follow-up)
CppCon 2017: Herb Sutter - Meta: Thoughts on generative C++
- P0515 Consistent Comparison (spaceship operator)
- Still calls them “metaclasses”
- Tries hard to justify metaclasses: “this is something people already do, it’s just hard”
- Reflection: P0385, P0194, P0578, P0670, P0590, P0598
- Compile-time code: P0633, P0425, P0595-8, P0031, P0202, P0639, P0712
- Constexpr: P0202, P0597, P0639
- Metaclasses: P0707, P0712, P0589-P0590
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.
C++ community Slack server
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
Using MinGW and Cygwin with Visual C++
- Post
- Video
- Requires Visual Studio 15.3 Preview 4.
STL’s MinGW 15.2
Why is the std::function
operator()
const
?
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
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
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
andweak_ptr
: potential memory overheadenable_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)
Based on printers (GPL)
llvm::Expected
- GitHub (LLVM licence)
- Article 1: Basics
- Article 2: Differentiation
- Uses
llvm::ErrorInfo
instead of a template parameter error type - Unchecked
llvm::Error
objects abort program on destruction
liberasure
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”
- Concept-Model Idiom Part One: A new look at polymorphism
- Reddit discussion
- Virtual Concepts (GitHub): A research project aimed at introducing language support for type erasure in C++
- std-proposals discussion (Andy Prowl, with feedback from Brittany Friedman, whom he keeps calling “Brent”)
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.
- Home
- Demo
- Download v1.0.1
- GitHub
- Licence: BSD 2-Clause
C++17 class template argument deduction
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.