Live data from Hacker News

APT Rust requirement raises questions

lwn.net

451–460 of 508 posts

Re: APT Rust requirement raises questions

#451

Earlier quoted context omitted.

Even worse, the license requirements (gpl->mit) will be less beneficial to the community than the rust replacements.

Rust has no specific license requirements on code written in it. People choose whatever license they prefer.

True, but you might want to look into the licenses people are actually choosing for Rust versions of coreutils/uutils and who's promoting them.

Re: APT Rust requirement raises questions

#452
post #361

Earlier quoted context omitted.

That was probably a mischaracterization on my part. I wouldn't consider rewriting almost everything useful that's currently in C or C++ to be over the top. That would be a net good. Posts that say "I rewrote X in Rust!" shouldn't actually be controversial. Every time you see one, you should think to yourself wow, the software world is moving towards being more stable and reliable, that's great!

But it is nonsense. Every time some rewrote something (in Rust or anything else), I instead worry about what breaks again, what important feature is lost for the next decade, how much working knowledge is lost, what muscle memory is now useless, what documentation is outdated, etc. I also doubt Rust brings as many advantages in terms of stability that people claim. The C code I rely on in my daily work basically neve…

You want the computing infrastructure to remain essentially as it was in the 1970s. I don't.

Re: APT Rust requirement raises questions

#453
post #363

Earlier quoted context omitted.

Much of the drive to rewrite software in Rust is a reaction to the decades-long dependence on C and C++. Many people out there sit in the burning room like the dog in that meme, saying "this is fine". Most of them don't have to deal at all directly with the consequences involved. Rust is the first language for a long time with a chance at improving this situation. A lot of the pushback against evangelism is from peop…

If you were right, then people should not be using Rust or C/C++. They should be using SPARK/Ada. The SPARK programming language, a subset of Ada, was used for the development of safety-critical software in the Eurofighter Typhoon, a British and European fighter jet. The software for mission computers and other systems was developed by BAE Systems using the GNAT Pro environment from AdaCore, which supports both Ada a…

> If you were right, then people should not be using Rust or C/C++. They should be using SPARK/Ada.

Not all code needs that level of assurance. But almost all code can benefit from better memory safety than C or C++ can reliably provide.

Re what people "should" be using, that's why I chose my words carefully and wrote, "Rust is the first language for a long time with a chance at improving this situation."

Part of the chance I'm referring to is the widespread industry interest. Despite the reaction of curmudgeons on HN, all the hype around Rust is a good thing for wider adoption.

We're always going to have people resistant to change. They're always going to use any excuse to complain, including "too much hype!" It's meaningless noise.

Re: APT Rust requirement raises questions

#454
post #361

Earlier quoted context omitted.

That was probably a mischaracterization on my part. I wouldn't consider rewriting almost everything useful that's currently in C or C++ to be over the top. That would be a net good. Posts that say "I rewrote X in Rust!" shouldn't actually be controversial. Every time you see one, you should think to yourself wow, the software world is moving towards being more stable and reliable, that's great!

But it is nonsense. Every time some rewrote something (in Rust or anything else), I instead worry about what breaks again, what important feature is lost for the next decade, how much working knowledge is lost, what muscle memory is now useless, what documentation is outdated, etc. I also doubt Rust brings as many advantages in terms of stability that people claim. The C code I rely on in my daily work basically neve…

Regarding VIM - it's not as risky as something that's exposed over a network, but it's had plenty of CVEs, and skimming them shows many if not most are related to memory safety. See:

https://www.cvedetails.com/vulnerability-list/vendor_id-8218...

Re: APT Rust requirement raises questions

#455

Earlier quoted context omitted.

Rust has no specific license requirements on code written in it. People choose whatever license they prefer.

True, but you might want to look into the licenses people are actually choosing for Rust versions of coreutils/uutils and who's promoting them.

Sure, those authors chose that license because they did not really particularly care for the politics of licenses and chose the most common one in the Rust ecosystem, which is MIT/Apache 2.

If folks want more Rust projects under licenses they prefer, they should start those projects.

Re: APT Rust requirement raises questions

#456

Earlier quoted context omitted.

As a c/c++ cmake user, cargo sounds like a utopia in comparison. It still amazes me that c/c++ package management is still spread between about 5 different solutions. IMO, the biggest improvement to C/C++ would be ISO defining a package manager a.la pip or uv or cargo. I'm so tired of writing cmake. just... tired.

Do note that a (I think standardized) common package specification is being worked on called CPS (Common Package Specification). It doesn't specify how you get your dependencies, but it does specify how they should look like, so that your actual package manager does not need to care about the build system specific formats as it currently does.

Worth reading, from a year ago: https://www.reddit.com/r/cpp/comments/1hgpz0y/wg21_aka_c_sta...

It seems CPS is still being worked on, but not under the standardization of the committee, due to the above.

Re: APT Rust requirement raises questions

#457

Earlier quoted context omitted.

On the contrary, Swift is very relevant on this subject. It has high feature parity with rust, with a much readable syntax.

It doesn't have the single feature that anyone cares about in Rust - compiler-enforced ownership semantics. And it's not in any way a system-level language (you couldn't use it without its stdlib for example, like in the Linux kernel). The other features it shares with Rust are also shared by many other languages.

Compiler-enforced ownership semantics is now a part of Swift with non-copyable types. In all honesty I do not know enough of rust to know how on-par the features are, but there is something.

Not sure about using Swift in a kernel as I’m not low-level enough to know that either, but you can indeed use Swift on embedded systems[1].

[1] https://www.swift.org/get-started/embedded/

Re: APT Rust requirement raises questions

#458

I have never seen a program segfault and crash more than apt. The status quo is extremely bad, and it desperately needs to be revamped in some way. Targeted rewrites in a memory safe & less mistake-prone language sounds like a great way to do that. If you think this is a random decision caused by hype, cargo culting, or a maintainer's/canonical's mindless whims... please, have a tour through the apt codebase some day…

I’m very very curious to know what it is you’re doing to experience this: I’ve used Debian and its derivatives for 25 years now. On desktops, laptops, and servers. x86, x86-64, and Arm 64. I have never had a segfault with APT. Not a single time. Problems with dependencies or such a few times, but I don’t recall APT ever crashing on me.

Please, share more details.

Re: APT Rust requirement raises questions

#459
post #415

Earlier quoted context omitted.

And thats no different than writing Rust with a bunch of unsafes, and a bunch of indirection as far as processing flow goes. The nice thing about Python is that it allows you to do either. And naturally, Python has gotten much faster, to the point where its as fast as Java for some things, because when you don't use dynamic typing, it actually recognizes this and optimizes compiled code without having to carry that t…

It’s not the same at all. In Rust you cannot just throw an attribute on to a struct in the middle of a function because it makes some call further down the chain easier, no matter how much unsafe you use. I’m not a python hater, you can’t get some great stuff done with it quickly. But my confidence in writing large complex systems in it is waning.

I can make an argument that you can never have a memory leak in Python, while you can in Rust if you use unsafe.

In the end, both languages allow you to write bad code. But having something that is less strict if you wanna be makes it more flexible.

Re: APT Rust requirement raises questions

#460

Earlier quoted context omitted.

The endless crusades are indeed tiresome.

Yes, the immediate and endless backlash we get whenever anybody says the word "Rust" is quite tiresome.

Ah yes, the signature snark from the Rust community. This is the type of thing that repels people.
Post reply on HN