Recent submissions

Comment · 1 year ago
RAII is so before 2020s! Now it's SBRM*

*Scoped bound resource management... which I had to look up because I never remember it!

Comment · 1 year ago
In C++ they're alternative tokens and should be keywords, so maybe googletest is providing them as macros as workaround for a compile that didn't support this?

In other words, maybe a computer flag would allow you to disable them being defined?

Although this could result in other issues...

Comment · 2 years ago
Doesn't gdb allow breakpoints to be made to be conditional?

Add a breakpoint somewhere in the code, say added as breakpoint #2. Then;

    condition 2 (x_id == 153827)
Or is there some other reason to not do this?
Comment · 2 years ago
In Spain I get at least 4 or 5 calls a week from different providers.

Luckily at the moment, there's still a delay after you answer the call as (I assume) you're being connected to a human. How long will this last....?

Currently, when I don't hear a voice within 1s or so, I hang up. A legitimate caller will (hopefully) call back pretty quick.

Comment · 2 years ago
There's quite a few videos.... Can you link to the specific one your thinking of? Cheers.
Comment · 2 years ago
Comment · 2 years ago
Comment · 2 years ago
Comment · 2 years ago
SE/SE is called out explicitly in the ISO26262 documents (functional safety in road vehicles). This makes it easy to defend the inclusion of such a guideline, even if you may not agree with it.

But as it happens, MISRA C++:2023 doesn't have this guideline.

Comment · 2 years ago
Definitely a generalisation, but i would see them as two sides of the same coin.

If Cert has something about an API, then it will have an example of misuse of it and then an example showing its correct use.

MISRA might either prohibit it's use completely (if there's a safe alternative), or with require some boilerplate step be taken every time the API is used.

Comment · 2 years ago
It's an unfortunate coincidence. 2023 just happens to be when the MISRA committee finalised the document.

The good news is that it's very unlikely to happen for any future document version.

Comment · 3 years ago
They seem to use a similar model to low cost airlines. Depending on when you travel and when you buy the ticket, the price varies dramatically.

I recently travelled midweek from Lleida to Madrid return for €40, but I've also paid more than €100 for the same when traveling around the weekend.

Comment · 4 years ago
NB: TrueSound requires an iPhone, it doesn't work in the Android app.

I had to have a friend run the setup for me.

I didn't read/notice this when I researched soundbar options. Had I known this in advance I probably wouldn't have selected it.

Comment · 5 years ago
You're right! That's the thing with C++ - you learn something new everyday.

I had misread your original post. I thought the example was something like "std::cout << 97".

This is unfortunate. I imagine it came about when "cstdint" was introduced. Fixing it would require a break in compatibility with any existing code that "expected" that all char types printed a character, rather than value.

Comment · 5 years ago
C++ is the language I use most for my day job. I am definitely on the "love" side of the "Marmite" argument.

What is scary is, I don't doubt that some people will read your comment and think it could be true!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton