HNHacker News
TopNewBestAskShowJobs

commodoreboxer

375 karma · joined July 3, 2024

submissionscomments
commodoreboxer··on Translating All C to Rust (TRACTOR)
Given the story at hand, it sounds like the center incorrectly assumed the compiler would prevent UB even in unsafe blocks. They wouldn't be saying "But the compiler said it was okay" if it wasn't unsafe code they had written.

I think the story is just somebody who didn't actually learn unsafe Rust properly (and I'm struggling to give it the benefit of the doubt, as it sounds quite exaggerated; I couldn't imagine a novice Rust dev literally crying because they thought unsafe blocks couldn't cause UB. If you were that emotionally attached to the language, I'd expect you to have learned what unsafe means).

commodoreboxer··on Translating All C to Rust (TRACTOR)
I don't know if he's choosing to ignore it, or if it's simply hard to figure out exactly what you're saying. Your comments are unfocused in a way that makes it hard to engage with any specific point.

The points are:

* Unsafe Rust is required to uphold specific guarantees to not cause undefined behavior. This can be tricky, but it's not impossible, it just involves a lot of care and some tooling like Miri for those specific situations. The situation is the same as pretty much the entirety of the C and C++ languages, plus Rust reference safety.

* Safe Rust is designed to not cause any UB on its own. It can only "bleed" UB from incorrect unsafe code. Without any incorrect unsafe code, this is easy to work with and involves much less work and care.

* Therefore, keeping your unsafe blocks small and in dedicated crates where they can be individually tested increases the quality and reliability of the codebase.

Surely you can see that it's an improvement over the previous status quo. I don't know what absolutist stance you're talking about. Most Rust fans I know, including myself, accept that Rust is an imperfect language, representing an improvement over C and C++. It's not just hypothetical either. Rust has brought demonstrated improvement in reliability for us, and for some of the biggest companies in the world who now lean on it to reduce their rate of defects.

commodoreboxer··on Quark Stars
I don't have a problem with your post, but the hostility I see is mostly out of a real concern that people posting LLM comments could degrade discussion. It's probably also association, because a lot of people have started posting comments that just say "ChatGPT says..." and nearly the entirety of the body is just LLM output.

Honestly, a lot of people are just sick of seeing anything about LLMs and don't like seeing it at all in threads that aren't already about it.

commodoreboxer··on Translating All C to Rust (TRACTOR)
You can do tons of stuff with purely safe Rust. The main things that you can't do are FFI, making self-referential structures, and dereferencing raw pointers.

And unsafe isn't a problem. It's a point of potential danger to be heavily audited, tested, and understood. Having the entire language unsafe by default is an obviously worse situation. This is throwing the baby out with the bathwater, like rallying against seat belts because you can still die while wearing one. An improvement is still an improvement. I don't understand why people criticizing Rust tend so heavily to let perfect be the enemy of good.

commodoreboxer··on Translating All C to Rust (TRACTOR)
A lot of people are reading this as a call or demand to translate all C and C++ code to Rust, but (despite the catchy project name), I don't read the abstract in that way. There are two related but separate paragraphs.

1. C and C++ just aren't safe enough at large. Even with careful programming and good tooling, so many vulnerabilities are caused by their unsafe by default designs. Therefore, as much code as possible should be translated to or written in "safe" languages (especially ones that guarantee memory safety).

2. We are funding and calling for software to translate existing C code into Rust.

It's not a consensus to rewrite the world in Rust. It's a consensus to migrate to safe languages, which Rust is an example of, and a program that targets Rust in such migration.

commodoreboxer··on Translating All C to Rust (TRACTOR)
Yes, in particular some interactions with LLVM have caused some frustrating UB. But those are considered implementation bugs, rather than user bugs, and all the conditions Miri states at the top are relevant primarily in unsafe code, which contradicts the OP's point, which is that there are tons of documented cases of UB in safe Rust. This is not true. There are a few documented cases, and most have been fixed. It's nowhere close to the world of C or C++'s UB minefield.
commodoreboxer··on Translating All C to Rust (TRACTOR)
> This repository demonstrates that, when using 'safe' Rust, there are still double-digits cases where you may still encounter dread-pirate-UB.

No it doesn't. Miri is for unsafe code. There's no UB in safe Rust by design. Any UB caused without unsafe is considered a bug to be fixed.

