Rainer Grimm writes tutorials on modern C++, covering C++20 features, concurrency, the Core Guidelines, and upcoming standards.
HN links it as a reference for C++ topics like thread-safe initialization, consteval, and coroutines.
> ..The node_modules package resolution algorithm is how JS does namespaces.. I wonder whether they got that right through sheer genius, or by accident.
I recall hearing Ryan Dahl's regrets about design decisions in Node.js, a few of which had to do with the module/package resolution algorithm.
10 Things I Regret about Node.js - https://www.youtube.com/watch?v=M3BM9TB-8yA
There are some good aspects of it though. I like how modules/packages are just imported objects (the path resolution is a bit weird and seemingly inefficient, i.e., checking every parent folder's node_modules folder). It goes together well, that modules are also self-contained function scopes by default (I suppose a kind of anonymous namespace), that exports a plain object with assigned properties.
---
Wow, I just learned about C++20 Modules, looks like a game-changing feature.
https://modernescpp.com/index.php/c-20-modules
> That's just a C# idiom
Not just C#, Python and JS also have it already. And async-await is the first time ever where I've thought that yes, this is a good way to do single-threaded async (event-queue-ish) or even multi-threaded things.
> Check POCO.
Thanks for the hint, I will check it out.
> but somehow you're complaining that C++'s interfaces require programmers to specify where the collections should start and finnish.
Take a look at: http://www.modernescpp.com/index.php/higher-order-functions
The c++ functions are unnecesarely verbose compared to other languages.
This
transform(vec.begin(), vec.end(), vec.begin(),[](int i){
return i*i;
});
could be much more readable as
vec.map([](int i){
return i*i;
});
Also makes for-of the better choice in my opinion because if you're going to write more code, I'd rather write code that is readable.
How do HFT developers actually achieve single-digit microsecond latency?
Why would you want to bypass the kernel?
Can C++ model semantic categories as elegantly as Haskell?
Can you actually get a job doing this stuff?
We'll cover all this stuff next Tuesday 6pm UK time - that's 1pm US East.
So bring your dinner (or lunch) and come ready with questions for
Antony Peacock: senior developer in low latency trading and technical expert on the ISO C++ committee
Rainer Grimm: Renowned C++ and Python trainer, author and mentor at Modernes C++[1]
Richard Hickling: Trading and risk technology expert and Co-Founder at ProfitView[2]
[1]: https://www.modernescpp.com/
[2]: https://profitview.net/
Having started using the Internet in the 90's, and thus still remembering Geocities-era websites, I loved that they did this as a webring (https://en.wikipedia.org/wiki/Webring): each blog post has a link to the next one, making a singly-linked circular list.
Starting with this one, we have:
- http://www.bfilipek.com/2018/04/deprecating-pointers.html
- http://www.modernescpp.com/index.php/no-new-new
- https://www.fluentcpp.com/2018/04/01/cpp-will-no-longer-have-pointers/
- https://blog.tartanllama.xyz/no-pointers/
- https://arne-mertz.de/2018/04/raw-pointers-are-gone/
And it circles back to this one.
Many. I like bashing C++ as much as the next dev, but modern C++ has nice type checks, interesting types/wrappers which help with common patterns (shared, unique ptrs, etc), and the compilers learned some great tricks which allow you to run memory safety checks yourself. (Asan and others)
Also multithreading gets some improvements which will take more of the manual sync details away from the business logic. (http://www.modernescpp.com/index.php/multithreading-in-c-17-and-c-20)
It's still delivered attached to a foot-gun, but you could do worse.
> Are compilers required to evaluate constexpr expressions at compile time, where possible?
No. But C++20 adds consteval, which does carry that requirement:
https://www.modernescpp.com/index.php/c-20-consteval-and-constinit
Well, sort of. It has to produce a constant expression, and in practice the way to do that is to evaluate it at compile-time. But under the as-if rule, a compiler can do what it likes, up to and including producing a binary containing your source code and a copy of gcc, and compiling your entire program when you run it.