Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkhuong
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
pkhuong
5y ago
We've had a lot of success combining that approach (cffi instead of ctypes) with property-based testing ( https://github.com/HypothesisWorks/hypothesis ) for the query engine at backtrace: https://enginee
92.
▲
Fast Feature Flags
(engineering.backtrace.io)
43 points
by
pkhuong
5y ago
|
3 comments
93.
▲
Bounded dynamicism with cross-modifying code
(engineering.backtrace.io)
1 points
by
pkhuong
5y ago
|
0 comments
94.
▲
by
pkhuong
5y ago
The blog post has some numbers. We use Verneuil at backtrace to replicate small to medium sized databases (one per user), with up to a few hundred replicated databases per process. We see a few million write transactions a day (so not a su
95.
▲
by
pkhuong
5y ago
You can also ask sqlite to load Verneuil as a runtime extension, without otherwise changing your application. That's how backtrace uses it for ad hoc query of read replicas in the sqlite shell. The availability of read replica is proba
96.
▲
Verneuil: S3-backed asynchronous replication for SQLite
(engineering.backtrace.io)
14 points
by
pkhuong
5y ago
|
8 comments
97.
▲
by
pkhuong
5y ago
smhasher does not report any failure for blake3. The one failure for blake2b 256 is not ideal for a hash function, but not necessarily evidence that the function doesn't look like a random value: `Sparse` generated 50643 16-bit values,
98.
▲
by
pkhuong
5y ago
Cryptographic hashes mostly look at collisions for the whole output (or precisely truncated outputs). There can still be patterns or clumping in short ranges of the output bits for certain input families, as long as the full outputs differ.
99.
▲
by
pkhuong
5y ago
The production of seed-independent collisions for various versions of murmurhash (e.g., http://emboss.github.io/blog/2012/12/14/breaking-murmur-hash... ) motivated siphash. In general, when there's n
100.
▲
by
pkhuong
5y ago
umash ( https://github.com/backtrace-labs/umash ) has a similar structure PH block structure (and similar universality guarantees), but was designed for decent bit mixing (enough to satisfy smhasher, unlike CLHASH, which
101.
▲
by
pkhuong
5y ago
SIMD gather are slow on commodity hardware, often as slow as loading and inserting each element one at a time.
102.
▲
by
pkhuong
5y ago
Loop unrolling.
103.
▲
by
pkhuong
5y ago
Google SREs definitely have that stick.
104.
▲
by
pkhuong
5y ago
And the ability to run automatically run tests on any part of the code base because everything uses Blaze. You can schedule your wide-reaching changes on the TAP train and see what breaks across the whole monorepo. In most cases, the librar
105.
▲
by
pkhuong
5y ago
Many load-balancing use cases (e.g., caches or stateless services that simply work better with affinity) don't need the old data. If you need redundancy, the ordering also tells you where to duplicate the data: durably send updates to
106.
▲
by
pkhuong
5y ago
The Newton iteration is nicer for the inverse square root than for the square root. You can refine an initial approximation for `1 / sqrt(x)`, and multiply the result by `x` to compute an approximation of `sqrt(x)`. This less direct ap
107.
▲
by
pkhuong
5y ago
sized free is good for safety if your malloc cross-checks the size argument with its metadata, and for performance if your malloc assumes the size argument is correct without having to hit malloc's internal metadata. There's also
108.
▲
by
pkhuong
5y ago
You can implement delimited continuations with regular call/cc and a mutable cell. Of course, like all abstractions based on raw call/cc, it's not modular: you can't do that and use the result inside, for example, a mu
109.
▲
by
pkhuong
5y ago
I tried a handful of such hacks for likely/unlikely annotations on stable, when working on versions of https://crates.io/crates/reciprocal . They all resulted in correct code, but none of them had any impact on bas
110.
▲
by
pkhuong
5y ago
You use a different interface than malloc/free and ask the programmer to pass in a class tag. https://github.com/backtrace-labs/slitter/blob/7afb9781fd25b...
111.
▲
by
pkhuong
5y ago
gdb scripts are a really good idea! I'll add that to our issues. https://github.com/backtrace-labs/slitter/issues/12
112.
▲
by
pkhuong
5y ago
Pure sampling profiles are less helpful when solving latency rather than throughput problems, especially so for rare (e.g. p99) latency spikes.
113.
▲
by
pkhuong
5y ago
From the same paragraph: "there are still some ( http://concurrencykit.org/ ) good ( https://software.intel.com/content/www/us/en/develop/documen... ) options ( https://g
114.
▲
by
pkhuong
5y ago
For something less PoCy, https://www.sourcetrail.com/ 's internal representation of the reference graph is a sqlite db file with pretty much a triple store schema.
115.
▲
by
pkhuong
5y ago
100%.
116.
▲
by
pkhuong
5y ago
Among the less niche ones: - UMASH: https://github.com/backtrace-labs/umash Fast hash functions don't usually come with collision bounds, and crypto hashes try too hard for my needs. With umash, we get speed that&
117.
▲
by
pkhuong
5y ago
The analysis assumes constant-time arithmetic for the Fourier transforms. This limits the size of the multiplicands, since the error terms eventually grow large enough to affect the computed product. From the paper: "Note that this err
118.
▲
by
pkhuong
6y ago
That's for concurrent reads, where the "atomicity" guarantees as defined in POSIX don't mean what anyone expects.
119.
▲
by
pkhuong
6y ago
That's an unfortunately common misconception supported by the wording in POSIX, probably because no one wants to codify ill-defined practices. I remember back in the 00s, people would refer to the implementation of the write syscall in
120.
▲
by
pkhuong
6y ago
I can see how it might be different with io_uring; I've not observed short writes with O_APPEND and regular buffered I/O.
More ›