8 ms·
Reimplementing the Coreutils in a modern language (Rust)
- slackfan 4y ago[flagged]
- LinuxBender 4y agoUnless the domain changed it looks like that site stopped updating in August of 2021?
- gjvc 4y agowhomsoever that author was, they deserve a medal.
- bitwize 4y agoREIMPLEMENTING THE COREUTILS IN A MODERN LANGUAGE (RUST) The Rust Evangelism Strike Force is coming for your children -- and the foundation of the Linux userland. Speaker anagram: TUSSLED REVELRY Speaker affiliation: Mozilla (business model: Uber for not working on browsers)
- Yoric 4y agoNote that speaker works on this as a hobby, not as Mozilla.
- deleted 4y ago[deleted]
- nmitchko 4y agoIf it ain't broke don't fix it.
- googlryas 4y agoIt might be broke.
- aliqot 4y agoNonsense, Rust never breaks. edit: still got it :)
- Smaug123 4y ago(In case it wasn't clear, the downvotes are probably coming because you appear to have entirely missed the point - you replied to a comment saying "the C tooling is not broken" with "nonsense, Rust doesn't break", which as far as I can tell is a complete non-sequitur.)
- aliqot 4y agothe downvotes are because rust is the darling of hn while still having faults, but you're not allowed to say the silent part
- megous 4y agoFresh, non battle tested code is more likely to be broken in subtle ways.
- Smaug123 4y agoThe slides are linked, at https://sylvestre.ledru.info/presentations/coreutils-fosdem-2023/#69 https://sylvestre.ledru.info/presentations/coreutils-fosdem-... (for example), if you don't want to watch a video which discusses why they're doing it.
- sophacles 4y agoThis was a good talk. The topic was discussed here the other day: https://news.ycombinator.com/item?id=34735455 https://news.ycombinator.com/item?id=34735455 (op article was about the talk, not a direct talk link)
- Ameo 4y agoI recently came across a very interesting history of the early evolution of the Unix OS and some of these core utils during the 1970s and early 1980s: https://www.cs.dartmouth.edu/~doug/reader.pdf https://www.cs.dartmouth.edu/~doug/reader.pdf Lots of cool details about stuff like the gradual migration of the kernel from 100% assembly C and the origin stories of a lot of these ubiquitous utility programs like cp, ls, etc.
- enriquto 4y agoLink to the actual implementation: https://github.com/uutils/coreutils https://github.com/uutils/coreutils I love these re-implementations of things. Technology advances by the continued reinvention of the wheel, and even if some efforts end up being of merely didactic interest, it is still important to make them. Coreutils is one of the pillars of our civilization, and thus it should be re-implemented several times on many programming languages. Looking at the source code, it is impressive that this re-implementation is essentially complete! Look at this: https://github.com/uutils/coreutils/tree/main/src/uu https://github.com/uutils/coreutils/tree/main/src/uu It's only missing some obscure and fringe things. An important feature of GNU coreutils is, somewhat sadly, not reproduced by this re-implementation: the copyleft license of the original implementation. This takes out some freedom of the users. For example, when I use GNU "ls", I know that I can always look at its source code and change it to my whim (or hire a programmer to change it for me). However, if I use uutils "ls", this is not necessarily the case, for it may be a re-distribution by some middle-men that has modified it slightly and does not provide the source code. I suppose that the removal of this freedom is accidental, because it was a nice thing.
- codetrotter 4y ago> I suppose that the removal of this freedom is accidental, because it was a nice thing. Not necessarily. Some people prefer the MIT/BSD/ISC family of licenses over GPL.
- jordigh 4y agoIt should be forbidden to forbid. That's what I don't like. Most of us have employers who are afraid of copyleft. That has made us afraid of copyleft, because we feel like our job is threatened by copyleft. But the erosion of copyleft over the decades has produced phones that track us, websites that control our dating lives, our food, the entertainment we consume, social media that manipulates our emotions and our friendships, and countless other things without us having any recourse or control. For a while, copyleft was good. It gave us Linux on laptops, where we have the source code for nearly every part of the stack. Without copyleft, we have locked phones, tablets, game consoles, e-readers, refrigerators, cars, pacemakers, and many other devices that are difficult to really call our own because they have software that ultimately obeys the manufacturer, not the consumer.
- Arcuru 4y agoThe maintainers of that project have said that a lot of the code was written by new Rust programmers, so some of the code could probably use some help from experienced systems programmers. I did a little cleanup on their `dd` tool a while ago[1], and I would be pretty cautious about actually relying on it anytime soon. [1] https://jackson.dev/post/rust-coreutils-dd/ https://jackson.dev/post/rust-coreutils-dd/
- siraben 4y agoNixpkgs experimented with a build environment based on uutils-coreutils instead of GNU coreutils[0]. A lot of bugs or unimplemented features were uncovered which were fixed upstream and as a result software such as chromium, vim, emacs or even rustc itself builds properly now.[1] So it definitely could be a viable alternative in the future. [0] https://github.com/NixOS/nixpkgs/pull/116274 https://github.com/NixOS/nixpkgs/pull/116274 [1] https://github.com/NixOS/nixpkgs/pull/116274#issuecomment-850950790 https://github.com/NixOS/nixpkgs/pull/116274#issuecomment-85...
- abathur 4y agoI'm always cautious about who I recommend Nix to, but I usually say that one of the best things waiting on the other side of the learning curve is what an incredible always-improving lever nix and nixpkgs can be for just about any task that involves or benefits from ~integrating a lot of software. But it's also hard to communicate what I mean by that without diving into a bunch of detail on some case where it proved useful to me. The ability to give uutils a shake at scale is a paragon. At some point I imagine it'll be able help ferret out a good fraction of remaining long-tail issues with oilshell's mostly-bash-compatible `osh` in short order.
- xixixao 4y agoI’m working on a new set of file tools that replace touch, mkdir, mv, cp and rm, in Rust. They are intended to have better defaults for using them interactively. Upvote if you’re interested (or shoot me an email/tweet), I’ll comment here when v1 is ready.
- throwbadubadu 4y agoI thought that's uutils now, and maybe alias for the (subjective?) better defaults?
- zajio1am 4y agoAren't defaults of these tools defined by POSIX? Doesn't changing them break shell scripts?
- xixixao 4y agoThey have different names, and I only rebind the standard POSIX tools in interactive shells (that’s totally optional, up to each user)
- matt_daemon 4y agoFeels like a missed opportunity to have named it "oreutils".
- pengaru 4y agoIs there anyone working on this in a GPL context? What's the status of upstream GNU coreutils' attitude on incrementally rewriting in a safe language like rust? Isn't one of the selling points of Rust that it can incrementally be adopted in a C source tree?
- silasdb 4y agoFor an alternative implementation that aims to be compatible with POSIX (not necessarily compatible with GNU coreutils), see: https://github.com/GrayJack/coreutils https://github.com/GrayJack/coreutils