Better HN
topnewbestaskshowjobs
Log inSign up

VorpalWay

1,093 karma · joined Nov 22, 2025 (1y ago) · 431 submissions

Submissions

comment 1d ago · link · parent

I'm no fan of windows (haven't used it for years), but I should point out that strace will show a lot of file system accesses on Linux that appear pointless too. For example trying to open libc.so in various paths other than where it is.

However, on Linux that still tends to be really fast, in part thanks to the negative dentry cache in the kernel (a cache of failed path lookups, there is a positive dentry cache too iirc).

I don't know if this in particular is a bottleneck on Windows though. I just know the end result of the combined engineering decisions is slow.

comment 1d ago · link · parent

There are 12 V batteries with identical performance but different mounting solutions. And slightly different measurements. You absolutely could standardise that sort of pointless proliferation of different variants.

Within a product or company we already try to standardise to keep down the BOM (bill of material). E.g. "Do we really need both a 13 mm and 14 mm screw, or could we adjust the design to only use one of those lengths in both places?". We also standardise across companies, countries or even internationally. Screw diameters cone in specific metric sizes (or a different set of sizes in the US), etc.

Are you suggesting we should merge all companies in the world that agree on using metric screws?

There is no meaningful differentiation today between one set of wheel bearings and another for the same weight cars. Yes a truck and a compact car have different requirements, but two similar sized compact cars or similar sized trucks don't. Same for brake rotors and pads etc. These are solved problems, just like the screw sizes. And thus economies of scale benefits everyone.

comment 2d ago · link · parent

If they standardize internal components like tie rods, wheel bearings and battery trays, I doubt anyone would think the cars look the same. In fact, I think this would be great: standardise the jelly bean parts that don't really change much and don't see much innovation. There is absolutely no reason that different cars should use different incompatible 12 V batteries when the capacity is identical.

comment 3d ago · link · parent

I was considering standard library here. That said, of the languages I worked in, C/C++ is the most annoying to add additional dependencies in.

I will concede that most languages lack support for anything except ASCII and Unicode these days (usually just UTF8 and UTF16), but legacy encodings are mostly pointless these days. I would argue you should if possible reject them, or if you have to handle them: convert on ingress/egress and use UTF8 internally.

As for your first question I was considering general string handling, how painful is it to do the sort of things I typically end up doing with strings: concatenating, stripping leading / trailing whitespace, finding substrings, splitting on lines or other delimiters, splitting after a specific substring, checking if a string is a prefix/suffix of another, search and replace, etc. What exactly people do will differ from person to person, but I would think these are not uncommon operations. And here traditional C and C++ are really unpleasant (again things have improved a bit in modern C++ but still not great).

comment 5d ago · link · parent

