News for hackers. Stuff that matters.

noctune

Re:Learning a few things about running SQLite on Saturday July 18, 2026 @03:57PM (#48961709)
Or cloudformation, if it is just for AWS anyhow.
Locality is a property of how data is arranged, so it's a property of the data structure, no?
Re:An Interactive Intro to Quadtrees on Friday February 27, 2026 @12:39PM (#47183168)
KD-trees select their splits according to the contained points. That tends to make them better for static sets of points, but updates become expensive. Quadtrees are often used in e.g. physics engines.
Re:Fabrice Bellard's TS Zip on Tuesday January 13, 2026 @05:28AM (#46599247)
Some patterns must happen to repeat, so I would assume the offset to be larger, no?
Re:Better Than JSON on Monday December 01, 2025 @03:44PM (#46112955)
You might be interested in https://connectrpc.com/. It's basically what you describe, though it's not clear to me how well supported it is.
Re:URLs are state containers on Monday November 03, 2025 @02:19AM (#45796609)
It doesn't help that URLs are badly designed. It's a mix of left- and rightmost significant notation, so the most significant part is in the middle of the URL and hard to spot for someone non-technical.

Really we should be going to com.ycombinator.news/item?id=45789474 instead.

I built something similarly a few years ago for `sort | uniq -d` using sketches. The downside is you need two passes, but still it's overall faster than sorting: https://github.com/mpdn/sketch-duplicates
Re:GitOps Considered Harmful on Friday September 26, 2025 @04:53AM (#45384318)
I overall agree with the article; GitOps is great for managing long-lived, shared, stable systems you need a good audit trail for (like production), but testing isn't one of these. Test environments should ideally just be something non-shared you can just spin up and make changes to without asking for permission.
Re:Download responsibly on Monday September 22, 2025 @07:44AM (#45332059)
I don't understand why features like S3's "downloader pays" isn't more widely used (and available outside AWS). Let the inefficient consumer bear their own cost.

Major downside is that this would exclude people without access to payment networks, but maybe you could still have a rate-limited free option.

You can condition IAM on Nitro attestation, so that's doable (if a lot more work than usual).
Re:Fish 4.0: The Fish of Theseus on Sunday December 29, 2024 @07:04AM (#42539431)
The XZ utils supply chain attack also used this to sneakily disable Linux Landlock: https://news.ycombinator.com/item?id=39874404
You can use a radix heap rather than a binary heap. I have an implementation here, with benchmarks using pathfinding: https://github.com/mpdn/radix-heap

It has the nice property that the amortized cost of pushing/popping an element is independent of the number of other elements in the heap.

Re:S3 as a Git remote and LFS server on Saturday October 19, 2024 @05:28PM (#41890916)
S3 recently got conditional writes and you can use do locking entirely in S3 - I don't think they are using this though. Must be too recent an addition.
Re:Async hazard: MMAP is blocking IO on Sunday August 25, 2024 @03:54AM (#41345360)
I think you could make by with some kind of async memory-touch system call, i.e. "page in this range of memory, notify me when finished". The application would have to call this on blocks of the mmap prior to actually reading it.

This of course means you lose some of the benefits of mmap (few system calls, automatic paging), but would maybe still be beneficial from a performance perspective.

Re:How to organize large Rust codebases on Sunday July 14, 2024 @06:28AM (#40960051)
It is very common to have dependencies outside of Cargo. Take cc, the most popular crate for calling the system C/C++ compiler. It currently has 1983 other crates that depend on it [1].

[1]: https://crates.io/crates/cc/reverse_dependencies

Re:Timeline of the xz open source attack on Wednesday April 03, 2024 @10:12AM (#39917763)
The xz backdoor did hide the payload in test data though. Proper sandboxing could have meant that eg. building the binary wouldn't have access to test data.
Re:Xz/liblzma: Bash-stage Obfuscation Explained on Monday April 01, 2024 @03:16PM (#39897980)
I don't really agree - I think its more the case that the build system should be able to prove that tests and test files cannot influence the built artifact. Any test code (or test binary files) going into the produced library is a big red flag.

Bazel is huge and complicated, but it allows making those kinds of assertions.

In Scala there's Future.delegate for turning sync failures into failed futures. Seems like something equivalent should be possible in Javascript.
7 digits of the hash makes for 16*7 possible hashes. I spot 4 potential "filler" lines in that tweet, so if you find log4(16*7)=14 candidates for each of those filler lines, then one combination would be expected to yield that hash.
Re:Applying SRE Principles to CI/CD on Wednesday August 30, 2023 @11:51AM (#37323982)
In my experience, the problem usually is that severity is context sensitive. For example, a external service temporarily returning a few HTTP 500 might not be a significant problem (you should basically expect all webservices to do so occasionally), whereas it consistently returning it over a longer duration can definitely be a problem.
Re:A regular expression to check for prime numbers on Wednesday June 21, 2023 @02:17AM (#36415038)
Personally, I use "regex" for the informal string-matching/rewriting engines found in most languages and "regular expression" for the formal definition.
Re:Merklizing the key/value store for fun and profit on Sunday June 11, 2023 @06:08AM (#36279863)
Wouldn't it be simpler to use a trie over the hashes instead? It seems to me like it would have the properties desired here. I think the parent/child rule described here might actually result in some kind of trie.
Re:Ron: Rusty Object Notation on Sunday April 23, 2023 @06:22AM (#35674977)
JSON is fine for inter-machine communication (like APIs). It's IMO terrible for human-to-machine communication (like configs), which is why there are so many alternatives trying to improve in this space (TOML, YAML, RON, etc.).
Re:The Last Breaking Change on Sunday March 05, 2023 @05:00AM (#35028250)
JSON supports numbers of arbitrary and just fine. It's just many reader/writers of JSON does not, and those are so ubiquitous that it's often not practical to use.
Re:Why should you use Tokio vs. threads in Rust? on Sunday January 29, 2023 @09:43AM (#34568543)
It seems pretty likely that, at some point in the lifetime of a thread, it will consume a lot of the stack and thus touch those pages. And there isn't a mechanism for deallocating those pages again, right?

Tying your memory consumption heavily to the max stack depth also seems like it would be difficult to reason about IMO.

Immutable hash maps are generally O(lg n) inserts and updates, where the mutable counterpart is O(1). So it's not without cost.
Re:Functional Programming – How and Why on Monday January 02, 2023 @11:45AM (#34220034)
Sure, but for some structures it amortizes to log(n) where mutable structures can amortize to O(1).
Re:Functional Programming – How and Why on Monday January 02, 2023 @10:47AM (#34219138)
And persistent memory structures also tends to have a cost. For example, persistent maps are usually O(lg n) lookup and insert rather than O(1) usually seen in mutable maps.

If I remember correctly this is a pretty fundamental limitation of persistent structures, so it's not like there is a better persistent map data structure out there waiting.

You are thinking of a 'dialog box'.
Re:The five-year engineering feat Germany pulled off in months on Tuesday December 13, 2022 @06:17AM (#33967331)
100% efficiency is terrible compared to the 600% efficiency of a heat pump.

Older »