Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dzaima
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
61 ms
·
721.
▲
by
dzaima
3y ago
If you want to support players with ping over 16ms, there's no way you're gonna be synchronizing input from one frame to the output of the same frame for another player; there'll necessarily be some latency hiding, at which p
722.
▲
by
dzaima
3y ago
Yeah, to be well-defined it should be 's & 31', or use an unsigned type for s; compiler explorer comparing those under ubsan shows the original having the possibility of UB: https://godbolt.org/z/eT9q871bY
723.
▲
by
dzaima
3y ago
Note that this is only for the direct shift instructions. Some other related instructions, and SIMD versions, might be different from the regular shifts on the same architecture. x86-64's 'bzhi' instruction (does 'a &
724.
▲
by
dzaima
3y ago
Here's one case: https://godbolt.org/z/aM89Eqs3v - the 'p == NULL' check is gone. Not directly harmful if the null page is inaccessible (which it's gonna be for most user-space stuff), but if it
725.
▲
by
dzaima
3y ago
Is that for back/forward, or extra buttons on top of those? Back/forward have pretty standard meanings & usages so I'd expect them to work out of the box (and they have for me). Can't comment much on other extra butt
726.
▲
by
dzaima
3y ago
In a sibling comment I noted wayland referencing some kernel values[0]; and I'd hope there would be some reasonable standard. I certainly didn't have to manually configure chrome & firefox for them to know which buttons on my
727.
▲
by
dzaima
3y ago
Right, I had seen that 4-7 was scrolling, but that's still not describing which of the numbers greater than 7 will map to the back/forward buttons.
728.
▲
by
dzaima
3y ago
I don't know where that information comes from (I'd assume the kernel? wayland[0] refers to the kernel[1]), but surely if I, and every GUI app that wants to use the mouse, is supposed to know it, X definitely could too. If I recal
729.
▲
by
dzaima
3y ago
I'd expect them to be documented somewhere, so that I could be sure that they're not gonna be swapped or map to some other buttons (and not have to find out about it through trial/error or blogs/reading GTK's source
730.
▲
by
dzaima
3y ago
X11 works.. when noone actually uses X11, but actually some wrapper API that was made alongside the development of X11, or suffered through effectively replaying history. Some fun things I recall encountering while trying to use it: Want to
731.
▲
by
dzaima
3y ago
For now I guess I'm only using the feed in FastHub-RE ( https://github.com/LightDestory/FastHub-RE ), but that's for Android. I'm hoping that by like tomorrow it's reverted anyway.
732.
▲
by
dzaima
3y ago
"LMUL state" is three bits (7 possible values) of thread-wide config that just change how operations operate with the same vector registers; similar to say the FP dynamic rounding mode, which also needs to be saved & restored
733.
▲
by
dzaima
3y ago
You don't necessarily need an APL-specific keyboard; APL characters can be entered from any regular keyboard, see https://aplwiki.com/wiki/Typing_glyphs . The advantage of an APL-specific keyboard would be the stic
734.
▲
by
dzaima
3y ago
If you keep the interface the exact same, you run into some pretty big complications, as with the current interface you can change one row out with another object with a single statement, or similarly get a row object as such (which you do
735.
▲
by
dzaima
3y ago
Or it might be that the person has used multiple programming languages, across which the order/meaning of copy arguments varies a lot, and thus prefer to not remember the decision of each language (if not for writing (at which point th
736.
▲
by
dzaima
3y ago
As far as I'm concerned, replacing a feature with a similar one (major version bump in semver) and adding a new feature (minor version bump in semver) are pretty much completely equivalent to me. Adding a new button for a purely-new fe
737.
▲
by
dzaima
3y ago
That could end up with significant false-positives when updating the thing without updating the estimated memory usage (especially if slow bounded fragmentation over a long period of time applies). You might also have some expected ratio of
738.
▲
by
dzaima
3y ago
I'm of course already using -fno-strict-aliasing (primarily because without it it's impossible to implement a custom memory allocator, but it also helps here).
739.
▲
by
dzaima
3y ago
Internally, the compiler could represent it however it wants. LLVM IR's load/store instructions just have an "align" property, which is usually sizeof(the type), but can be set to 1 to mimic memcpy (and indeed llvm/
740.
▲
by
dzaima
3y ago
Doesn't look like that changes anything about actual dereferencing though, which is the primary thing discussed - https://godbolt.org/z/4vW5Ksnab still emits an "align 4", which llvm could still assume a
741.
▲
by
dzaima
3y ago
Right, I agree that it would be nice to have some way to request unaligned load/store to be permitted, alike -fwrapv for signed int wrapping. But nevertheless the UB behavior is a reasonable option that's beneficial for other thin
742.
▲
by
dzaima
3y ago
For one, the linux kernel itself relies on this UB - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93031#c5 , linked from OP. And indeed linux would hit UBSAN reports on those, but just disables it if native unaligned lo
743.
▲
by
dzaima
3y ago
In a project I'm working on[0], there's an array object type used throughout, which can sometimes point to arbitrary data elsewhere. In a funky edge-case[1], such an array can be built with an unaligned data pointer. Thus, if gcc&
744.
▲
by
dzaima
3y ago
Both gcc and clang will optimize a memcpy to an unaligned load/store where possible.
745.
▲
by
dzaima
3y ago
The thing that kills linux is being out of RAM (but, to my recollection, not at all Windows - worst-case there'd be a pop-up asking for which process to close (still a GUI! and giving a choice!!)). I lived for a long time with a linux
746.
▲
by
dzaima
3y ago
__builtin_unpredictable is gonna be fixed in LLVM/clang 17: https://github.com/llvm/llvm-project/commit/09515f2c20111628... (also, bugs.llvm.org is old; the more up-to-date (but still open) issue is htt
747.
▲
by
dzaima
3y ago
..would you be fine with forcibly having to do a new job that you have absolutely no desire to do? And these are most likely cheap crappy things, never mind ones that got returned , so worse than the regular amount of crappy, so it cou
748.
▲
by
dzaima
3y ago
I'd give at least a single order of magnitude for most code; maybe closer to two even.
749.
▲
by
dzaima
3y ago
A difference between this and the OP is that OP doesn't pass in a length, instead terminating on the first invalid character (which is the trailing null byte in the benchmark). Means that the array-out-of-bounds check can't be abu
750.
▲
by
dzaima
3y ago
M1 can do 3 loads or 2 stores per cycle and has 6 ALU ports, so a loop doing 2 bytes/cycle taking 2 cycles average is not really out of question. But with the constant overheads present it's kind of useless to compare (the C bench
More ›