Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
planede
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
421.
▲
by
planede
4y ago
In any case, it's better to keep the heat outside than letting it in then pump it out with an AC with some additional heat on top.
422.
▲
by
planede
4y ago
Even if it eventually gets covered by funding, this is still kind of bad. Who gets to publish is basically decided at funding time, not on merits of a paper.
423.
▲
by
planede
4y ago
They really should have been on TAI. I guess it doesn't matter now if we won't get any more leap seconds.
424.
▲
by
planede
4y ago
operator[] is indeed not great, the semantics are too surprising for such a short-hand notation. auto [it, newly_created] = m.try_emplace(key); Does the same, and gives back more information. For something like `m[key] = value`, you
425.
▲
by
planede
4y ago
I suggest to use Debian "unstable". I think the name "unstable" made a lot of disservice to it. The thing with testing is that security wise it's the worst of both unstable and stable. It does not get timely securit
426.
▲
by
planede
4y ago
An other option that is not mentioned is cross compiling with clang-cl on a Linux host to a Windows target. I believe this is much harder to set up, but it could have better compile performance than compiling on Windows. It would be pretty
427.
▲
by
planede
4y ago
It's easy to fall into the trap of introducing even more edge cases by handling some other edge cases. The correct way to handle edge cases is to not have them in the design. Easier said than done. And sometimes the edge cases are in t
428.
▲
by
planede
4y ago
In C++23 with zip it looks something like: for (const auto& [x, y] = std::views::zip(a, b)) { /* ... */ } A notable difference is that the ranges don't have to match in size, the loop will run until the end o
429.
▲
by
planede
4y ago
OK, but is "safe" in ReleaseSafe any kind of guarantee, or is it just safer than ReleaseFast? I can enable lightweight assertions in libstdc++ and libc++ and it makes C++ safer, but not in any way "safe". There are some
430.
▲
by
planede
4y ago
Not very. It really just means that "there is a sanitized mode for building", which already exists in many C and C++ compilers (for language UB) and standard libraries (for library UB).
431.
▲
by
planede
4y ago
Don't worry, small-to-medium software companies do exactly the same.
432.
▲
by
planede
4y ago
I'm not sure if this is helpful, but Google has a trademark complaint form specifically for this kind of situation: https://services.google.com/inquiry/aw_tmcomplaint
433.
▲
by
planede
4y ago
Nobody seems to blame the LLM itself here.
434.
▲
by
planede
4y ago
My introduction to mocking was through C++ and googlemock, where you have to dependency inject the mock object to do any mocking. This always made sense to me, and could often make APIs nicer and more generic with this approach. The API for
435.
▲
by
planede
4y ago
In my experience linter suggested fixes are good enough for suggestion, and it's probably worth setting up a key binding for accepting them in your IDE, but should absolutely never be applied blindly and automatically. This quality pos
436.
▲
by
planede
4y ago
Nice, I didn't know about https://wg21.link/P2216 .
437.
▲
by
planede
4y ago
> Exceptions have very high performance costs On the sad path. On the happy path they are faster than explicit error checking.
438.
▲
by
planede
4y ago
Is this an OLED display? For non-OLED I would have expected just a separate UV backlight and making the pixels transparent to UV.
439.
▲
by
planede
4y ago
Why would it be a separate UV pixel?
440.
▲
by
planede
4y ago
You don't have to spin up a VM per user to sandbox on Linux. You could use firejail. But traditional UNIX user sandboxing could also go a long way. I'm just saying that I would never trust nethack to not execute arbitrary code and
441.
▲
by
planede
4y ago
You can blanket ban C-style casts with appropriate warnings and static analysis.
442.
▲
by
planede
4y ago
Seriously, if the security of nethack is critical to your security, then you probably do something very wrong. There is no reason to not sandbox the hell out of it.
443.
▲
by
planede
4y ago
For downscaling, I doubt that. If you literally squint your eyes or unfocus your eyes, then colors you see will be mixed in a linear colorspace. It makes sense for downscaling to follow that. Upscaling is much more difficult.
444.
▲
by
planede
4y ago
I suggest to read up on this: https://entropymine.com/imageworsener/pixelmixing/
445.
▲
by
planede
4y ago
I'm a little bit sympathetic for doing it wrong on gradients (having said that SVG spec has an opt-in to do the interpolation in linear colorspace, and browsers don't implement it). But not for images.
446.
▲
by
planede
4y ago
Point 2 is the most important one, and the most egregious error. Even most browsers implement it wrong (at least the last time I checked, I confirmed it again with Edge). Here is the most popular article about this problem [1]. Warning: onc
447.
▲
by
planede
4y ago
It would. It would also not accumulate quantization errors from an intermediate result. Having said that there are precedents for having the intermediate image pixels in integral values. Here is imageworsener's article about this[1] [1
448.
▲
by
planede
4y ago
Arguably downscaling does not fill in missing information, it only throws away information. Still, implementations vary a lot here. There might not be a consensus of a unique correct way to do downscaling, but there are certain things that
449.
▲
by
planede
4y ago
Problems with image resizing is a much deeper rabbit hole than this. Some important talking points: 1. The form of interpolation (this article). 2. The colorspace used for doing the arithmetic for interpolation. You most likely want a linea
450.
▲
by
planede
4y ago
If you are defining dataclasses, do yourself a favor and define them kw_only=True.
More ›