Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkhuong
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
pkhuong
2y ago
There's a classic solution to detecting most missing entries: make your value a pair of a signature and the actual value. m signature bits result in a 2^-m false match rate for keys not in the input map. Again, the MWHC construction do
62.
▲
by
pkhuong
2y ago
No, it doesn't have to be injective. In theory, the range can be any group. It's k bits in practice (with addition mod 2^k or xor as the group operator), but k need not have any relationship with `lg(|S|)`.
63.
▲
by
pkhuong
2y ago
The MWHC construction represents minimal (monotone!) perfect hash functions as arbitrary functions to the ceil(log(n)) bits needed to store the rank... where the value happens to be the rank, but could be anything.
64.
▲
by
pkhuong
2y ago
I'd expect a comparison with compact (or even succinct) constructions for arbitrary functions, like MWHC. Section 3.2 of https://vigna.di.unimi.it/ftp/papers/TheoryPracticeMonotone.... has a good overview. Gi
65.
▲
by
pkhuong
3y ago
The technique was part of the functional programming pop culture 10-20 years ago.
66.
▲
by
pkhuong
3y ago
I think the term you're looking for is "Bentley-Saxe dynamisation" https://www.sciencedirect.com/science/article/abs/pii/019667...
67.
▲
by
pkhuong
3y ago
> 2) QUESTION: Are there simple programming languages so that HALT restricted to them is decidable but not primitive recursive? I suspect one could contrive such a language so I ask for both natural and contrived examples. I like the lex
68.
▲
by
pkhuong
3y ago
Executable images bundle the runtime with the image.
69.
▲
by
pkhuong
3y ago
Google migrated away from IB years ago. IIUC, the failure modes at the time (e.g., fully locked up fabric) were too painful at the time, and they preferred to work with a mostly vanilla Linux kernel for userspace networking.
70.
▲
by
pkhuong
3y ago
You encode the test condition in address `ea` and execute some quasi no-op like `test eax, [ea]`. The address space is setup such that `ea` is unmapped / unreadable if the test condition says the code should trap.
71.
▲
by
pkhuong
3y ago
If you're gonna do that, might as well use sync_file_range on Linux https://lkml.indiana.edu/hypermail/linux/kernel/0904.0/01076...
72.
▲
by
pkhuong
3y ago
There's https://github.com/libsql/sqld , but sqlite's concurrency model doesn't always work well with long-lived transactions (and just the network hop can be slower than a local transaction), especially
73.
▲
by
pkhuong
3y ago
Verneuil https://github.com/backtrace-labs/verneuil might work for you. Its replication client can use a persistent chunk cache (no fsync, so doesn't survive reboots), and there's a CLI utility to reconstitut
74.
▲
by
pkhuong
4y ago
As mentioned in the post, the conditional is trivially converted to a cmov or a bitwise expression. A column-oriented algorithm makes sense when the data is naturally laid out with bitpacked columns.
75.
▲
by
pkhuong
4y ago
> I've always wondered the best way to write tests for "This event should happen x% of the time." I use https://github.com/pkhuong/csm/blob/master/csm.py to set a known false alarm rate
76.
▲
by
pkhuong
4y ago
GP is referring to https://en.wikipedia.org/wiki/Lagrange_polynomial Build a table left[j] of product-of-ratios for i < j, and another right[k] for i > k, each in linear-time, and combine the two to find the prod
77.
▲
by
pkhuong
4y ago
On x86-64, all floating point arithmetic uses vector register, and there is no difference in latency or throughput between scalar and 128-bit SIMD arithmetic; in fact, scalar instructions can easily introduce performance issues because they
78.
▲
by
pkhuong
4y ago
https://github.com/backtrace-labs/verneuil doesn't even need an HTTP connection between the writer and readers: readers only interact with the object store.
79.
▲
by
pkhuong
4y ago
Reference counting algorithms usually assume that code increments through a strong reference.
80.
▲
by
pkhuong
4y ago
These cables are fiber optics, but either way, the speed of light is still a bound.
81.
▲
by
pkhuong
4y ago
Intel PT and LBR in branch history mode might be better fits (AMD's BRS isn't quite there yet, unfortunately).
82.
▲
by
pkhuong
4y ago
And yet TFA shows that 3.39.0 introduced a new feature (right joins), and 3.39.1 fixes a logic bug in exactly that new feature. I suppose you're right that it's not a crash, just an incorrect result.
83.
▲
by
pkhuong
4y ago
This all makes sense at first sight, but remember that we can always take the difference between the address of an array's first element and one past the end, so you run into a lot of issues when an array (or any object) is larger than
84.
▲
by
pkhuong
4y ago
I've seen the WAL grow when there's a constant write load and a long background read transaction keeps an old version alive. If you also never reach a point where there are 0 connections to the DB, you can keep this large WAL file
85.
▲
by
pkhuong
4y ago
Verneuil ( https://github.com/backtrace-labs/verneuil ) offers that for read replicas, because backtrace as well has some multi-GB sqlite DBs. It's a VFS (loadable at runtime as a sqlite extension), instead of a fil
86.
▲
by
pkhuong
4y ago
I've been employed for a variable mix of system design and low level performance work my whole career... except for Google. There are definitely more than five firms that would pay reasonably well for my expertise, and my PhD was in ma
87.
▲
by
pkhuong
4y ago
https://github.com/backtrace-labs/verneuil is in-process (precisely to minimise deployment pain).
88.
▲
by
pkhuong
5y ago
https://github.com/backtrace-labs/verneuil/ is one way to address the diffing / read replica part of the problem. I believe it's compatible with gossipping: most of the data is in small content-addressed
89.
▲
by
pkhuong
5y ago
The move (rename) is a metadata-only operation and is atomic on POSIX-compliant platforms and in reality.
90.
▲
by
pkhuong
5y ago
Just cffi, and keeping the headers free of inline implementation noise (a side benefit, in my opinion).
More ›