News for hackers. Stuff that matters.

nikeee

Re:JEP 540: Simple JSON API (Now in Incubator) on Thursday July 23, 2026 @02:15PM (#49025864)
I don't like this:

    String body = ... REST response body, which is a JSON document ... ;
    JsonValue json = Json.parse(body);
    json.get("properties").get("periods").asList().stream()
        .mapToInt(j -> j.get("temperature").asInt())
        .average()
        .ifPresent(IO::println);
Why am I able to call `.get(string)` or `.get(int)` on a JsonValue? Shouldn't these be on the JsonObject and JsonArray instead?

> If the JsonValue instance is of the wrong type, or if the requested member or element does not exist, the access methods throw a JsonValueException.

So if I get an exception, I can't tell whether the value was of the wrong type or the object didn't have the requested key? This looks like a footgun to me.

They just brought pattern matching to Java. Why not move those .get to JsonArray and JsonObject? That would solve this confusions. So we could just use something like `if (json instanceof JsonObject o) o.get("properties")`

Re:No Slop Grenade on Thursday May 21, 2026 @01:06PM (#48225923)
I suspect that, too. But to me, it signals the exact opposite.
Re:No Slop Grenade on Thursday May 21, 2026 @11:40AM (#48224607)
In that case I still want to see exactly this prompt. Then I know that the person didn't even think about my question thoug I asked _them_ for their opinion and I could have asked ChatGPT myself (and already probably have).
Re:No Slop Grenade on Thursday May 21, 2026 @09:04AM (#48221973)
When I'm encountering some WoT like that, I'd like to have a button like "view source", but for "view prompt".

Most ai generated messages or docs are unnecessarily verbose and just reading the prompt would suffice. I don't really get why some people seem to think that it's somehow better to have their bullet point prompt as a huge text.

It just wastes my time. And probably only makes it look like it took more effort than it actually did (it may be the exact opposite).

Re:Bun is being ported from Zig to Rust on Monday May 04, 2026 @09:34PM (#48017048)
Zig is a moving target that has breaking changes in every release (which is fine as they are sub-1.0). But that means that AI tools have been trained on outdated syntax/etc. Zig isn't that common, so there is even less training data to begin with.

Rust on the other hand is pretty established by now and has less breaking changes. It also has more compile-time safety-guarantees that makes vibe-coding a bit more confident.

In top of that, Zig has rejected their upstream contributions. So they'd have to maintain their own compiler in the long run, which is probably just technical debt to maintain.

Re:I Just Want Simple S3 on Monday April 13, 2026 @07:14PM (#47759199)
I am building an S3 client [1] where I have a test matrix that tests against common S3 implementations, including RustFS.

That test matrix uncovered that post policies were only checked for exsitence and a valid signature, not if the request actually conforms to the signed policy. That was an arbitrary object write resulting in CVE-2026-27607 [2].

In the very first issue for this bug [3], it seemed that the authors of the S3 implementation didn't know the difference between the content-length of GetObject and content-length-range of a PostObject. That was kind of a bummer and leads me to advise all my friends not to use rustfs, though I like what they are doing in principal (building a Minio alternative).

[1]: https://github.com/nikeee/lean-s3 [2]: https://github.com/rustfs/rustfs/security/advisories/GHSA-w5... [3]: https://github.com/rustfs/rustfs/issues/984

Re:Does coding with LLMs mean more microservices? on Monday April 06, 2026 @05:18AM (#47658579)
What matters for LLMs is what matters for humans, which usually means DX. Most Microservice setups are extremely hard to debug across service boundaries, so I think in the future, we'll see more architectural decisions that make sense for LLMs to work with. Which will probably mean modular monoliths or something like that.
Re:Temporal: The 9-Year Journey to Fix Time in JavaScript on Wednesday March 11, 2026 @07:34PM (#47344042)
It is called Duration.
Re:Making WebAssembly a first-class language on the Web on Wednesday March 11, 2026 @02:47PM (#47339552)
> the only viable use cases were compute-heavy workloads like codecs and crypto,

I tried using it for crypto, but WASM does not have instructions for crypto. So it basically falls back to be non-hw-accelerated. Tried to find out why and the explanation seems to be that it's not needed because JS has a `crypto` API which uses hw intrinsics.

Re:Package Managers Need to Cool Down on Saturday March 07, 2026 @07:58PM (#47293199)
That could probably be solved by opting in to the permission model of Node. But that won't work for everybody, especially in legacy applications.

Having trusted dependencies at least drastically reduces the risk that 'git clone && npm install' takes over the entire system.

Cooling down dependencies would certainly help, also.

Re:Package Managers Need to Cool Down on Saturday March 07, 2026 @07:54PM (#47293180)
Some tools also install pre-commit hooks. I don't like this practice, but I get why people are using it.
Re:Package Managers Need to Cool Down on Saturday March 07, 2026 @06:06PM (#47292358)
Bun added `trustedDependencies` [1] to package.json and only executes postInstall scripts coming from these dependencies. I think this is something that should be supported across all JS package managers, even more than version cooldowns.

[1]: https://bun.com/docs/guides/install/trusted

Re:What does " 2>&1 " mean? on Thursday February 26, 2026 @07:08PM (#47174268)
So if i happen to know the numbers of other file descriptors of the process (listed in /proc), i can redirect to other files opened in the current process? 2>&1234? Or is it restricted to 0/1/2 by the shell?

Would probably be hard to guess since the process may not have opened any file once it started.

I use git-trim for that:

https://github.com/foriequal0/git-trim

Readme also explains why it's better than a bash-oneliner in some cases.

Re:Farewell, Rust for web on Thursday February 19, 2026 @04:59PM (#47080145)
Or you don't use the defualt case and rely on definite assignment analysis or checks for returns in every code path.

I find the never type in TS actually being a proper bottom type + having control-flow based types vastly superior to what rust offers.

Re:Nuudel: Non-Tracking Appointment Tool on Tuesday January 20, 2026 @11:02AM (#46693313)
There was dudle [1] developed and hosted by a German university. Seems unmaintained, but there is an independent project called BitPoll [2].

[1]: https://github.com/kellerben/dudle [2]: https://github.com/fsinfuhh/BitPoll

Re:Dead Internet Theory on Sunday January 18, 2026 @11:10PM (#46674970)
I hope that when all online content is entirely AI generated, humanity will put their phone aside and re-discover reality because we realize that the social networks have become entirely worthless.
Re:AWS European Sovereign Cloud on Thursday January 15, 2026 @06:50PM (#46641172)
What if the software is developed and potentially backdoored in the US and deployed by the EU team in the sovereign region? Or did they rewrite the entire AWS stack?
Re:Kidnapped by Deutsche Bahn on Monday December 29, 2025 @02:37PM (#46424555)
Keep in mind that a train in Germany counts as one-time if it is less than 6 minutes late. In Switzerland, it's 3 minutes.

Also in Germany, a train that did not even arrive does not count as too late.

There is also a concept of the "Pofalla-Wende", which is when a train is so late that it just does a 180 and drives back, to mitigate that the delay doesn't carry over to the train's next route. Of course, that means that it skips the stations at the end of the route.

Re:Pricing Changes for GitHub Actions on Tuesday December 16, 2025 @04:48PM (#46295013)
Given that I can dump hundreds of TBs into the private container registry without paying anything I'm pretty surprised that they now charge for what is basically providing log streaming and retention.
Re:Icons in Menus Everywhere – Send Help on Monday December 08, 2025 @07:20PM (#46199667)
MS Office only has icons for the things that matter most. I think MS even had a UI guideline similar to the one that is cited from apple in TFA, but I cannot find it.

The author doesn't ask for _no_ icons at all. So I really don't get this critique.

Intentionally omitting some icons is a really powerful tool to draw attention to the actions that the user wants to do most of the time. I think that pattern went away in some places because it looks more consistent (that doesn't mean that usability is better) and some designers have some kind of OCD. At least that's what I have experienced in that exact case.

Re:Checked-size array parameters in C on Wednesday December 03, 2025 @05:57PM (#46141461)
GCC also has an extension to support references to other parameters of the function:

    #include <stddef.h>
    void foo(size_t n, int b[static n]);
https://godbolt.org/z/c4o7hGaG1

It is not limited to compile-time constants. Doesn't work in clang, sadly.

Re:MinIO is now in maintenance-mode on Wednesday December 03, 2025 @01:51PM (#46138379)
I maintain an S3 client that has a test matrix for the commonly used S3 implementations. RustFS regularly breaks it. Last time it did I removed it from the matrix because deleteObject suddenly didn't delete the object any more. It is extremely unstable in its current form. The website states that it is not in a production-ready state, which I can confirm.

I'd take a look at garage (didn't try seaweed yet).

Re:MinIO is now in maintenance-mode on Wednesday December 03, 2025 @01:47PM (#46138332)
Didn't contribute to MinIO, but if they accepted external contributions without making them sign a CLA, they cannot change the license without asking every external contributor for consent to the license change. As it is AGPL, they still have to provide the source code somewhere.

IANAL, of course

Re:Progress on TypeScript 7 – December 2025 on Tuesday December 02, 2025 @03:00PM (#46126013)
The "types as comments" proposal has a stated goal to not codify any semantics to the annotations.

This is not only due to implementation complexity, but also to keep TS to be able to change. Or even to build an entire different JS superset. With that proposal, even flow could be natively executed.

The folders actually have the English name in all languages. It's just explorer.exe that uses the desktop.ini inside those folders to display a localized name. When using the CLI, you can see that.

At least it's like that since Windows 7. In windows XP, it actually used the localized names on disk.

Re:TIL: `satisfies` is my favorite TypeScript keyword on Sunday November 23, 2025 @06:06AM (#46022526)
I still keep my assertNever function because it will handle non-exhaustiveness at runtime.
Yeah, "fixed it" doesn't provide any information that might be hallucinated.

Please don't use AI-generated commit messages blindly. Instead, use AI later when reading commit messages. It will have more context (following commits) to see what was actually happening. Having to guess whether a message was hallucinated by an AI won't help. If the message conflicts in its intention with what it isactually doing, you can spot the bug. You won't get that with AI messages.

Also, using AI commit messages will freeze it's capabilities in time, when creating the commit. When using AI at reading commit messages, you'll always get the latest options for analyzing the commits.

Just because it has more text doesn't make it a better message.

Re:Using the Web Monetization API for fun and profit on Friday November 07, 2025 @10:21PM (#45853833)
Not to be confused with the already existing Payment Request API: https://developer.mozilla.org/en-US/docs/Web/API/Payment_Req...
Re:NaN, the not-a-number number that isn't NaN on Thursday October 30, 2025 @03:13PM (#45764050)
I think a better reasoning is that NaN does not have a single binary representation but in software, one may not be able to distinguish them.

An f32-NaN has 22 bits that can have any value, originally intended to encode error information or other user data. Also, there are two kinds of NaNs: queit NaN (qNaN) and signalling NaNs (sNaN) which behave differently when used in calculations (sNaNs may throw exceptions).

Without looking at the bits, all you can see is NaN, so it makes sense to not equal them in general. Otherwise, some NaN === NaN and some NaN !== NaN, which would be even more confusing.

Older »