commodoreboxer··on Translating All C to Rust (TRACTOR)
> Miri is an Undefined Behavior detection tool for Rust. It can run binaries and test suites of cargo projects and detect unsafe code that fails to uphold its safety requirements.

> ... detect unsafe code that fails ...

Show me the documented safe Rust code that causes UB without using any unsafe blocks outside of the standard library.

commodoreboxer··on NVIDIA Transitions Fully Towards Open-Source Linux GPU Kernel Modules
They care when it affects their bottom line, and customers leaving for the competition does that.

I don't know if that's what's happening here, honestly, but you're right that they don't care about being shamed, but building a reputation of being hard to work with and target, especially in a growing market like Linux (still tiny, but growing nonetheless, and becoming significantly more important in the areas where non-gaming GPU use is concerned) can start to erode sales and B2B relationships, and the latter particularly if you make the programmers and PMs hate using your products.

commodoreboxer··on Researchers build a solar-powered hovering drone that weighs only 9 mg
The second and penultimate paragraphs both explain that.
commodoreboxer··on Making Elizabethan plays understandable and fun to read
"reductive" isn't an insult. And note the "just" in the parent post. It is an adaptation, but it is more than just that.
commodoreboxer··on Making Elizabethan plays understandable and fun to read
Shakespeare is best appreciated in the original pronunciation (OP). I'm a little disappointed that OP Shakespeare continues to be a little niche, given that it's necessary for many of the rhymes and puns. Personally, I think it just sounds better than received pronunciation (RP).

I think that's one of the strongest arguments against modernizing the language. Shakespeare has a flow, and much verse, that is lost in any translation, or has to be creatively and intelligently reproduced across a language barrier.

commodoreboxer··on The rise of the camera launched a fight to protect Gilded Age privacy
It's really not that hard to have a smart TV and simply not connect it to your network. They'll beg to connect, but I haven't seen one that will refuse to function without an internet connection.
commodoreboxer··on Rust for Filesystems
It's on par with C++, too. In C++ you need an `extern "C"`, because C++ linkage isn't guaranteed to be the same as C linkage. You can get away with wrapping that around it in a preprocessor conditional, but that's not all that much easier than Rust's bindgen.

A lot of C to C++ interop is actually done wrong without knowing it. Throwing a C++ static function as a callback into a C function usually works, but it's not technically correct because the linkage isn't guaranteed to be the same without an extern "C". In practice, it usually is the same, but this is implementation-defined, and C++ could use a different calling convention from C (e.g. cdecl vs fastcall vs stdcall. The Borland C++ compiler uses fastcall by default for C++ functions, which will make them illegal callbacks for C functions).

The major difference between Objective-C and C++'s C interop and other languages is the lack of the preprocessor. Macros will just work because they use the same preprocessor. That's really not easy to paper over in other languages that can't speak the C preprocessor.

commodoreboxer··on Git-PR: patch requests over SSH
I don't understand the analogy. What's the actual risk exposed by pushing to a magic branch path that opens a PR instead of actually creating a branch, compared to creating a fork and making a PR in that way?
commodoreboxer··on Git-PR: patch requests over SSH
You cut off the important part:

> in a separate branch namespace

So not really. It's a special branch path that only exists for opening PRs, and doesn't do anything other than opening a PR. Yes, they share an object space, but so do forks in the first place, so any security issues with this flow are the same ones in the fork-PR flow.

You can check out this which covers the whole flow: https://git-repo.info/en/2020/03/agit-flow-and-git-repo/

Or for a simpler overview, look at Gitea/Forgejo's implementation: https://forgejo.org/docs/latest/user/agit-support/

commodoreboxer··on Twilio confirms data breach after hackers leak 33M Authy user phone numbers
Occasionally I'll get spam from numbers in my contacts. I got a virtual kidnapping call from my wife's number the other day, which would have been terrifying if she wasn't sitting right next to me.
commodoreboxer··on I Received an AI Email
My issue was with "we know what modern entertainment looks like" as if humans are now incapable of enjoying themselves without a screen. And you should care about a massive market increase when it's directly relevant to the point at hand. If the initial point was "we know what modern entertainment looks like, nobody plays board games or reads books", pointing out that the board game market has more than doubled in the past decade is far from irrelevant. It actually directly counters the point.

