Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leni536
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
39 ms
·
661.
▲
by
leni536
5y ago
How does it handle a single defer in an if?
662.
▲
by
leni536
5y ago
I remember being able to set that up with clang (obviously not indirect calls).
663.
▲
by
leni536
5y ago
Defer is weird in Go, being tied to function scope instead of immediate block scope.
664.
▲
by
leni536
5y ago
The darkish gray dip is mostly avoided by using a linear colorspace. Interpolating in HSV can introduce weird artifacts. Mostly due to H being circular, if you naively interpolate between two close shade of red, you might go through all of
665.
▲
by
leni536
5y ago
Seriously, I don't even have a red tie. And I wouldn't buy one for an interview, even if I read the message.
666.
▲
by
leni536
5y ago
That's not how it works. For a geometric distribution with p=1/80 the mean or expected value is indeed 80. https://en.wikipedia.org/wiki/Geometric_distribution Your gun example has a uniform distribution betw
667.
▲
by
leni536
5y ago
The C standard only calls certain integer arithmetic to "overflow" if it results in undefined behavior. In that sense undefined integer arithmetic never overflows, but they "wrap around", as the behavior is defined there
668.
▲
by
leni536
5y ago
Oh, lol, didn't check the name there, and didn't through the whole comment either.
669.
▲
by
leni536
5y ago
Check out https://github.com/beached/daw_json_link , it provides a non-typeerased way to parse JSON straight into user-defined data structures.
670.
▲
by
leni536
5y ago
> C++ recently sanctified complement-of-two as integer representation While that's true, signed integer overflow on arithmetic operations remains undefined behavior.
671.
▲
by
leni536
5y ago
No such thing as "underflow" for integers. Signed integers overflow in both directions. Underflow is a floating point concept. Edit: https://en.m.wikipedia.org/wiki/Arithmetic_underflow
672.
▲
by
leni536
5y ago
> Of course this is dangerous as it’s a narrowing conversion, with a cast which silences a legitimate warning. In C and C++ it invokes undefined behavior when given specific large values and most certainly is exploitable. Most applicatio
673.
▲
by
leni536
5y ago
Maybe we should have full test networks that run a full year in the future to catch various date bugs ahead of time. The problem is that you probably can't connect it to the Internet.
674.
▲
by
leni536
5y ago
From the C abstract machine's perspective it is undefined: 1. To substract the two function pointers after casting to BYTE*. 2. To read the bytes through those pointers. 3. To cast the copied bytes back to function and invoke it. The a
675.
▲
by
leni536
5y ago
Of course all of this is very much undefined behavior in standard C and C++. Some programmers really need to learn that they program the "abstract machine" when they write C or C++.
676.
▲
by
leni536
5y ago
> Symbol versioning I know that glibc uses symbol versioning to remain ABI-compatible within versions. What I meant was ABI compatibility between 32-bit and 64-bit time_t with the same glibc library. Looks like it uses something like ali
677.
▲
by
leni536
5y ago
I second this, I'm still on free tier with a custom domain with a catch-all inbox. Looks like they offer their free tier up to 5 users.
678.
▲
by
leni536
5y ago
That's interesting, how does glibc maintain ABI compatibility? Alias attributes? Even if glibc does it, if other libraries expose time_t in their ABI and don't do the same, then it's the same problem.
679.
▲
by
leni536
5y ago
There is no "no default", your distro will ship with one or the other. Very few people compile and ship glibc, upstream defaults only matter in the way they affect distro defaults.
680.
▲
by
leni536
5y ago
It's cool and all, but many games I play don't have direct wayland support, and performance through xwayland is not great.
681.
▲
by
leni536
5y ago
If you can use a loop for timing then you can use an unrolled loop for timing too.
682.
▲
by
leni536
5y ago
You have to do that anyway, unique_ptr only makes forgetting that a compile error.
683.
▲
by
leni536
5y ago
Getting ahead of navigation
684.
▲
by
leni536
5y ago
It's not just you, dinostics continuously and noticably improve. A lot of effort is spent on this.
685.
▲
by
leni536
5y ago
I fail to see how MathML is inherently safer than SVG.
686.
▲
by
leni536
5y ago
None of gcc, clang or msvc deallocate the frame or part of the frame in `baz2` before calling `bar` the first time here: https://godbolt.org/z/rvx36sM74 What I would like to like is something like the generated call of
687.
▲
by
leni536
5y ago
Well, this how I could negotiate up my starting salary. I told each recruiter the competing offer, they didn't have to leak anything.
688.
▲
by
leni536
5y ago
I think clang's noescape attribute for pointer function parameters are somewhat related. There are several compiler extensions that allow refining calling conventions, so clearly even compiler vendors think that there are things to exp
689.
▲
by
leni536
6y ago
Commits being snapshots is not git internal. It is the high level abstraction.
690.
▲
by
leni536
6y ago
I thought that regular intercourse is success.
More ›