TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Oxidizing Ubuntu: adopting Rust utilities by default

231 点作者 jwilk大约 2 个月前

17 条评论

hansvm大约 2 个月前
&gt; Of course they are considered problematic in Rust. &gt; And leaks are hard to code by accident in Rust. &gt; ...<p>I enjoyed this gem and its descendants from the comments. What I see instead, commonly, even in big rust projects, is that it&#x27;s easy to accidentally define something with a longer lifetime than you intend. Some of that happens accidentally (not recognizing the implications of an extra reference here and there when the language frees things based on static detections of being unused). Much more of it happens because the compiler fights against interesting data structures -- e.g., the pattern of allocating a vec as pseudo-RAM, using indices as pseudo-pointers, and never freeing anything till the container itself is unused.<p>There&#x27;s nothing wrong with those techniques per se, but the language tends to paint you into a bit of a corner if you&#x27;re not very good and very careful, so leaks are a fact of life in basically every major Rust project I&#x27;ve seen not written by somebody like BurntSushi, even when that same sort of project would not have a leak in a GC language.
评论 #43446020 未加载
评论 #43443265 未加载
评论 #43442704 未加载
评论 #43443957 未加载
评论 #43442924 未加载
评论 #43447432 未加载
评论 #43444244 未加载
评论 #43454596 未加载
评论 #43444510 未加载
ZoomZoomZoom大约 2 个月前
&gt; This is not symbolic of any pointed move away from GNU components - it&#x27;s literally just about replacing coreutils with a more modern equivalent. Sure, the license is different, and it&#x27;s a consideration, but it&#x27;s by no means a driver in the decision making.<p>Sorry, don&#x27;t believe this one bit. I&#x27;m very thankful for everything Canonical&#x2F;Ubuntu did about 20 years ago, but no thanks. This comes from someone who loves Rust and what it made possible. However, freedoms are too important to not treat anything that looks like an attack on them as such.
评论 #43442043 未加载
评论 #43442483 未加载
评论 #43441784 未加载
评论 #43444896 未加载
评论 #43441971 未加载
评论 #43442320 未加载
blueflow大约 2 个月前
The uutils project has the right goals - 1:1 compatibility with GNU coreutils to the extent that any difference in functionality is a bug.<p>The first comment on LWN is about a bug in the more(1) from uutils. I checked out that code, found some oddities (like doing stat() on a path to check if it exists, right before open()ing it) and went to check against how GNU coreutils does it.<p>Turns out coreutils does not do it at all, because more(1) is from util-linux. ta-dam.
评论 #43441970 未加载
评论 #43441692 未加载
评论 #43454421 未加载
评论 #43443379 未加载
评论 #43441750 未加载
评论 #43441651 未加载
评论 #43441674 未加载
zoogeny大约 2 个月前
I hate to admit it, because I don&#x27;t particularly like Rust, but I&#x27;m slowly coming around to the idea it should replace things.<p>The major change is a recent comment I made where I was musing about a future where LLMs actually write most of the code. That isn&#x27;t a foregone conclusion but the recent improvements in coding LLMs suggests it isn&#x27;t as far off a future as I once considered.<p>My thought was simple: if I am using a LLM to do the significant portion of generating code, how does that change what I think about the programming language I am using? Does the criteria I use to select the language change?<p>Upon reflection, Rust is probably the best candidate. It has strictness in ways that other languages do not have. And if the LLM is paying most of the cost of keeping the types and lifetimes in order, what do I care if the syntax is ugly? As long as I can read the output of the LLM and verify it (code review it) then I actually want the strictness. I want the most statically analyzable code possible since I have low trust in the LLM. The fact that Rust is also, ahem, blazingly fast, is icing on the cake.<p>As an aside to this aside, I was also thinking about modular kernels, like Minix. I wonder if there is a world where we take a userland like the one Ubuntu is trying and apply it to Minix. And then slowly replace the os modules with ones written in Rust. I think the modularity of something like Minix might be an advantage, but that might just be because I am completely naïve.
评论 #43443064 未加载
评论 #43443089 未加载
评论 #43442942 未加载
评论 #43442747 未加载
alextingle大约 2 个月前
This is the worst kind of busy-work. Rewriting something for the sake of it is terrible practice.<p>There&#x27;s a lot of refreshing energy amongst Rust coders eager to produce better, more modern command-line tools. That&#x27;s amazing, and a real benefit to everyone. But rewriting simple, decades-old, perfectly functional tools, with the explicit goal of not improving them is just a self-absorbed hobby. And a dangerous one at that - any new code will contain bugs, and the best way to avoid that is not to write code if you don&#x27;t have to.
评论 #43444911 未加载
steveklabnik大约 2 个月前
Previously:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43360969">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43360969</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43353240">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43353240</a>
johnisgood大约 2 个月前
Amazing, another reason for avoiding Ubuntu.<p>Many of these utilities have had logic errors in them, you can find them on GitHub issues. sudo, for example, allowed you to bypass through some way I cannot remember.<p>And I bet you they are not a replacement for GNU utilities, i.e. have less features, and are possibly not optimized either, and perhaps they even have different (or less) flags&#x2F;options.<p>I have written a lot of Bash scripts, I wonder how well (if at all) would work on Ubuntu with the Rust utilities.
评论 #43445208 未加载
bravetraveler大约 2 个月前
Canonical making light of licensing again, no surprise here.<p>This has ulterior motive written all over it. Best outcome: nothing happens.
jvsgx大约 2 个月前
I have a queston: Why do they need their utilities to be written in Rust? Most utilities do not have to face the network, and most don&#x27;t need to have root privileges. Heck, most of them are one shot programs and don&#x27;t even need to free memory by the programmer. They could exit and return all the memory space back to the OS.
评论 #43442670 未加载
评论 #43443835 未加载
评论 #43445934 未加载
评论 #43444449 未加载
jauntywundrkind大约 2 个月前
My long hope is that some day, someone starts to replace the perl-based Debian infrastructure with Rust (or really, anything).<p>I did a decent bit of mod_perl, love &amp; respect perl, but here in 2025, it&#x27;s pretty terrifying to me that Debian&#x27;s main dependency is a pretty sizable perl runtime. That there seems to be very little that will budge this. The whole ecosystem is built atop a language that very few people have interest in, that has much less interest &amp; activity than other modern alternatives.<p>It&#x27;s fine if we start switching the user env over to more popular Rust based utilities. But what I really want is for the OS itself to modernize, to start getting away from it&#x27;s ancient seemingly-unshakeable legacy. Nothing against Perl, but I&#x27;d love to see this family of OSes move beyond being Perl only.
评论 #43445688 未加载
stefan_大约 2 个月前
All you are doing is setting people up for more permanent bash-dash disasters. Isn&#x27;t there something more useful you could be doing with your time? Say making drag&amp;drop work in snaps (another unforced disaster)?
评论 #43441976 未加载
评论 #43442165 未加载
Animats大约 2 个月前
Has someone built Busybox in Rust yet? That would be good for embedded.
评论 #43443685 未加载
worik大约 2 个月前
This is on brand for Canonical.<p>Bleeding edge beta (alpha?) software put in the core of their system<p>Reminds me of when they switched Gnome out for Ubuntu One, no way back if you did &#x27;aptitude full-upgrade&#x27;.<p>It was a buggy leaky pos<p>Again, dear friends...
tzwhaG大约 2 个月前
It looks like a corporate project with all the required hype and lingo. Ubuntu was nice around version 10, it went downhill with spyware, snap, etc.<p>&quot;There are countless examples in the open source community of tools being re-engineered, and re-imagined using tools and practices that have only relatively recently become available.&quot;<p>Recently? You can use Ada or OCaml, which is a better Rust. You can use C with formal proofs and not constantly rewrite everything.<p>But that of course is the point. No rewrites, no easy money for the corporate OSS &quot;developers&quot;.
评论 #43449987 未加载
black_13大约 2 个月前
Using Rust is a political solution to deskill a generation of coders to replace higher-cost labor with lower<p>The push for Rust isn&#x27;t just a technical decision - it&#x27;s a calculated economic strategy. By forcing rewrites of stable systems in a new language, companies effectively reset the clock on developer experience and expertise.<p>When a C&#x2F;C++ codebase with 30 years of institutional knowledge gets rewritten in Rust, senior developers with decades of experience suddenly compete on more equal footing with juniors who just graduated. Your 15 years of C++ optimization knowledge? Now worth less than a 22-year-old&#x27;s six months of Rust bootcamp training.<p>This isn&#x27;t about memory safety - it&#x27;s about labor costs. Companies call it &quot;modernization&quot; while quietly erasing the premium they&#x27;d otherwise pay for experience. The technical arguments serve as perfect cover for what&#x27;s really happening: deliberately manufacturing a scenario where they can replace $250K senior engineers with $80K juniors.<p>The pattern is familiar to anyone who&#x27;s watched other industries. Create artificial obsolescence of existing skills, then exploit the resulting chaos to reset salary expectations and eliminate the leverage that comes with specialized knowledge.<p>This is why language transitions always seem to coincide with hiring freezes and &quot;restructuring.&quot; It&#x27;s never been about technical superiority - it&#x27;s about breaking labor&#x27;s bargaining power.
评论 #43445384 未加载
评论 #43445365 未加载
nukem222大约 2 个月前
GNU is free to adopt better tools than C&#x2F;C++. I adore gnu but I refuse to support blatant and obstinant idiocy. Using the license to extort people into supporting C&#x2F;C++ is just scummy behavior. What the fuck were you doing the last ten years that this wasn&#x27;t a gnu project? Instead we got fucking systemd and a dozen more knockoffs of the shittiest os on earth
评论 #43444357 未加载
userbinator大约 2 个月前
Rust and &quot;memory safety&quot; is the current form of corporate authoritarianism. It&#x27;s ironic that its most vocal advocates are also likely to be the ones complaining about the authoritarianism of the current administration.
评论 #43444065 未加载