Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dzaima
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
151.
▲
by
dzaima
1y ago
Problem is it doesn't affect outcome at all unless you do mutation, and as such testing is irrelevant, but still can significantly impacts perf, and performance problems can take a while to surface; like, it may slowly grow from 0.1% o
152.
▲
by
dzaima
1y ago
Matrix's federation already does result in redundancy of the entire chat history; users not on @matrix.org can currently communicate between each other just fine even on :matrix.org rooms despite matrix.org being down. It's entire
153.
▲
by
dzaima
1y ago
Bookmarks take precedence over change ID prefixes. And indeed if you add a bookmark "xyz" and a change had a unique prefix "xyz", the change's unique prefix will grow by one. (the unique prefixes can already grow or
154.
▲
by
dzaima
1y ago
You can do a `jj new; jj restore --restore-descendants -f commit_id -t @-` with a commit id (not change id!) from the evolog to "inject" a snapshot from the evolog below your current @, leaving the file state at @ (and everywhere
155.
▲
by
dzaima
1y ago
Working copy handling differences is certainly an aspect of jj, but, at least for me personally (esp. given me having grown up with git), it's probably my least favorite difference from git. And yet I've moved most of my personal
156.
▲
by
dzaima
1y ago
Doesn't this just replace the "slow if next() is complex" with "slow if the body of the loop is complex"? A complex iterator does have the problem of having the allocation for its result, not being able to directly
157.
▲
by
dzaima
1y ago
I'm of course not saying that C has a single universal ABI. But for any single platform (OS+ISA) where it is possible and meaningful to have shared libraries in the first place, there's a pretty clear single ABI to follow, so the
158.
▲
by
dzaima
1y ago
Release vs debug shouldn't affect ABI (or, at least, the library author can decide whether it does; all it takes is.. not having `#if DEBUG` in your exposed header files changing types or function signatures). Multi-threading doesn
159.
▲
by
dzaima
1y ago
It's not cleanly one or the other, really. It's UCS-2-y by `str.length` or `str[i]`, but UTF-16-y by `str.codePointAt(i)` or by iteration (`[...str]` or `for (x of str)`). Generally though JS's strings are just a list of 16-b
160.
▲
by
dzaima
1y ago
Can't solve the issue of "you just don't have the library (or a specific version thereof) installed". But you can make it worse by changing "You must have version X of library Y installed" to "You must hav
161.
▲
by
dzaima
1y ago
It's certainly not impossible to write code that breaks, or modify a library in an ABI-incompatible way, but ABI stability, at least on Linux, does largely Just Work™. A missing older shared library can be quite problematic, but that&#
162.
▲
by
dzaima
1y ago
Maybe some things could be translated by a linker, but a linker can't change the size/layout of an in-memory data structure, and there's no info on what to translate from, even if info was added on what to translate to, anywa
163.
▲
by
dzaima
1y ago
Compilers at least allow specifying the standard to target, which solves the ISO revision issue. But breaking within the same -std=... setting is quite a bit more annoying, forcing either indefinite patching on otherwise-complete functional
164.
▲
by
dzaima
1y ago
Right; generally the constant factors of this approach are horrible though, can't think of any situation where it'd be worth it on systems with, well, cache (or a TLB for that matter, which is even worse off with the sparse memory
165.
▲
by
dzaima
1y ago
That could be classified as a bug if it was decided that the allocator must guarantee that uninitialized memory is readable as a consistent value. Otherwise, making the allocator clear the hint is just unnecessary work. Clearing the hint on
166.
▲
by
dzaima
1y ago
Wouldn't it be just a trivial O(n) of a loop of "for (x in dense vector of one set) { if (is x a member of the other set) add to result; }"?
167.
▲
by
dzaima
1y ago
--localize-hidden seems to be more what I was thinking of. So this works: ld --relocatable --whole-archive crappy-regular-static-archive.a -o merged.o objcopy --localize-hidden merged.o merged.o This should (?) then solve most
168.
▲
by
dzaima
1y ago
How possible would it be to have a utility that merges multiple .o files (or equivalently a .a file) into one .o file, via changing all hidden symbols to local ones (i.e. alike C's "static")? Would solve the private symbols l
169.
▲
by
dzaima
1y ago
I specifically have the WIP head description include the name of bookmark that it's attached to, if any (emulating git's non-detached head), so can't leave it empty (and generally wouldn't want to, for easy way to identi
170.
▲
by
dzaima
1y ago
> What I'm saying is that the typical change to a file shouldn't be committed to my local repo until I indicate that it's ready. I was extremely hostile to this aspect of jj too, but I've settled on a workflow where @
171.
▲
by
dzaima
1y ago
Unfortunately I cannot find where I had read that, might've just misinterpreted discussion about delays as about dropping messages / interpreting messages as answers to questions I didn't actually post... Sorry for the unnece
172.
▲
by
dzaima
1y ago
FWIW, my specific room didn't lose much due to the missed syncing, I manually copied over the lost messages (..and we're used to doing so due to the flaky discord bridge). I just noted it as it seemed like a generally relevant thi
173.
▲
by
dzaima
1y ago
Thanks for the link to the postgres discussion! An incident report would definitely be interesting. I haven't reported the missing messages thing anywhere as I assumed that was just expected (IIRC (and this is a big IIRC) it was mentio
174.
▲
by
dzaima
1y ago
I've heard that messages not getting through federation in some cases is just a thing that can happen. How that's compatible with calling matrix as having good federation, I don't know.
175.
▲
by
dzaima
1y ago
The issue of broken rooms was reportedly the database having gotten corrupted indexes, which affected a bunch of rooms (2/55 of ones I was in): https://github.com/element-hq/synapse/issues/18606#issuecomm
176.
▲
by
dzaima
1y ago
Ah, that appears true. I just tested some commit creation & state inspection commands, didn't bother with network stuff.
177.
▲
by
dzaima
1y ago
A property of the initial XOR trick for 2 different elements is that it guarantees finding a way to partition in one pass (and with very trivial code; no hashing involved!), which is lost by replacing that with hashing. (the original trick
178.
▲
by
dzaima
1y ago
Git - jj[1] uses gitoxide for its git interop/backend (git being the backend of jj you're expected to use), both Apache/MIT; it functioned so cleanly I assumed it was invoking git directly, but apparently it's all custom
179.
▲
by
dzaima
1y ago
A rough sketch for a more direct way to extend the XOR trick to finding more than two differences: For e.g. 3 differences: instead of a binary xor (i.e. binary-digit-wise sum mod 2), do a binary-digit-wise sum mod 3 (negating one input); a
180.
▲
by
dzaima
1y ago
L1 latency is 4 cycles typically (1 nanosecond would be closer). And of course it gets longer if you're chasing through multiple pointers. It of course depends on the specific program, but, looking at any optimization at the level of s
More ›