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

Unsigned integer overflow is well defined, though. Not something that should be sanitized. A lot of code out there relies on it.


Ubsan is a misnomer here from a technical perspective. However overflow unsigned or not is unexpected in many cases. As such, sanitizing it (and many other hard to reason about behaviors) by default is great practice. For an example, when unsigned values are used to count, overflows from summing over 2**N often result in incorrect behavior. This may be incrementing or even counting beans.

One particularly famous example of a bug: https://projectzero.google/2023/01/exploiting-null-dereferen...

We usually get away with ignoring unsigned rollover because most application counts don't exceed 2**32 or 2**64. However, many can exceed these values, and in those cases, explicitly handling this case in critical systems is often better than ignoring potentially erroneous behavior.

Another concern, some people might have about this is the performance implications or what to do when you want to allow overflow. In that case you can locally disable overflow protections.


I remember when `alert` would lock up the entire browser UI. So if you put it on an infinite loop, that was it. You had to kill the browser process to shut it off.


I can't wait for them to deliver the new Roadsters!!


I GUARANTEE that was written by AI. This type of slop is unmistakable


I’ll take a Qt application over the Electron garbage that we see all the time nowadays.


It could be worse but that's not much of an argument for C in particular. There's a lot of ways to do UI that don't involve web engines.


10-100x develop & maintain cost.


good. browser uis always end up sucking more



Thanks. Looks like it finally made C++23!


fmt:print from fmtlib has been around for at least a decade, though having it be in the spec by default now is nice.

Even in c++20, you could use format() to do most of what you'd want from it.


And replace it with what?



A lot of countries require you to declare your total wealth on your tax forms. Then once someone gets audited, that gets checked. Obviously it’s possible to hide it, but that in itself is a crime, and not everyone is willing to risk going to jail over paying taxes.


> A lot of countries require you to declare your total wealth on your tax forms.

If you own shares of $MCD, you can get wealth taking share prices and shares owned.

But if own a McDonald's franchise, how do you measure the 'wealth' of it? Annual profit? Last x years profit, averaged?


Comparable sales. Discounted cash flow model. There are many ways.


You obviously can’t convert between the two directly and suggesting that is disingenuous.

Income tax doesn’t affect unrealized capital gains (where the rich “hide” most of their income).

A wealth tax (even without a minimum threshold) doesn’t apply to the poorest who can’t accumulate enough to even have any savings.

This conversion only works for income that is entirely saved and reinvested, which the majority of people can’t afford to do.


Why? Some web apps might want to present a different interface if you’re in landscape.


You don't need an angle for that. That is highly invasive and can be used to target unique individuals. Why not default to a pro-human oriented mindset rather than pro-corporation?


It's for games that rely on the tilt.


That's much more reliably conveyed by looking at the viewport dimensions.


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

Search: