3 ms·
> you'd get a robust C-FFI style implementation of those data structures which has been tested a lot more than some random library that has almost no existing u
by 0x457 4mo ago
> you'd get a robust C-FFI style implementation of those data structures which has been tested a lot more than some random library that has almost no existing users or active maintenance.
What are these mystical random libraries you're talking about? There is a solid C implementation of every data structure on this planet.
- simonw 4mo agoShow me a better C library for HyperLogLog than the one baked into Redis. I went looking and the pure C ones all appeared to be untouched in 10+ years - https://github.com/ivitjuk/libhll https://github.com/ivitjuk/libhll and https://github.com/avz/hll https://github.com/avz/hll for example.
- 0x457 4mo agoWhy? You can just adapt/use https://github.com/redis/redis/blob/unstable/src/hyperloglog.c https://github.com/redis/redis/blob/unstable/src/hyperloglog... Why does it need to be pure C? There are C++ implementations. It's an algorithm not a social media app, it doesn't need to be updated once a week, C also not node.js - it doesn't break compatibility every release. What is wrong with these 10+ years touched ones? Even the redis version of HLL isn't updated all that often.
- simonw 4mo agoThat's exactly what I'm arguing for here: it would be useful if Redis data structures like that were available to be easily embedded in other programs. "You can just adapt X from Redis" is the whole point of this hypothetical.