I agree with your second paragraph, and selling the "make better choices to save the world" argument is an industry playbook favorite. Environmental damage needs to be put on the shoulders of those who cause it, which is overwhelmingly industrial actors. AI is not useful enough to continue the slide into burning more fossil fuels than ever. If it spurs more green energy, good. If it's the old "well this is the way things are now", that's really not good enough.

commodoreboxer··on I Received an AI Email
GDP is a measure. I'm very much not an economist, but I am extremely skeptical that the health of an economy can be reduced to any single number. Goodheart's law and all.

I concede that GDP is a good indicator, but I think you can have things that help GDP while simultaneously hurting the economy. Otherwise any scam or con would be considered beneficial, and it would make sense to mandate minimum individual spending to ensure economic activity. A low GDP inherently shows poor economic health, but a high GDP does not guarantee good health.

In my mind (noting, again, that I'm no economist), economic health is defined by the effectiveness of allocating resources to things that are beneficial to the members of that economy. Any amount of GDP can be "waste", resources flowing to places where they do not benefit the public. As Robert Kennedy famously pointed out, GDP includes money spent on addictive and harmful drugs, polluting industries, and many other ventures that are actively harmful.[0]

[0]: https://youtube.com/watch?v=3FAmr1la6w0

commodoreboxer··on I Received an AI Email
Ads are not charity. There is clearly a cost, otherwise they would lose money. They do not generate money out of thin air. "Generate" and "extract" aren't synonyms.

They do not enable any costless anything at all. They obfuscate extraction of money to make it look costless, but actually end up extracting significant amounts of money from people. Ad folks whitewash it to make it sound good, but extracting money in roundabout ways is not creating value.

commodoreboxer··on I Received an AI Email
Interesting. In my experience, advertisement and the incentives around it have led to the most devastatingly widespread removal of value in human culture and social connections that we've seen in this generation. Huge amounts of effort wasted on harvesting attention, manipulating money away from people, isolating and fostering extremism, building a massive political divide. And centralizing wealth more and more. The amount of human effort wasted on advertisement is staggering and shocking.

I don't think your average adult is inspired by the idea of AI generated advertisements. Probably a small bubble of people including timeshare salesmen. If advertisements were opt-in, I expect a single digit percentage of people would ever elect to see them. I don't understand how anybody can consider something like that a net good for the world.

How does non-consensually harassing people into spending money on things that don't need add value to all the world's citizens?

commodoreboxer··on I Received an AI Email
> I don't think there's a single developer who is not using AI to get help while coding

It's banned at my company due to copyright concerns. Company policy at the moment considers it a copyright landmine. It does need to be "perfect" at not being a legal liability at the very least.

And the blog post image thing is not a great point. AI images for blog posts, on the whole, are still quite terrible and immediately recognizable as AI generated slop. I usually click out of articles immediately when I see an AI image at the top, because I expect the rest of the article to be in line: low value, high fluff.

There are useful LLM applications, but for things that play to its strengths. It's effectively a search engine. Using it for search and summarization is useful. Using it to generate code based on code it has read would be useful if it weren't for the copyright liability, and I would argue that if you have that much boilerplate, the answer is better abstractions, libraries, and frameworks, rather than just generating that code stochastically. Imagine if the answer to assembly language being verbose was to just generate all of it rather than creating compiled programming languages.

commodoreboxer··on I Received an AI Email
It is 100% realistic to read books and play board games. Both markets are massive, and board games in particular are having what I would consider a renaissance. Maybe it depends on your crowd, but everybody I know plays tabletop games and reads books.
commodoreboxer··on I Received an AI Email
I keep hearing the phrase "generate wealth" in regards to advertisement and from the mouths of startup founders, but in almost no other context. I'm not familiar with the economic concept of "wealth generation" or its cousin "creating value".

Is the idea that any and all movement of money is virtuous? That all economic activity is good, and therefore anything that leads to more economic activity is also good? Or is it what it sounds like, and it just means "making some specific people very wealthy"? Wouldn't the more accurate wording be that it "concentrates wealth"? I don't see a huge difference in the economic output of advertisement from most other scams. A ponzi scheme also uses psychological tricks to move money from a large amount of people to a small amount of people. Something getting people to spend money isn't inherently a good thing.

← PreviousPage 3 of 3