Meeting 18 April 2019
Compiler Explorer
C++ is doing well in the TIOBE Index
https://www.tiobe.com/tiobe-index/
This month C++ is back at position 3, swapping places with Python. This is certainly not because Python is in decline <...> It is just that C++ is also getting more and more popular. C++ is still far away from its popularity in the beginning of this century when it had a market share of more than 15%. <...> But now that the C++11, C++14 and C++17 standards are supported by the most important C++ compilers, i.e. GCC, Clang and Visual Studio, the popularity of C++ is reviving.
Energy Efficiency across Programming Languages
http://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf
HackerNews: https://news.ycombinator.com/item?id=15249289
- Energy: C, Rust, C++
- Time: C, Rust, C++
- Memory: Pascal, Go, C, Fortran, C++, Ada, Rust
Post-Kona mailing
Links
Select papers
- http://wg21.link/p1103r3 Merging modules
- http://wg21.link/p1485r0 Better keywords for the Coroutines TS
- http://wg21.link/p1185 <=> != ==
- http://wg21.link/P0052R10 Generic Scope Guard and RAII Wrapper for the Standard Library
- http://wg21.link/P1024r3 Usability Enhancements for std::span
- http://wg21.link/P1344R1 Pre/Post vs. Enspects/Exsures
Kona trip reports
Little-known C++: function-try-block
int foo() { throw std::runtime_error("oops..."); } int main() try { foo(); return 0; } catch (...) { return -1; }
int foo() { throw std::runtime_error("oops..."); } struct bar { bar() try : data(foo()) {} catch (std::exception const & e) { std::cout << e.what() << '\n'; } private: int data; }; int main() { bar b; }
libfacedetection
An open source library for face detection in images. The face detection speed can reach 1500FPS. The work is partly supported by the Science Foundation of Shenzhen (Government grant).
Your favorite C++ code?
www.reddit.com/r/cpp/comments/abcgci/your_favorite_c_code/
- Niels Lohmann's JSON library https://github.com/nlohmann/json (also Milo Yip's RapidJSON https://github.com/Tencent/rapidjson)
- Sol2 - Lua bindings https://github.com/ThePhD/sol2
- effolkronium/random https://github.com/effolkronium/random
- cereal - Serialization https://uscilab.github.io/cereal/
- ranges-v3, fmtlib, pybind11
- modm: a barebone embedded library generator https://modm.io/
- amgcl: C++ library for solving large sparse linear systems with algebraic multigrid method https://github.com/ddemidov/amgcl
- Blaze linear algebra library https://bitbucket.org/blaze-lib/blaze/wiki/Home
- CTRE https://github.com/hanickadot/compile-time-regular-expressions
- Crow: a C++ micro web framework inspired by Python Flask https://github.com/ipkn/crow
Micro-benchmarks
https://vorbrodt.blog/2019/03/18/micro-benchmarks/
- Google Benchmark https://github.com/google/benchmark
- Catch2 https://github.com/catchorg/Catch2
- Hayai https://github.com/nickbruun/hayai
- Celero https://github.com/DigitalInBlue/Celero
- Nonius https://github.com/libnonius/nonius
C++ iostreams: Unexpected but legal multithreaded behaviour
Microsoft SEAL
Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.
- Project page: https://www.microsoft.com/en-us/research/project/microsoft-seal
- Code: https://github.com/Microsoft/SEAL (MIT)
Homomorphic Encryption refers to a new type of encryption technology that allows computation to be performed directly on encrypted data, without requiring any decryption in the process. The results of the computations are encrypted, and can be revealed only by the owner of the secret key.
Little-known C++: operator auto
https://mariusbancila.ro/blog/2019/03/18/little-known-cpp-operator-auto/
struct foo { public: foo(int const d) : data{d} {} operator auto() {return data;} // there can be only one operator double() {return static_cast<double>(data);} private: int data; }; foo f{1}; int n = f; double d = f;