C and C++ are amongst the worst for working with strings, substrings, etc. It has gotten a bit better in newer versions of C++ (and I don't keep track of changes in C, so not sure what is going on there these days), but it is still far behind most more modern languages.

Python has good string support, as does Rust. I think (though I don't know it myself) Perl is famous for good string handling? Even bash has ok support for working with strings.

So I don't really agree on "aren't many languages", but then again there are a ton of languages I don't know, so maybe those I mentioned are the exception.

comment 1w ago · link · parent

Arguably there are just two categories: stuff and not-stuff (aka vacuum). And then you go from intergalactic space (almost entirely not-stuff) via interstellar space (marginally more stuff) through planets and stars up to neutron stars (lots of stuff) to black holes (well, we don't actually know what is inside a black hole exactly, our models break down).

Is this classification useful for everyday life? Not at all, but looking at things from different perspectives for a change can be quite amusing.

comment 2w ago · link · parent

> Till the day GMail hits you with the "We couldn't verify it's you" bullshit and locks you out of your account forever. Good luck getting support from Google, the word is not in their lexicon.

This is also true of Microsoft though.

comment 2w ago · link · parent

Linux with AMD graphics is much more stable than with nvidia.

I have also counterintuitivly found Arch Linux (a rolling release distro) way more stable than Ubuntu LTS. Things like sleep works, and any bugs are small and fixed quickly, bug reports are followed up on within a couple of days. With Ubuntu bug reports go without any replies from the maintainers, and maybe it will be fixed by happenstance by the next release.

comment 2w ago · link · parent

I'm thankfully out of the loop on Windows these days, but as I remember it Paint did not have any network features? Is that still true? If if is, maybe it is a misfiling of the CVE and it isn't remote?

Or are they chaining a browser auto opening a download in paint, (but browsers shouldn't do that)...

comment 2w ago · link · parent

Alpine is mostly used in containers, where you don't run sshd anyway. It apparently doesn't use PAM by default though.

OpenWRT also doesn't use PAM by default apparently, and there is a risk of people using password login, which you should never do past initial setup.

But outside specific niches, musl is rare, with good reason. Performance is a joke compared to glibc, especially the allocator. The only reason to choose musl in my opinion is for memory constrained devices (OpenWRT etc) or for building static binaries where performance doesn't matter but portability does. I consider the "small container" use case questionable: performance will suffer, and you could share large base layers instead which would amortize the cost over many different images.

comment 2w ago · link · parent

Most linux distros use PAM, so 2 is also a narrowing filter. Debian, Ubuntu, Fedora, Arch, etc all use PAM.

comment 2w ago · link · parent

You don't typically run sshd in containers, instead you only run whatever single service you set up your container for.

Sure there are native Alpine installs too, but that is far less common of a use case.

comment 2w ago · link · parent

Yes, and at least in the past it did proof of work to verify that it wasn't a bot. Though apparently that is no longer effective against all bots.

comment 1mo ago · link · parent

Yeah, a funny thing with leaded solder being forbidden these days is that it isn't really about dangers when soldering with it, the issue is when it ends up in a garbage dump and leaches out.

The reason you still need fume extraction when soldering is the flux, those fumes are quite nasty to inhale. (How nasty varies based on the specific formulation, I recommend using proper ventilation for all of it though.)

(For those who don't know, the flux is there to prevent/clean oxidation and make the solder flow onto the metal pads and pins. Most solder wire contain a core of flux and you can also add additional flux if needed, usually liquid or a paste that melts into a liquid.)

comment 1mo ago · link · parent

Recent downloads per day show the opposite trend, with 2500k vs 1600k per day (with zlib-rs leading). The issue is zlib-rs is far younger so looking at total downloads is nonsense. And there is inertia to switch over as well.

comment 1mo ago · link · parent

Zlib-rs is several years newer, of course it has fewer downloads. Looking at recent downloads per day zlib-rs easily leads (2,500,000 vs 1,600,000)

comment 1mo ago · link · parent

A video on vulnerabilities in Asus routers was released yesterday: https://youtube.com/watch?v=kYnwCx2SNYY

But if you are talking TVs specifically, I expect they will get back to that too.

comment 1mo ago · link · parent

> lean-zip beats every single compression level miniz_oxide

Miniz_oxide is an intentionally simple implementation. It would be more fair to compare it to the newer zlib-rs[1], which even beats zlib-ng (fastest implementation in C)[2].

[1]: https://lib.rs/crates/zlib-rs

[2]: https://trifectatech.org/blog/zlib-rs-is-faster-than-c/

comment 1mo ago · link · parent

The term you are looking for is viscosity. Water has higher viscosity than air. Honey and syrup even higher still. It basically describes how "thick" the medium is, or to be a bit more precise, how much it resists forces applied to it.

comment 1mo ago · link · parent

Honestly, why would we need anything except LE for TLS certs? Sure, they don't issue EV certs, but isn't that completely dead by now anyway?

You could argue single point of failure, which is fair, so then set up another LE clone which is run in a similar way in another (reasonable) country.

(And there is of course non TLS certs, such as code signing and S/MIME, if that is still a thing. I'm only arguing about the TLS case here.)

comment 1mo ago · link · parent

You could store the public key for each website in DNS. But now you moved the trust problem to DNSSEC. So far I haven't heard about issues like this for DNSSEC, but then again it is not a massive target currently.

comment 1mo ago · link · parent

It baffles me that software on Linux/Windows/MacOS doesn't just use the system certificate store, then it would just be a single place to update. Instead we need to be update pip, UV, node, etc separately.

I can see the case on phones: the OS may no longer be supported by the vendor, so browsers shipping their own set makes sense. And on embedded there isn't (and on IOT there might not be) an OS, but then you should probably just ship the the single CA that you use, not all of them.

comment 1mo ago · link · parent

Link is broken, gives some randomly generated text when using Brave on Android. Their AI bot detection is not very good.

comment 1mo ago · link · parent

> Has your “real” computer never had a bug or regresssion?

Sure, but the question is how limited you are in what you can do about it. iDevices are incredibly locked down. On my laptop I would just use the package manager to downgrade a package until it is fixed, or restore a backup. Or you could just fix the code yourself (or ask an AI for help to do so these days).

Even Windows has system restore to roll back to a previous OS version iirc (though it has been many years since I used windows last, going to all Linux has been so good). Not sure if that is possible on an iPad? I know Android doesn't really let you downgrade either the OS or an individual app, I would assume it is similar on iOS.

comment 1mo ago · link · parent

I believe they have used OSM for a long time yes (over a decade at least), not exactly a secret.

comment 1mo ago · link · parent

You can easily get memory safety issues with any concurrency though. Since this is a property of the the raw underlying hardware model of concurrency you can't work around it. See https://www.ralfj.de/blog/2025/07/24/memory-safety.html for an example of this is Go.

As soon as you have something larger than the hardware atomic size (or unaligned in memory) you risk torn reads/writes. So a pointer + a size for example on some architectures (some hardware like x86 has a double word atomic support, but on embedded you usually only get up to word size atomics).

All this means that you can't (in a systems level language) feasibly make everything atomic and ensure no UB.

All that said, do I wish Rust did more for other concurrency bugs? Yes, sure. Though there is some hope: I have seen Rust crates to enforce lock ordering at compile time (I think that originally came out of the Fuchsia OS kernel development). There is also scoped threads, rayon, actor frameworks etc. All different approaches to strucured concurrency, with the goal of reducing bugs. Different frameworks seem to suit different problems though. For what I do I rarely need mutexes, instead either rayon or message passing work well.

comment 1mo ago · link · parent

Is github built out of a house of cards? How does this stuff keep happening?

comment 1mo ago · link · parent

Rust is specifically designed to ensure that safe code can never trigger UB (barring compiler bugs, or bugs in unsafe code blocks). For that, protecting against races is necessary (at least when using LLVM as a backend, and when using the C++ memory model).

In practice rust also tries to guide you towards patterns that reduces the risk of other bugs. For example, using Result, Option (and enums in general) reduces the risk that you forget to handle error paths. It is also quite hard to get memory leaks unintentionally in Rust, since by default you work with various smart pointers.

In my experience typical multi-threaded C++ has a lot of threading bugs that tend to cause hard to reproduce bugs (I work in safety critical hard realtime robotics / machine control, where we have a lot of communicating threads). When I code Rust I can trust the language to prevent those classes of bugs, letting me focus on the actual hard domain specific problems, rather than language minutiae. Yes, TSAN helps in C++, but that is dynamic analysis so it has to actually catch the potential problem happening while running.

So I think that the multithreading approach in Rust is really good and what we want, not a hindrance. It is absolutely the right thing to do.

Now, the async story is another matter and I have conflicting opinions on how that is done in rust. I can't think of a significantly better design that would work on microcontrollers / no-std though. I'm not interested in anything that requires allocations or a runtime.

comment 1mo ago · link · parent

Concurrency issues (such as torn writes) can easily cause out of bounds and similar UB on other threads, so focusing on races is not arbitrary if you want to be a systems level language.

Sure, you could pay the overhead of a managed language and have the runtime handle synchronization behind your back, but that isn't the path Rust went down.

comment 1mo ago · link · parent

As someone who worked professionally with both C++ and Rust, I mostly agree with this, but I would say that writing the concurrent code in C++ is also hard.

The only way I found that works reliably is stick to a small well defined set of mostly safe primitives. E.g. at work we use message passing / event bus architecture everywhere, which works great for a robotics / industrial context. But even then, if you somehow mess up and have a variable accessed from event handlers in two different threads, it is tough to spot other than if you get lucky and observe it with a build using TSAN.

With rust that class of mistakes is just entirely eliminated, which makes it easier to to concentrate on the hard things that actually matter (like the domain specific logic).

12345
15