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

Although the Badge pattern makes it flexible to add functions with different badges, this one doesn't have the awkward interface:

https://godbolt.org/z/25k1DG

It just makes use of the non-transitiveness of friend.


Some people argue exactly that. I don't necessarily agree.


It can change the "POD for the purpose of layout" status of a class on Itanium. It can change layout.


You can make register_device() an inline function that just calls a do_register_device() private function without the badge. That way you don't have to pay for the empty class.


I'm not sure I follow... The motivation for Badge is to have methods on VFS that only Device can call, without exposing VFS's internals to Device. Without Badge, what prevents non-Device functions from calling register_device()?


I guess the inline function would require a Badge and the private member function would not. So an inline constructed but never used Badge is even more likely to be completely optimized away



This the first time I heard about a change.org petition having any effect.


This doesn't remove UB though. Your compiler still can assume that null-dereference never happens and generates code with this assumption.


Counting opening a mail as failing is ridiculous. A a phising test should only count captured logins.


Following a link can readily enough expose someone to risks. Phishing isn't always just about entering logins.


That's true for any email, not just phising. Unless you can verify and trust all senders.


Yup. This is why people are taught not to click links in emails for things like banking. It's a dangerous world out there, even for seemingly innocuous things.


When I see one of these, I actually do go onto my Corp iPhone to delete the email instead of Outlook/Windows.

It may not be a perfect approach since we do use it for MFA...


Fun fact: sRGB also has a non-black black point that is (fortunately) virtually ignored by everyone.


The sRGB black point just means that (0,0,0) is assumed to have a luminance of 0.2 cd/m^2, because your screen reflects ambient light and other factors.

Ignoring it will give you nonsensical values when you try to do conversions into other color spaces or when you try to do color comparisons.


Source?

As far as I can tell in XYZ black is (0,0,0) and the only sRGB value that maps to that is (0,0,0)


This is incorrect.

If sRGB (1,1,1) is XYZ (1,1,1), then sRGB (0,0,0) is XYZ (0.0025,0.0025,0.0025).

Or if you are using absolute XYZ values, sRGB (0,0,0) is XYZ (0.1901,0.2,0.2178).


Having a complex model that describes a complex system is not unusable though. There is a reason we want to accurately simulate the Navier-Stokes equations with complex boundary conditions.


To quote the original article: "As a model of a complex system becomes more complete, it becomes less understandable. Alternatively, as a model grows more realistic, it also becomes just as difficult to understand as the real-world processes it represents"

If your model is simple enough to represent the original system accurately, then the original system is not complex.


If your model is simple enough to represent the original system accurately, then the original system is not complex.

My model can be complex enough to represent the original system and still be useful. I can iterate on design and make measurements without building the real thing.


> If your model is simple enough to represent the original system accurately, then the original system is not complex.

No, this is just plain wrong, sorry.

I can describe a population fairly well using one or two ODEs. That doesn't mean that a population of individuals is simple. It's incredibly complex. However, at the meso-scale of just looking at population size and growth rate, my model is accurate (enough).

A model doesn't describe a system at all levels. It simulates the behaviours, whether explicit in the system or emergent from other properties, in order to describe its behaviour at a certain level.


> My model can be complex enough to represent the original system

This does not mean that your model is not complex. It means that the system is simple.

At least, it is simple enough to be represented fully in a model. I think this paradox refers mostly to systems that are too complex to be represented in any model at full accuracy, and must therefore be simplified.


The paradox invokes an absolute. How do you even know the system is "too complex"? Maybe it is too complex for humans but not for a galaxy brain?


See the comment at https://news.ycombinator.com/item?id=20019426 that refers another quote:

> I think the George Box aphorism linked at the bottom ("All models are wrong [but some are useful]") is closer to the right way to think about this.

Also, see the original article:

> Bonini's Paradox, named after Stanford business professor Charles Bonini, explains the difficulty in constructing models or simulations that fully capture the workings of complex systems (such as the human brain).

A model is "too complex" by this definition if there can be no complete and accurate virtual representation of it, it can't be wrong by definition. If you emulate a CHIP-8, for instance, you are able to accurately represent the full state of the system inside the emulator; therefore, the emulator is capable of full accuracy. It's impossible to do the same with a human brain, as quoted in the article.


5G means that providers can sell higher data caps.


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

Search: