Hacker Newsnew | past | comments | ask | show | jobs | submit | mlindner's commentslogin

Title is incorrect. Calling him a "Musk ally" is misleading.

If the API cannot be made safe then it must be marked unsafe.

I mean, remove() is already marked unsafe?

Otherwise there's the question of where exactly the API boundaries are. In the most general case, your unsafe boundary is going to be the module boundary; as long as what you publicly expose is safe modulo bugs, you're good. In this case the fix was in a crate-internal function, so I suppose one could argue that the public API was/is fine.

That being said, I'm not super-familiar with the code in question so I can't definitively say that there's no way to make internal changes to reduce the risk of similar errors.


Yeah this is a bad fix. It should be impossible to cause incorrect things to happen from safe code, especially from safe code calling safe code.

The author of the patch does mention that the better thing to do in the long run is to replace the data structure with one that is possible to better encapsulate: https://lore.kernel.org/all/20251111-binder-fix-list-remove-...

Ultimately all software has to touch hardware somewhere. There is no way to verify that the hardware always does what it is supposed to be because reality is not a computer. At the bottom of every dependency tree in any Rust code there always has to be unsafe code. But because Rust is the way it is those interfaces are the only places you need to check for incorrectly written code. Everywhere else that is just using safe code is automatically correct as long as the unsafe code was correct.

This made me quite curious, is there a list somewhere of what bad APIs have been removed/improved and/or technical debt that's been addressed? Or if not a list, some notable examples?


I don't know that there's a list, but cases come to mind because they've been controversial.

(Not a Linux hacker, so apologies if I get this wrong)

The filesystem APIs were quite arcane, and in particular whether or not you were allowed to call a C function at a certain point wasn't documented, and relied on experience to know already.

In trying to write idiomatic Rust bindings, the Rust for Linux group asked the filesystems maintainer if they could document these requirements, so that the Rust bindings could enforce as much of them as they could.

The result was... drama.


I've never met anything written in JS/Typescript that I would call "well written".


I have. I personally really enjoy the recent crop of UI frameworks built for the web. Tools like Solidjs or Svelte.

Whatever your thoughts are about react, the JavaScript community that has been the tip of the spear for experimenting with new ways to program user interfaces. They’ve been at it for decades - ever since jQuery. The rest of the programming world are playing catchup. For example, SwiftUI.

VSCode is also a wonderful little IDE. Somehow much faster and more stable than XCode, despite being built on electron.


Great points! I think your point about the JS community is often overlooked. Electron et al have made desktop UI/UX considerations more salient in the JS world. Desktop-like experiences in the browser can be great.


I guess you should read more code.


Bait used to be credible.


Providing the default of additional safety with the ability to opt out that safety is pro-freedom.


Just FYI, but the voice for this channel is AI generated.


The toughest thing to realize is that it is not obvious. Other posters here say it's a human, which was my assumption. But I wouldn't bet my savings either way anymore.


Synthetic text-to-speech and “Ai” generated are not the same thing. We’ve been doing TTS for 30 years now - get over it


We haven't been doing it in such a way that a person is misled into thinking they are hearing a real human narrator.

Yes, that matters. People want to know if what they are looking at or listening to is AI or not.


> Judge: EU should block sanctions

If you do that then the US would respond by doing things like attempting to block EU laws that affect US companies. They're American companies. You can't just block them. American companies won't refuse to follow American law. If you put them in a position where they are forced to either follow American law and European law that are in conflict then they'll be forced to withdraw from the European market.


This was already covered in the previous thread you mentioned. Just merge the threads.


Dang added the previous thread to the description. I don't know why he didn't merge them.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: