Hacker Newsnew | past | comments | ask | show | jobs | submit | cordenr's commentslogin

RAII is so before 2020s! Now it's SBRM*

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


Sorry for being pedantic and possibly ruining the joke: SBRM is actually a subset of RAII because it only applies to automatic variables (hence "scope bound").


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...


Yeah I kind of thought it was something like that, but searching for such broad terms got me nowhere, and the googletest documentation wasn't good enough for me to find it.


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?


Only reason I can think of is that conditional breakpoints in the debugger can be much slower than compiling that same condition right into the debuggee.


If the CPU doesn't support conditional hardware breakpoints, some do.


The only reason is that many still don't learn how to use debuggers, people write blog posts about language featuritis, rewrite X in Y, and then keep using debuggers as if stuck in the 1960's.


grandparent is not advocating making it unconditional, but just adding the nop instruction to the __asm part.

Inserting an unconditional debug trap into a shipping, production executable, is a complete nonstarter. The program will receive a signal that is fatal, if unhandled.


The rationale is explained in the article; it's for speed.


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.


Hmm... interesting. Spain should be covered by GDPR so you should be able to say "I reject right to process my personal data" and it should stop...

I had issue with Vodafone here - they were pestering me with calls/messages... even after I switched to Digi they were calling me for a week to try to convince me to stay (it just confirmed my decission to switch ;) )


There's quite a few videos.... Can you link to the specific one your thinking of? Cheers.


I'd guess that they are referring to this video by Ars Technica https://youtu.be/izxXGuVL21o


>You can type 84 words per minute

(After a few attempts)

I self learned to type using "Iankey"[0] (the manual[1]). In my opinion, it is one of the best training tools I tried - I should search around my old backups to see if I can still find it.

[0] https://www.computinghistory.org.uk/det/68105/Iankey/ [1] https://www.habisoft.com/pcwwiki/lib/exe/fetch.php?media=apl...


It seems to have been preserved here with a download link https://www.habisoft.com/pcwwiki/doku.php?id=en:aplicaciones...

Somebody also uploaded it to archive.org: https://archive.org/details/IanKey-Crash-Course-on-Typing-v3...


+1

The "fully charged show" sometimes have videos on this and similar topics. This [0] video goes through the pros and cons of using hydrogen in different ways

My takeaway is that as much of the energy as possible should be used without converting it. This avoids the substantial losses converting to and from hydrogen. But storage is one of the viable uses.

[0] https://youtu.be/MgmBkvrO0Dg?si=8c-y3naRRH65O4Lb


Andreas Weis gave a talk at cppnow [0] describing how they develop software for cars. It's eye opening.

I would imagine all languages will have at least some guidelines relating to how they're used.

[0] https://youtu.be/mUFRDsgjBrE?si=KxEpoStcuvtxYFdg


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.


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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: