News for hackers. Stuff that matters.

ceteia

But can't you then set up a system such that if a person only picks one source or a few sources, and that turns out to be bad, that it primarily impacts negatively only themselves? Letting it be their own responsibility?
Re:Show HN: A small, simple music theory library in C99 on Friday February 20, 2026 @12:19AM (#47084085)
Nitpicking:

https://github.com/thelowsunoverthemoon/mahler.c/blob/4ebfe8...

Should that type have been mah_acci instead of int? mah_acci doesn't seem to be used anywhere.

Also, have you considered using (edit) designated initializer syntax for some of the function calls that take in structs as arguments?

https://cppreference.com/w/c/language/struct_initialization....

    struct mah_scale scale = mah_get_scale(
        (struct mah_note) {
            .tone=MAH_C,
            .acci=MAH_NATURAL,
            .pitch=4
        },
        &MAH_BLUES_SCALE, notes,
        MAH_ASCEND,
        NULL
    );
Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @11:54PM (#47083922)
> lol holy shit

How old are you? I assume that you are at least 30 years old, possibly 40 or more years old.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @11:49PM (#47083900)
Sorry, but your arguments and claims are surprisingly poor and wrong.

> That is, all (or at least, all of it that I could find) was wrapping an unsafe API with documented (and usually straightforward and local) invariants that maintain safety, such that the calling code is safe.

A comment does not automatically make code safe. What even is that argument? There have directly been examples of Rust code with SAFETY comments that later were found to be memory unsafe.

Why not then encourage people to seek information from a wide variety of sources?
Would educating people instead and giving them more options for information, not be better than banning access to information?
Re:Farewell, Rust for web on Thursday February 19, 2026 @07:54PM (#47082214)
Enum matching is one of the better aspects of Rust.
Re:Farewell, Rust for web on Thursday February 19, 2026 @07:38PM (#47082065)
> When I update the rust compiler, I do so with very little fear. My code will still work. The rust stdlib backwards compatible story has been very solid.

This is not always true, as seen with rustc 1.80 and the time crate. While it only changed type inference, that still caused some projects like Nix a lot of trouble.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @05:59PM (#47080945)
I am getting the impression that this is an emotional topic for you. This is one reason why I try personally not to be emotionally attached to any programming language, since that leaves me free to be critical of them unhindered, and helps me keep a clear mind about different topics. This can be more difficult to do than it sounds, since many professionals spent a huge portion of their lives working with specific technologies, built their careers on those technologies, and engaged a lot in related communities. And Rust is probably the language community that is the most focused on social aspects. Like the arts and crafts flair on Reddit: https://www.reddit.com/r/rust/comments/1r93j7c/comment/o69vm...
Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @05:01PM (#47080177)
Indeed, unsafe Rust is overall more difficult than C++, like one speaker at a Rust conference claimed: https://lucumr.pocoo.org/2022/1/30/unsafe-rust/

And you are not being honest nor accurate here.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @10:48AM (#47075080)
I have serious doubts about your claims in this latest post. If even half of them are true, then I find it severely disappointing and difficult to comprehend that you somehow have such a poor and lacking understanding of unsafe in Rust, yet make bold claims regarding it, as well as the other faults in your previous comment, and that your description of my post is entirely wrong.
Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @10:43AM (#47075013)
Sorry, but if he or you read and understood that link I gave (and it is not a long link, and it is interesting in my opinion), it would be quite clear. If he boldly comes with false statements about basics, then he cannot be said to be engaging in good faith debate. Especially considering the errors he makes regarding basic logic.

However, I can at least give you a hint: If you have a block of unsafe, is it sufficient to inspect that block of unsafe code if a change is made to a different part of the code that is not in an unsafe block if one is seeking to avoid memory unsafety? If he has done his basic homework, he should have known the answer to that and the consequences of it.

You can also consider this: Why do some Rust projects which do not contain a single line of unsafe, still run Miri, a tool that is designed to catch some (not all) undefined behavior and memory unsafety, and which can run 50x-200x slower than regular Rust? An example can be seen in https://zackoverflow.dev/writing/unsafe-rust-vs-zig/ , where the author used Miri to find memory unsafety in a dependency, upstreamed a fix to that dependency, and then encountered memory unsafety in a different dependency and gave up.

> If you use a crate in your Rust program, Miri will also panic if that crate has some UB. This sucks because there’s no way to configure it to skip over the crate, so you either have to fork and patch the UB yourself, or raise an issue with the authors of the crates and hopefully they fix it.

> This happened to me once on another project and I waited a day for it to get fixed, then when it was finally fixed I immediately ran into another source of UB from another crate and gave up.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @10:29AM (#47074850)
Not Firefox, but Servo has quite a lot of unsafe, even though some of the results are false positives.

https://grep.app/search?f.repo=servo%2Fservo&f.repo.pattern=...

So Servo at the very least cannot be said to be 'safe'. And I believe the Rust code in Firefox is similar.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @07:58AM (#47073266)
Sorry, but you are getting the basics of Rust wrong, and that undermines your whole reply. Please read and understand https://doc.rust-lang.org/nomicon/working-with-unsafe.html before engaging further in topics regarding Rust and unsafe. I also encourage you to spend more time thinking about your arguments, and studying basic logic, since you make several basic errors in reasoning.
Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @06:47AM (#47072809)
Wasn't the F-35 budget "explosion", or overruns, caused in general by mismanagement? But I will not argue that C++ is perfect. Instead, the ttps://en.wikipedia.org/wiki/Ariane_flight_V88 , where US$370 million was lost, with code written in Ada, is an example where Ada was presented as a safer language and even mandated in the military industry, but where it turned out less well in practice. Even proclaimed "safer" languages can have catastrophic failures, and one can suspect that they might even be less safe in practice, especially if they need mandates to be picked. Instead of Ada companies or other organizations lobbying to force industry to use their language, maybe it is better if there is free competition, and then the onus is on the software development companies to deliver high quality. Ada has improved since the 1990s, perhaps because it has been forced to compete fairly with C, C++ and other languages. Following that thinking, increased, not decreased, competition should be encouraged.

Your lucky soul analogy argument doesn't make any sense.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @04:27AM (#47071795)
People made similar arguments regarding C++ versus Ada. The US military and defense industry even got something like a mandate in the 1990s to only write in Ada.

And then there was https://en.wikipedia.org/wiki/Ariane_flight_V88 , where US$370 million was lost. The code was written in Ada.

And using seat belts and wearing helmets do not help in those cases where 'unsafe' is used to take the seat belts and helmets off. And that is needed in Rust in a number of types of cases, such as some types of performance-sensitive code.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @02:19AM (#47070889)
How can you be sure? When I looked at for instance sudo-rs, it proclaimed loudly that it is memory safe, but its code has lots of unsafe.

https://github.com/trifectatechfoundation/sudo-rs

https://grep.app/search?f.repo=trifectatechfoundation%2Fsudo...

And Miri is very popular in Rust. Even if a Rust project doesn't have unsafe, sometimes people still run Miri with it, since dependencies might have messed up their unsafe usage.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @02:06AM (#47070815)
> No, we don't. All of the ones we have are heavily leveraged in Chromium or were outright developed at Google for similar projects. 10s of billions are spent to try to get Chromium to not have these vulnerabilities, using those tools. And here we are.

Chromium is filled with sloppy and old code. Some of the source code (at least if dependencies are included) is more than 20 years old, and a lot of focus has been on performance, not security.

Using Rust does not necessarily solve this. First, performance-sensitive code can require 'unsafe', and unsafe allows for memory unsafety, thus going back to square one, or further back. And second, memory safety isn't the only source of vulnerabilities. Rust's tagged unions and pattern matching help a lot with general program correctness, however, and C++ is lagging behind there.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @01:54AM (#47070746)
https://materialize.com/blog/rust-concurrency-bug-unbounded-...

Edit: Replying to ghusbands:

'unsafe' is a core part of Rust itself, not a separate language. And it occurs often in some types of Rust projects or their dependencies. For instance, to avoid bounds checking and not rely on compiler optimizations, some Rust projects use vec::get_unchecked, which is unsafe. One occurrence in code is here:

https://grep.app/pola-rs/polars/main/crates/polars-io/src/cs...

And there are other reasons than performance to use unsafe, like FFI.

Edit2: ghusbands had a different reply when I wrote the above reply, but edited it since.

Edit3: Ycombinator prevents posting relatively many new comments in a short time span. And ghusbands is also wrong about his answer not being edited without him making that clear.

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @01:23AM (#47070527)
People also write Rust code that is not memory-safe.

https://materialize.com/blog/rust-concurrency-bug-unbounded-...

Re:Zero-day CSS: CVE-2026-2441 exists in the wild on Thursday February 19, 2026 @12:58AM (#47070391)
Does the Rust implementation not use any unsafe and does not use libraries using unsafe?
Are you really OK with runtime "expression patterns"?

    match (0, 1, 2) {
      case (F(), 0, G()) => ...
    }
> Here (F(), 0, G()) is not an expression, but three separate expressions in a tuple pattern. As a result, this code will call F() but not G(), because the mismatch between the middle tuple elements will cause pattern matching to fail before reaching G(). Other than this short-circuiting behavior, a tuple pattern of expression patterns behaves the same as if it were a single expression pattern.

How would that work with exhaustiveness checking? As far as I can tell, they themselves believe that Carbon's exhaustiveness checking will be very poor.

And OK with implicit conversions? Especially when combined with their way of handling templates for pattern matching?

Do you know of a good way to measure market share? I know of GitHub's and StackOverflow's surveys, but I'm not sure how well they reflect reality. There is also Redmonk.

GitHub's survey did not say much about Rust I think, despite Rust projects often having lots of starring. Rust projects might have a greater ratio of stars-to-popularity than projects in other languages, though.

StackOverflow's survey was much more optimistic or indicated popularity for Rust.

Redmonk places Rust at place 19th.

What concerns me is that the design of Carbon in aspects seem to have serious issues already now.

In case that you are well familiar with for instance pattern matching, might you have any opinions on the pattern matching that is currently proposed for Carbon?

https://docs.carbon-lang.dev/docs/design/pattern_matching.ht...

Rust projects generally use licenses like MIT instead of GPL, and thus some major corporations support Rust a lot, and thus Rust will continue getting popular.
The GitHub project has some activity at least, and they might be coming with some announcement later this year.

https://github.com/carbon-language/carbon-lang/

I am not sure how Carbon will go. The Carbon compiler is not ready to be used yet by the public as I understand it, and the roadmap has not been updated for some time now, it seems.

https://docs.carbon-lang.dev/docs/project/roadmap.html

That means that, even if a C developer used or added C bindings to DRM when wanting to write a new driver, they would be forced to write their new driver in Rust regardless. That seems to run counter to the promises made by Linus.
> When an all-new driver is written in Rust, then working on that driver will require knowing Rust.

But that is not what the claim is about, it is about any new driver, not a specific one.

I don't believe that I am. Especially given the other arguments and claims in the email.

Older »