Better HN
topnewbestaskshowjobs
Log inSign up

dearrifling

71 karma · joined Jan 6, 2019 (7y ago) · 31 submissions

Submissions

comment 7y ago · link · parent

Exactly.

https://godbolt.org/z/j-THTX

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

5G means that providers can sell higher data caps.

comment 7y ago · link · parent

On debian this is the default behavior.

comment 7y ago · link · parent

And surely there is nothing wrong with the alignment of ransomware authors' and this friendly service's incentives.

comment 7y ago · link · parent

If they offer warranty, who cares?

comment 7y ago · link · parent

That doesn't sound right. I think the difference is that C++ doesn't treat that as an array declaration so it doesn't require a complete type.

comment 7y ago · link · parent

ADL is important for customization points in modern C++.

comment 7y ago · link · parent

So they are misattributing the additional sale to their suggestions instead of the product being an advertisement for itself.

comment 7y ago · link · parent

One shouldn't std::move in a return. Returning a local is already automatically an rvalue, however explicitly moving it disables copy elision.

comment 7y ago · link · parent

As many words in C++, "modern" is overloaded. In this case I think it means it uses c++11 or later.

comment 7y ago · link · parent

std::function implementations typically have small buffer optimization, a lambda capturing a single reference will most likely fit in there. But yes, it's quite heavyweight in general.

comment 7y ago · link · parent

Well, that example shows some too stringy API for my taste.

comment 7y ago · link · parent

About that luminance-correct grayscale: https://entropymine.com/imageworsener/grayscale/

comment 7y ago · link · parent

100ms of keypress-to-sound latency makes the instrument unplayable.

What about organ players?

comment 7y ago · link · parent

You can have unrelated commits and roots in a single git repo. No need for empty root commit.

comment 7y ago · link · parent

That has nothing to do with memory safety, that's just plain UB.

comment 7y ago · link · parent

It's because what most people call RGB is sRGB, a nonlinear color space. Interpolating in a linear color space is already much better.

comment 7y ago · link · parent

Awesome! According to the description of the internals this only works with offsets and doesn't adjust the subtitle's playback speed. I think playback speed variations are not that broad, it's usually caused by playing a subtitle written for a given FPS played back on a different FPS video. It might worth it to try common FPS ratios at once and keep the best match.

comment 7y ago · link · parent

Note that '<input grep | foo' is also valid.
12