Todo type in rust will be a never type. Eg thing which exit or panic returns
HN user
0xdeafbeef
Location: Belgrade, Serbia Remote: Yes Willing to relocate: Yes, preferably EU/UK Technologies: Rust, Python, C, RocksDB, PostgreSQL, Kafka, ClickHouse, TiDB, Vector, Linux hacking, eBPF, Docker, Kubernetes, Ansible, Terraform, GCP, GitLab CI, GitHub Actions Résumé/CV: Available on request. GitHub: github.com/0xdeafbeef, LinkedIn: linkedin.com/in/petrzhikovskii Email: vovkap97@gmail.com
I was thinking about transaction processing, eg visa/blockchain. And here storing and sending almost full packet for signature instead of 32 bytes matters. For sessions this shouldn't matter
Cost is 100+ times bigger signature size and more cpu usage. If you process several k per second it matters
Try g.ai. It's stupid fast and uses google indexes. Kagi? sometimes doesn't correctly parse intent, in Google thing you can just ask function doing this and gives you it, with examples, grounding and extremely fast. I'm paying for kagi since the begging and I guess id cancel it because it gives not so much added value
Care to opensource? I'd like to use it in firefox, will send a pr
Filed an issue for codex
Bftree solves one non-obvious pain point - caching when your data set is random (the key is a hash) and the data is smaller than the page size. LSM reads are based on block size; same with caching. So if your record is 8 bytes, you end up caching the remaining ~4 KB, and the hit rate will be pretty low.
I've tested with wal enabled, got deadlock several times, so looks raw for now
It was 1 year ago. Around 15 tikv serves, 32 cpu, 128 ram each, 4 tb nvme. In this case latency matters a lot. When i had load server in different region with ping of 3ms I got 70k inserts, when moved to the same region with sub ms ping it went to thousands
Tidb should handle it nice. I've wrote 200к inserts / sec for hour in peak. Underlying lsm works better for writes
Also, won't most of the lib be removed due to dead code elimination? And used code will be inlined where applicable, so nothing to dedup in reality
Rust can set restricts to all pointers, because 1 mut xor many shared refs rule. Borrow checker empowers this. https://en.wikipedia.org/wiki/Restrict
What the point, though? You will get compiling code, but later you would need to reachitecture code to avoid violating rust rules.
It takse long to regen on big codebases, but yes
https://www.shloked.com/writing/chatgpt-memory-bitter-lesson
Mb something 've changed since post
Only your questions are in it though
much better https://chatgpt.com/s/t_693b489d5a8881918b723670eaca5734 than 5.1 https://chatgpt.com/s/t_6915c8bd1c80819183a54cd144b55eb2.
Same query - what romanian football player won the premier league
update. Even instant returns correct result without problems
Retry is fine, but imagine being unable to pay for something within 10 minutes in month. And 10m in 1M is 99.98% sla. So it depends
Yeah yeah, every gcc update I need to patch rocksb sources somehow, because now compiler doesn't ship some includes by default.
I remember only a single breakage of previously compiling code with the time crate because of a change in type inference, but even there the compiler told me to update the lib. And that’s in 6 years of using Rust.
https://chatgpt.com/s/t_6915c8bd1c80819183a54cd144b55eb2
Damn this is a lot of self correcting
What to use instead?
Page cache reclamation is mostly single threaded. It's much simpler, than you can create in a user space, it has no weight for specific pages etc.
Traveling into kernel flushes branch predictor caches, tlb. So it's not free at all.
There is already tidb :)
Same for anthropic
you need only to cache asm output. It will take a few kb and no waste of cpu cycles.
#include <vector> #include <iostream>
int main() {
std::vector<int> vec = {1, 2, 3};
vec.reserve(3);
std::cout << "Initial capacity: " << vec.capacity() << std::endl;
std::cout << "Initial data address: " << (void*)vec.data() << std::endl;
int* ptr = vec.data();
std::cout << "Pointer before push_back: " << (void*)ptr << std::endl;
std::cout << "Value via pointer before push_back: " << *ptr << std::endl;
std::cout << "\nPushing back 4...\n" << std::endl;
vec.push_back(4);
std::cout << "New capacity: " << vec.capacity() << std::endl;
std::cout << "New data address: " << (void*)vec.data() << std::endl;
std::cout << "\nAttempting to access data via the old pointer..." << std::endl;
std::cout << "Old pointer value: " << (void*)ptr << std::endl;
int value = *ptr;
std::cout << "Read from dangling pointer (UB): " << value << std::endl;
return 0;
}
./a.out
Initial capacity: 3
Initial data address: 0x517d2b0
Pointer before push_back: 0x517d2b0
Value via pointer before push_back: 1Pushing back 4...
New capacity: 6 New data address: 0x517d6e0
Attempting to access data via the old pointer... Old pointer value: 0x517d2b0 Read from dangling pointer (UB): 20861
Have you tried https://github.com/qarmin/czkawka?
TiDB, 200k inserts per second; 200b per row on average. Bursty insert pattern, e.g., can have 200k inserts for an hour, then almost 0 for days. 8k reads per second on average, mostly reads by primary key. 20 hosts; 16 threads x 128GB RAM, 8TB NVME RAID 10. 60TiB of useful storage with replication factor of 3. Keyset pagination is the key. Also using rocksb for inserts batching. Costs around 20k on ovh
See https://lwn.net/Articles/922405/ for a description of what it does and https://lwn.net/Articles/972710/ for the controversy it caused that is the reason why it took so long to land in mainline.