302 points · by jcbhmr · 2y ago · 305 comments
To clarify, I'm not intending this as a negative comment. It's an impressive project, and aiming for cross-platform sharing of scripts seems a worthy goal. The graph of progress against the GNU test suite is neat and encouraging. However, I can't imagine anyone in Unixy lands moving to this - although I may be wrong there - so it feels like a "compatibility" project for MacOS and Windows. I'm not familiar with the situation on MacOS but how bad is the compatibility issue? Similarly, on Windows what's the situation with WSL or VMs or even Cygwin? Is performance the issue?
Do people actually want this, is there a market for it? It's got 17.8k stars so seemingly so? Again, I'm not intending to cast aspersions, just trying to understand the audience. This is clearly different from a "for the fun of it" side project.
I think it's important for free software that people coming into the community are enthusiastic to maintain it. It took the wind out of my sails a little when I realised the GNU code base, while it produces critical tools I use every day, is written in a way that I found extremely (unnecessarily) terse and "clever". Tracing how different combinations of flags are handled is not much fun. Documentation is helpful for the user, less so for the tinkerer who is trying to understand the stack.
If this project manages to hit parity with GNU coreutils, and my distro(s) provide support, I'll switch to it purely on that basis.
It's a different mindset and one that is no longer useful.
I disagree. Sure, 6 bytes is approximately free in most contexts, but 100MB is not free, and 5GB is even less free.
But more importantly, writing code under constraints can force good behavior. For example, BIOS is a legacy mess but it’s a small, self-contained legacy mess that fits in a few kB. Compare to UEFI, which is unbelievably complicated and bug-ridden. A mess like UEFI could not have fit within the constraints of BIOS.
This is not to say that writing obscure code to save a couple bytes of source file size is at all worthwhile any more, but the idea that one should constrain bloat (design bloat, code bloat, executable bloat, network bloat, etc) is very much still valuable.
While user facing programs are not faster by any means, computers got faster in some aspects after all.
So, saving as many bytes as possible is still very relevant.
I get a similar feeling. This is more attractive than ports like cygwin as a solution because if you have this in every place you can be more sure your environments match. With ports there will be more delay getting changes/fixes in different environments, at least in theory, than with a solution that is cross-platform as a core goal. The other main options, running Linux in a VM (directly or via WSL2) adds an extra layer of friction.
A cross-platform solution is more likely to match bug-for-bug in different environments, which can be as important as matching feature-for-feature: if something is going to fail out there it will fail the same way in your dev/test environments.
Also some will want to use it from a licensing PoV. Many¹ find GPL related licences bothersome and use the GNU coreutils because there isn't (until this matches their requirements) an alternative. Similarly, the language might be an attraction to some, either ideologically or because they might want to dig into the source, though this is more of a factor for projects developing new features rather than trying to be drop-in replacements.
I expect the attraction to be relatively niche though, people won't start using it as a drop-in for the GNU tools en-mass until, for instance, popular distributions use it (or a niche distribution using it becomes more popular for some other reason).
----
[1] I am not one of that many, but they are many so this is a notable consideration.
The license stuff is what people focus on, but to me that is much more interesting. C is a pretty decrepit language and while I don't care much for the "rewrite it in rust" cult, the coreutils are exactly the type of program rust excels at - a non-iterative target that doesn't change often and can be made with "best practices" in mind.
Not having to deal with the utterly inane amount of dead architectures that GNU projects inherit probably helps them too on that end.
Given how mature and well defined the GNU Coreutils are, how small their scope is, how they are used, I really don't see the supposed security upside here.
There simply has to be a better reason to me, than "Rust good".
Specifically, integer overflow is much easier to correctly handle in rust, making bugs like CVE-2015-4042 less likely, and correct handling of multibyte strings is basically enforced by the standard library, making issues like CVE-2015-4041 very unlikely in a rust implementation
1: https://www.cvedetails.com/vulnerability-list/vendor_id-72/p...
The fact it's released under MIT instead of Apache (or GPL) does worry me though.
But also, things like BusyBox and ToyBox are very popular alternatives which contain non-standard ports of only a subset of coreutils. A complete and mostly compatible set of coreutils would be more popular than either, but they also have some different constraints that Rust builds make difficult (eg: binary size).
* nb4 "it's just configure/make/install what do you mean" consider if you want coreutils without glibc, cross compiled, or want to bootstrap your environment without any of them. The GNU ecosystem is "easy" to build/use within the GNU ecosystem, which is not unopinionated about what that looks like and how it works.
I’m sure there are a thousand similar but different enterprise environments like this. At home / solo dev it makes no sense, you’d just install ubuntu / get a macbook and get working without any fuss.
Docker works but it makes test runs 100x slower (yes, I measured, it’s not made up).
For example, I've had problems on docker for Mac where accessing lots of (python) files in a volume mount was slow. I had to use some beta setting at the time which was far better (though I had to do a OS upgrade to use it, which also entailed some IT nonsense).
The overheads of docker are there but if it was that bad people wouldn't use it.
Docker is still useful, it’s great for sharing a complicated setup across machines.
Their compiles take 2m, mine take 30s.
I even do some directx dev with it.
All with very portable code that can even be built in the standard github action ubuntu.
I might be missing something, but isn't Docker on Windows or MacOS actually a VM running Linux (or, on Windows, perhaps it uses WSL2, which is also a VM running Linux)? How could you use Docker if VMs are banned?
Similar situation for MacOS docker containers on a MacOS host (see recently discussed https://news.ycombinator.com/item?id=37655477)
But for running Linux containers on MacOS or Windows I think you are right
I'm no Windows fan but WSL has worked extremely well on several different machines I've worked on since 2015 and Cygwin was no WSL but I could get a lot done with it back in the day as well.
> Docker works but it makes test runs 100x slower (yes, I measured, it’s not made up).
Yeah, I don't know what you're doing that it could be 100 times slower, something else is wrong.
Cygwin has been very useful to me, but also caused its share of issues with its permissions model, creating large directory trees that couldn’t be deleted.
That tells me that "some options and behaviours are still different" is also being treated like a bug.
Even if this is only used by huge companies like Meta or for new projects, it will still justify its existence..
You can find the GNU coreutils for Windows on sourceforge but it always feels like spyware when I download something from that site, plus I don't know how old they are or if they are actively maintained.
With this rewrite, I like that I can download them from the repo's releases page. There is an issues page for problems and I can see the project is actively worked on.
Installing them as binaries is simple and, this goes for all Rust/Go projects, I actually know how to compile them (sorry, I know C/C++ is great but between gcc||msvc||clang, missing deps, ./configure ./install and make - I rarely have a pleasant experience compiling something in C/C++).
I'm sure there's desire out there for a pure-Rust close-to-POSIX userspace you can put on top of Linux, but I don't exactly see a whole lot of progress toward that. At minimum, you'd need coreutils, findutils, diffutils, tar, grep, sed, compression libraries, crypto libraries comparable to OpenSSL or GnuTLS, an editor, a POSIX shell, an init system, a service manager, system-wide DNS and DHCP. Going beyond pure POSIX to a more practical server distro would probably include a PGP implementation, a package manager, sudo or equivalent, ssh, iproute2, probably many other things I'm forgetting.
uutils seems to give you findutils and coreutils. ripgrep is not a drop-in replacement for grep. I'm sure there are other "rewrite it in Rust" projects out there I don't know about, but low-level system utilities aren't exactly the gloryland most developers are interested in rewriting and POSIX includes a lot of stuff.
Frankly, I don't think this is a realistic terrain for any single organization. GNU itself took over a decade to get a practical distro and that was only because other developers provided a kernel, package managers, boot loaders, crypto, and what not. And the GNU project is not really a single organization. It encompasses many people from many different employers. Systems software in general wasn't as fragmented. If you were working in the space at all and cared about being cross-platform and collaborating across organizations in the 70s and 80s, you were using C. Everything else was proprietary. If we're ever going to get something comparable but in Rust, it's not going to be from a single Github org like this.
If I remember correctly, Mac has any GNU utility from before they all switched to GPL v3. Which was decades ago now.
More extreme people may see it as a major milestone in “killing” GPL.
At some point the GNU project focused their attention more on leading “gnu + Linux” debates and not so much on developing a stable and secure OS. So now it’s legacy cruft.
What happens if the uutils team says that they're not releasing the source of the latest version but the $CURRENT-5 from now on, moving to a closed source, open baggage model? What prevents them from pulling an effective EEE?
The issue is with GPLv3.
So, companies doesn't like to share their source code in a usable form if they're not against GPLv2 but are against GPLv3.
Companies are being companies. It's not about the license, but allowing others to use their code on their products. So they're after smoke and mirrors, and when their mirrors are taken away, they have moved to mirrors that work.
Am I understanding that right?
* With the exception of diff3.
The problem with permissive licenses started in my eyes with companies abusing the freedom they provide by creating *ium projects and started to push closed source applications with pseudo-open-source *ium projects. Also the same companies get these software fork it, add a small thanks with a 3pt font, printed to the space between the last page and back cover, and be done with it.
This is not illegal, but against the spirit of open source in general, and harmful on the long run.
As someone said: Open Source is about developer freedom, Open Source is about user freedom.
And developers are users of the software they don't develop, and they're cutting the branches they're sitting on.
On the whole, I am firmly against Open Source and would generally go with Source Available, but this seems like FUD.
First, you need to ship the source of that GPLd binary with the binary itself. Second, no derivative of that source code (and the binary as a result) can have a different license unless you're the copyright holder on that source code.
On the whole, I am firmly against Open Source and always go with Free Software, but this seems like incomplete knowledge.
edit: Added the "Note" section in the beginning. There was confusion it seems.
I also contribute to rust-lang/clippy and other rust projects.
Perl is even more memory safe than Rust, but the amount of crappy code is overwhelming...
Of course, that doesn't mean that all bugs are prevented, or that Rust code has no bugs, or that you can't write bad Rust code. But in the context of robotics and embedded control systems, Rust solves a lot of those "bad code" issues at compile time. And you're not using Perl in that context regardless.
As it is another language that is said 'compiler driven'
GNU coreutils on the other hand have been going for decades.
https://en.wikipedia.org/wiki/GNU_Core_Utilities#History
This one might have been around for 10 years, but it's disingenuous to claim it is as extensive, feature-full and tested as the real thing.
Taleb suggested that if something non-perishable has survived for a long time its expected remaining survival is just as long, for example if a book has been in print for 40 years it is expected that it wil remain in print for another 40 years.
The point is that projects, books, and other non perishables don't have a life expectancy like biological organisms, they're actually more likely to live on if they've endured a long time.
Who would have thought!
True, but doesn't that imply its opposite as well? A decade old project will probably die sooner than later, because 11+ year projects are rarer than 10 year ones.
The Lindy effect can only be observed in comparison to something else, not to deduct how long a single project in and of itself will last. Which means, coreutils will probably last longer than this one, because it's been around 33 years vs 10.
RIIR isn’t merely a “sprinkle Rust magic because I believe” thing. The tech has clear potential and I personally think a version of it will take hold where C was once assumed. To know for sure we have to ship more software with it, and we need good comparisons. I’m quite thrilled to have projects like this pressing on.
Now this is something I can get into.
I'm okay with having stuff rewritten in Rust, but I'm not into learning some snowflake ls/grep and having to go edit all the scripts written over the years.
In this case, there may be little value to the last bits, but people are going to wait to use these until that last bit is done, for fear of what might happen.
Which triggers ranting...
Q: Why exactly are we stuck targeting cross-platform compatibility for every possible option in every possible tool?
A: Because there is no good way to check the impact of removing options or tools, or for migrating clients.
By this mechanism, "OS" and "core" features grow forever, and the convention-bound C ABI is, well, as close to forever as we get.
Rewriting in Rust does not help that one bit (nor is it supposed to).
Has no one written literate ABI interfaces that support static validation and backwards compatibility via shims and automatic migrations? Must scripting be such a drag on progress?
We do automatic migrations in databases all the time; we should be able to do it in code.
Switching language to Rust and changing the license does not make for a drop-in replacement, I would say.
Nobody is switching language and license of GNU coreutils. This is a greenfield project.
Why?
[1] https://code.visualstudio.com/blogs/2023/06/05/vscode-wasm-w...
Copyright (c) uutils developers
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
Yep. This project is definitely going to be embraced by the community in the long run, and definitely supplant GNU coreutils. The MIT and GPL ideologies are completely aligned.> Android
Yes Android is definitely representative of the community...
GPL is the greatest thing that has ever happened to software and this stuff seeks to destroy it.
You need to understand how evil corporations work. They may be composed of perfectly reasonable people but, taken as a whole, they are literally psychopathic. It's not that they are "waiting" for something to be possible, it's just that at every step they will take anything and everything they can and give back as little as they possibly can.
Have you ever been in such a corporation and tried to say you should release source code when you don't have to? You'd be laughed out of the room.
Don't be fooled by companies like Microsoft taking part in "open source". They have simply calculated that right now it's advantageous for them to appear that way. But they are always taking the maximum and giving back the minimum, no matter what. We won't change this, but we can raise what that minimum is. That's why we have the GPL.
Is there any pressing need to be bug-for-bug compatible to the GNU counterpart?
(Just to be clear, I am not opposed to this project, but I'm not sure how many people will rejoice and adopt this just because of the license. But I'll admit I am going on vibes here.)
I don't understand the problem people have with the GPL. The GPL is there to ensure free software stays free forever. In a world with copyright this is the only way to do it. Permissive licences and public domain do not work.
Companies like Microsoft hate the GPL. This alone should tell you that you, an individual enthusiast, should probably love it.
In all seriousness, if you remove all non GPL licensed software from your Linux distribution because it's not pure enough, you'll be left with something that is a bit less comprehensive than your average operating system. It would miss things like a UI for example. Because both X Windows and Wayland are MIT licensed. A lot of popular server software that made Linux successful. And generally a lot of stuff that most of the OSS community uses and depend on every day. Like OpenSSH which is BSD licensed. Or things like Apache httpd (for which the Apache license was invented), etc.
The GPL vision where all that stuff was going to be GPL licensed just never played out that way. Developers and companies decided otherwise. And this is fine.
It's is not a problem that a lot of people believe needs fixing (as evidenced by a lot of non GPL OSS without good GPL alternatives). But of course if you feel otherwise, best of luck fixing that problem. The world runs on software. A lot of that is free and open source. And most of that is not licensed under the GPL.
However, the foundations are largely GPL-licensed because the GPL is superior in the long term. If people want to donate their time to companies then good luck to them, but it is a stupid strategy to donate free time to companies. If a company is paying good money for someone to write BSD-licensed software then sure, but otherwise the developer is playing a mug's game. Not a universal rule, I can see why some crypto or standard reference libraries might want to be BSD licenced. But by and large it is an invitation for parasites to attach.
What is this based on? Asking in good faith.
(also, IMO, copyleft vs non-copyleft doesn't seem to make a huge difference to the outcomes copyleft advocates claim to care about, especially to the average user - most MIT licensed projects still generally receive contributions from people using them commercially, and some GPL projects (linux itself suffering from this greatly) still suffer from being fragmented by proprietary patches and forks, even if the license is being complied with.)
Coreutils? Probably here the importance is to provide the interface the users want. And provide it everywhere thus allowing the ecosystem to grow and be able to move to other platforms even. This might require a BSD-like license. (These tools evolve slowly, and usually doesn't represent some huge know-how that other ecosystems want to lift, here the well-known efficient CLI experience is the value, which might be fair-use copyable, but as we see - for example Apple - doesn't care, and thus basically users are left with worse defaults.)
Filesystems? Stability, cross-platform compatibility, but also usually decades of extremely valuable battle-testing culminates in a specific codebase+ecosystem context. It's hard to replicate with simple copying, but of course much easier. In practice with ZFS we see that the licensing incompatibility serves to provide fewer options for users.
Drivers? Databases? Kernel? Where does the TiVo problem rears its ugly head? And what does the relative lackluster GPL enforcement track record tells us here? What about the more important problem with non-upstreamed but-shitty-as-fuck Android drivers? Are they good or bad for users? Which ecosystem are they a part of?
So, it seems, that even if one cares about licenses the big takeaway is that they matter a lot less than the other things required for a successful source-sharing community-driven project. OSI approved or nor.
(For example I have no idea what license Terraform has .. okay, I checked, it's MariaDB BSL, and OpenTF is now MPL2. So I don't think MIT/Apache2 or AGPL3 would have made a difference in Hashicorp's hostile stewardship.)
By tone, I assume this is sarcasm. Could you perhaps clearly state the issue?
FreeBSD has after all enjoyed lots of upstream collaboration from Sony and Apple. /s
I don't care about what UNIX flavour I get to use, had it not been for Linux, most likely I would still enjoy Solaris anyway.
Which is what would have happened if BSD wasn't tainted by the lawsuit.
Why wouldn't it?
FreeBSD seems alive and well, and its doing quite well for itself despite not having as many upstream corporate contributions. And why should freebsd care if Apple, Sony and Microsoft repurpose their software? If something I wrote ended up in macos and the PS5 I'd think that was pretty cool.
BSD could have become fully free with the portable C compiler (pcc) but in the early 90s it only supported the VAX and Tahoe (CCI Power 6/32) architectures, and I don't think would have been a good foundation for a modern compiler. Various folks had hacked versions of pcc in the 80s to support other architectures, but the code didn't go back upstream.
Without GCC, there's a good chance that the entire FOSS ecosystem wouldn't exist.
Real world scenarios like this is what led people to embrace the GPL.
When times are good, corporate use of open source trickles down to the community in the form of patronage and employment. It is not always the case that this happens during "bad times."
Linux wasn't GPL until 0.12. Less than a year after the first release. Not sure what exactly is meant by "happened" here so maybe it fits or maybe not.
If you're going to make facetious arguments, make them towards beliefs held by people who actually exist.
An unfortunate trend.
GNU coreutils is on its own a superset of a part of the POSIX spec (they started as rewrites of several Unix utilities), which mostly means that they added a bunch of extra flags and options. The other half of this is GNU bash which includes the non-command parts of POSIX such as shell syntax.
POSIX itself meanwhile is basically a reverse spec (very much like how the C standard isn't really a standard, it's just a collective set of rules all notable C compilers follow); it was made to unify all the various Unix offshoots that were being developed and define a common set of commandline utilities and rules that they all shared. (Nowadays, that's mostly the BSDs, Linux and MacOS. Windows is the only notable OS that doesn't really do anything with POSIX besides a few aliases.)
[0]: See for example the POSIX reference for cp and you'll see it's pretty similar to the GNU cp manpage - https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c...
https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man...
"Communities" (really, just distro maintainers, I don't think most people will install their own coreutils) aren't really that aligned to the GPL as the parent likes to imply they are (the only real license alignment usually is "no proprietary if we can help it", which makes GPL vs MIT equal and probably even leans slightly towards MIT because that permits more functional systems in restrictive environments.)
A distro's choice will probably come down to feature completeness, safety down the line and ease of maintenance. In that regard, uutils is a much scarier thing for GPL adherents than the coreutils, which suffer from the classic GNU Project bloat problems as well as being written in C, neither of which will ever be fixed (due to structural GNU Project reasons as well as it just being a 3 decades old software project.)
???
Sarcasm aside, I don't see how the existence of this code or its hypothetical adoption would hurt anyone. Ideology isn't worth following for its own sake, there has to be a mapping to physical reality, and any mapping that interprets a rewrite of coreutils as bad because it's too permissive is extremely suspect to me.
Like, what does the GPL infectiousness even protect here? Coreutils is decades old. Are we worried Microsoft is going to EEE it?
No, it is not free enough.
It is indeed paradoxical, but you have to remember that we are not dealing with the natural world, we are dealing with a world with copyright in place.
If the GPL is viral then copyright is a zombie. You can whack it once, but it will never stop coming back. GPL has to be viral because of the zombie-like nature of copyright. It's a hack and a pragmatic solution but defeating copyright for software entirely would be the ultimate solution.
Like, let's extrapolate that you mean "Apple and Sony profited from FreeBSD and didn't contribute back, and that's bad". Let's assume that the strongest possible version of that statement is true.
How does that ever translate to "a Rust port of GNU coreutils under MIT license is bad"? If Apple and Sony haven't contributed to GNU coreutils in ~30 years, they're not going to start now, MIT alternative or not. There's not going to be an Apple executive who's thinking "We've held out as long as we could, but now we're going to need to start integrating coreutils in MacOS and contributing changes back... wait, no, these Rust suckers released a MIT version, I guess we can keep being greedy!".
We are standing on the shoulders of copy-left giants, while patented nonsense and enshittification is hitting pretty much everywhere.
I think you are ignoring the incentive structure ruling the markets. Without strict control against the next sociopath and the next and the next, its just a matter of time even for uutils to get embraced.
How certain is it that such utilities would be compatible including any weird edge cases?
(Browsing https://github.com/coreutils/coreutils/tree/master/tests that test suite is written in shell and Perl)
And it’s been a while since the last discussion.
It's is going to be very difficult to justify this license for a project that is a ' Cross-platform Rust rewrite of the GNU coreutils'. Rewriting GPL-licensed GNU software while dropping the GPL license? To be on the safe side, one should assume that thise coreutils rewrite is concealed GPL.
If your code does not copy any copyrightable expression from mine it is not a derivative work, so if I sue you (legitimately, not because I just hope a lawsuit will intimidate you into agreeing to my demands) it means I've found things in your work that I think are copies of copyrightable things from my work.
If you haven't done a clean-room implementation your defense is probably going to rely on finding those things in other works besides mine and using one or more of these arguments: (1) these things are widely used and known and your copied yours from somewhere other than my work, (2) the ones in my work are just copies from those other works so I don't have any copyright on them for you to infringe, and (3) there are so few reasonably ways to do these things that everyone who writes them comes up with nearly identical solutions and that's why yours are similar to mine.
If you have done a clean-room implementation and kept good records to prove that, your defense is that you never saw any of my copyrightable expression so cannot possibly have copied.
One of the things “open” game engines run into (IE OpenMW) is that if source code for a game engine they are reimplementing leaks, they avoid it at all costs, since it could “contaminate” the project and ruin their protection as a fair use project.
I feel like this sets a bad precedent for the GPL because if anyone can do that, then it weakens the power of copy left licenses as a whole, but maybe I’m missing something because I’m not a lawyer
https://github.com/uutils/coreutils/blob/244693f50e224abf726...
Thank you for copying the SCO FUD playbook, I hadn't heard that one in a while:
https://en.wikipedia.org/wiki/Fear,_uncertainty,_and_doubt#S...
I wonder what is the official position of the GNU project about this though.