147 points · by doener · 3y ago · 99 comments
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 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.
It's not just a matter of having all the individual tools, it's a matter of having them be functionally complete and behaving either the same as GNU or POSIX - note the graph part way down the readme that talks about having only slightly better than half of the tests passing. And the tests probably aren't truly comprehensive, especially for things that people didn't realize were implementation specific or non-guaranteed behaviors. It's good to see them making progress, I just want to someone temper the idea that they're close to done.
(as a side note, I did not want to turn this thread into a licensing flamewar, even if I dislike the license change. It is more interesting to talk about the tools themselves! How does the performance compare to the GNU implementation? Are they faster? Do they use less memory? Are the executables smaller (e.g., when compiled statically)? Do they compile faster?)
Solution: Do not use "re-distributions" by middlemen.
For example, when I use BSD UNIX I get it directly from one of the two original BSD projects. I compile everything from source.
NB. I use both Linux and BSD.
Usually open source routers use a single "crunched" or "multicall" binary for utilties such as those in Linux coreutils, the subject of this thread. The process for making crunched binaries in NetBSD is really easy. Compiling busybox is probably not too difficult either.
The router (gateway) is the most important computer on the network IMHO. If one buys a router that one cannot control, then to me that suggests the buyer does not really care about controlling the computers that use it.
Maybe a computer owner must use a commercial OS that includes pre-installed software. It might be nigh impossible for the computer owner compile that OS from source themselves, let alone the pre-installed software (e.g., humongous web browser).
However a router is a much smaller system, no need for graphics or a web browser, and one can compile this from source relatively easily.
Not necessarily. Some people prefer the MIT/BSD/ISC family of licenses over GPL.
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.
Well, the GPL forbids me from sharing opensource code between work and hobby projects. Especially GPL3. Thats the worst!
I think its remarkable how proponents of GPLed code insist that GPL is about freedom. The GPL is a list of quite restrictive, opinionated, and frankly ambiguous terms that together make me less free to use opensource code to build software, including other opensource code.
The fantasy of the GPL hopes that all opensource code was GPLed. And then we would collectively create such a large moat that companies have no choice but to GPL their software too. And it essentially requires every single scrap of opensource software out there uses the GPL, so we can make a monopolistic straight jacket for software.
This is a suffocating, and impossible dream because (spoilers): Not all programmers want that! Companies hate it. And opensource programmers like me hate it. I want to work on software that I can use both at work and for fun.
So (of course), we make other implementations which aren't GPLed. And now companies can choose if they want the GPL version or the MIT version and - gosh - they choose and invest in the MIT version. MacOS gets built on top of FreeBSD. LLVM gets massive financial support from companies and it becomes excellent. Microsoft has a competing software stack for just about everything and increasingly thats all opensource too. And React. And Chromium. And so on.
The moat is broken. GPL has failed in what it was trying to do. The GPL probably needs 90%+ of opensource code out there to be GPL licensed to achieve its mission, and yet according to a random google search[1], its actually used in about 5% of actual projects. Nobody is forced to GPL anything these days. The GPL hasn't put effective pressure on companies to opensource their code for decades.
Yet another MIT licensed coreutils implementation changes nothing.
[1] https://gustavopinto.medium.com/why-the-mit-license-is-much-...
I won't buy a house in an HOA. I'm not afraid of HOAs, I just have better things to do with my time than keep up with their demands.
I also don't really think most of the examples you cite are all that strongly related to "erosion of copyleft" (if such a thing has happened in the first place; I'm not so sure it has – I'd have to check license counts of packages but BSD licenses and MIT license have been popular for many decades).
That sounds a bit extreme, do you feel that way in all things (murder, theft, slavery,...) or only in terms of limiting the harm entities can cause through distribution of closed-source software?
Personally I feel like forbidding things is fine. It won't prevent bad things from happening, but it can protect us humans from our own psychological weaknesses. I think of antitrust legislation as an example.
I'm pretty sure we've had this discussion before on lobste.rs, yet you continue to mischaracterize and lump all opposition of copyleft into some irrational position based on fear, or that we somehow can't think for ourselves because our employers don't like copyleft.
My full position: https://github.com/BurntSushi/notes/blob/master/2020-10-29_l...
Copyleft is very nice but I think the competition that liberally licensed software means to proprietary alternatives is way higher than the competition that liberally licensed software means to copylefted software. Meaning, if there is GNU coreutils around but no liberally licensed alternative, there will be a market for alternatives that proprietary vendors can use. Thus, somewhere out there will maintain a proprietary coreutils library and charge money for it. This code base will always exist as a risk to the GPL licensed coreutils package. If there is a free (as in money) alternative however, the proprietary vendor will have a much harder time to convince some company to buy their product.
I think copyleft shines the most when there is a lot of competition with proprietary solutions. Without copyleft, the competing solutions could just incorporate improvements of some package into their own. With copyleft, the copylefted software package has a chance to fight. But in a domain where Free Software has won, and I would consider coreutils to be such an environment, one can also have open source software.
And where is that?
Coreutils might not be important enough for people to pay for its maintenance, as is seen by people leaving the proprietary unixes. Idk. That sentence was mostly there to explain my more general argument.
In practice, when the Open Source distribution is the dominant implementation, the source tends to be available and modifiable even when the source is from a for profit company. One might look at all the .NET stuff from Microsoft as an example. Clang and LLVM would be other great examples. For the BSD license, the operating system family it was designed for has been available as Open Source since before the GPL has existed. You can still get their equivalent of the core utils in source form today. In fact, there is a Linux distribution going Alpha very soon ( Chimera ) that is going to use them.
If most distributions were to adopt Uutils ( this Rust reimplementation ), I fully expect that not only would the source remain available for them but that there would remain essentially a single version that they would all share. I do not think that the GPL is require to maintain that momentum.
The big difference is that some commercial company could take this and extend it as their own as you say. In that case though, they would likely just have gone their own way anyway which would mean less sharing, not more. You could argue that MacOS for example is what is wrong with BSD as they took some BSD stuff and have not shared everything back. They have shared some stuff though, likely more than if there was no BSD code to borrow. With the BSD code, it seems very unlikely that MacOS would have used GPL.
Anyway, it is all just opinions and preferences. I may not be any more right than you. Who knows? What you are saying though is not 100% obviously right to me either.
You are still free to go and work off of the upstream version of uutils.
Copyleft fanatics feel a lot like libertarians thinking they need to bring a utility belt full of weapons for their trip to the supermarket.
[0] https://github.com/NixOS/nixpkgs/pull/116274
[1] https://github.com/NixOS/nixpkgs/pull/116274#issuecomment-85...
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.
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.
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.
edit: still got it :)
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?