Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thomasmg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
241.
▲
by
thomasmg
5y ago
I'm not sure what it means to have a recall of 50%... For nearest neighbour search, you would only find 5 of the top 10 nearest entries? What would be the algorithm of choice if I need to find 9 out of the top 10? Would it be LSH? (In
242.
▲
by
thomasmg
5y ago
In my experience (with both hand-written and generators, eg Antler), that's not the case. Hand-written recursive descent are simple to write, debug and maintain and extend, while with generators I always had to fight the tool at some p
243.
▲
by
thomasmg
5y ago
Yes it is not new; I read the multiplication trick was described even in 1986, in "The Metafont book" (Donald E. Knuth). (I don't have the book however). But it does look like the technique was forgotten, or at least not used
244.
▲
by
thomasmg
5y ago
I'm sorry! I thought this implementation uses linear probing. Yes this is not an example of linear probing. But it is much closer to linear probing than to cuckoo hashing (I hope we can agree on this). I also found this blog entry inte
245.
▲
by
thomasmg
5y ago
Sure. So far, there are only two Java implementations. One is using "Rank" and the other is using "Select": https://github.com/FastFilter/fastfilter_java/blob/master/fa... https:
246.
▲
by
thomasmg
5y ago
Yes, exactly. Linear probing is often easier and faster. Using buckets also helps (each bucket contains multiple slots), for both cuckoo hashing and linear probing. E.g. the cuckoo filter uses a bucket size of 4. See also https://
247.
▲
by
thomasmg
5y ago
Yes exactly. Actually you just need one 64-bit hash to generate all the hashes needed by the Bloom filter. And the somewhat slow modulo operation can be replaced with multiply+shift (fastRange). See e.g. https://github.com/F
248.
▲
by
thomasmg
5y ago
That's a good question! This paper also mentions "Dele. BF [43]" - the "The Deletable Bloom Filter: A New Member of the Bloom Family" https://www.researchgate.net/publication/260668624_The_Delet
249.
▲
by
thomasmg
5y ago
If you need the ability to remove entries, then I would consider the counting Bloom filter (which is simpler, but needs more space), and the cuckoo filter. But you do need to be a bit careful as both can overflow if you are unlucky, or if y
250.
▲
by
thomasmg
5y ago
Yes exactly. Do a bitwise AND / OR, and count the number of bits that are set. From this count, you can estimate the number of entries in the set: https://en.wikipedia.org/wiki/Bloom_filter#Approximating_the... Hy
251.
▲
by
thomasmg
5y ago
Yes. Some variants of ribbon filters are very fast, and other variants (which are a bit slower thought) need very little space: only a few percent more than the theoretical lower bound. For static sets, ribbon filters and binary fuse filter
252.
▲
by
thomasmg
5y ago
There are many alternatives to Bloom filters, but some variants of Bloom filters are still competitive. I'm one of the authors of some benchmarks for filters: https://github.com/FastFilter/fastfilter_cpp (this is
253.
▲
by
thomasmg
5y ago
This paper seems to use an un-optimized Bloom filter implementation. It also lists cuckoo filters to be 10 times faster than Bloom filters. In other papers, e.g. the cuckoo filter paper and the xor filter paper, the difference is _much_ sma
254.
▲
by
thomasmg
5y ago
Succinct (space-saving) data structures often need "rank" and "select" operations. Rank(n) is the number of 1 bits up to position n. Select(n) is the reverse: at which position is the n-th 1 bit. For "rank", th
255.
▲
by
thomasmg
5y ago
I was also asking for sources so I can adjust my "weight" to those sources. You can guess in which direction the adjustment goes :-)
256.
▲
by
thomasmg
5y ago
> there's a substantial political movement that will say or do anything for victory Well, how can one verify if something is correct or not if there is no link to sources? Without sources, there is no way. With the sources, one can
257.
▲
by
thomasmg
5y ago
I would be interested in the sources of your claims.
258.
▲
by
thomasmg
6y ago
Maybe "unloading" by dragging some of the containers off the ship. Either into the sea, or on land. Yes, it would be very messy: destroy some goods, damage the ship. But it might still be cheaper than the alternatives.
259.
▲
by
thomasmg
6y ago
"Binsort - sort files by binary similarity": Thanks for the info! Yes, this seems to do something similar to what I implemented, on a file level (not chunk level). It seems to be O(n^2), while my algorithm is O(sort(n)). But havin
260.
▲
by
thomasmg
6y ago
Sorting chunks by similarity: commonly used tools don't do that. Most archive tools only sort by file type. I wrote a tool that chunks the data (into variable-sized blocks, to re-sync if there are multiple files that have different len
261.
▲
by
thomasmg
6y ago
> we assume some other form of energy that has yet to be commercialized Both sodium-sulphur and lithium-ion are commercialized and widely used already (currently pumped storage is a lot more widely used, but it's not possible everyw
262.
▲
by
thomasmg
6y ago
Battery: it doesn't have to be lithium (even thought, currently all planned ones use lithium-ion). Sodium-sulphur would be an option as well. Biofuels are low energy density: this isn't about aviation or transportation, so that&#x
263.
▲
by
thomasmg
6y ago
> What other carbon-free sources provide energy 24/7 Wind + solar + biofuels + waste + batteries. Batteries are primarily for peak usage, and it could be car batteries (V2G). Biofuels are primary for seasonal usage (e.g. winter). Nu
264.
▲
by
thomasmg
6y ago
No, you should not open up the bugs. They show up because they do an organic search, e.g. for apple products. Simply close that source, then the bugs will disappear.
265.
▲
by
thomasmg
6y ago
I was wondering as well. I _think_ he is just a user; an Apple fan ("community"). To some extend Apple employees probably moderate this forum (same as here, or at Stackoverflow.com), but most comments are from the community. I did
266.
▲
by
thomasmg
6y ago
Many Gs of acceleration: I don't think it would be a huge problem, when lying on your back, in a g-suit or submerged in water. I don't think it would require liquid breathing, which is not fully developed yet. Many Gs of decelerat
267.
▲
by
thomasmg
6y ago
With the current version of MacOS I have (not the latest), one could still cause some havoc... E.g. filling the disk by recording a movie with sound. Command+Shift+5. When mashing the keys, sometimes after login a list of message shows up (
268.
▲
by
thomasmg
6y ago
My kid (3 years old then) found an issue in the MacOS lock screen as well. It didn't result in a bypass, but a "Spinning Beach Ball of Death". I could then reproduce it and even filed an issue, but only I could reproduce (and
269.
▲
by
thomasmg
6y ago
Another option is to use an IBLT (Inverted Bloom Lookup Table). it is easy to implement. I recently wrote a file repair tool that uses it: https://github.com/thomasmueller/tinyStats/blob/master/src/m
270.
▲
by
thomasmg
7y ago
A co-worker from Italy told me. But you can find this for example here as well: https://www.aljazeera.com/news/2020/03/italy-south-korea-dif... "Italy started out testing widely, then narrowed the focus
More ›