16 ms·
Bsdutils: Alternative to GNU coreutils using software from FreeBSD
- ggm 4y agoWhy does it need gnu cc rather than llvm?
- matthews2 4y agoIt needs a GNU _compatible_ C compiler. You can still use LLVM's Clang.
- ggm 4y agoI'm guessing that it invokes /usr/include which on Linux is probably not neutral to CPP or gnu-isms. Your point about "compatible" is well made. I should have been clearer. Wasn't gentoo born as Linux userspace on BSD kernel at one point?
- self_awareness 4y agoI think Gentoo was always about Linux with BSD-style ports. They had some additional "flavors" that switched Linux to kernels from FreeBSD, NetBSD or OpenBSD, but it seems those alternative Gentoo distros are deprecated for at least a few years already.
- radiator 4y agoGentoo was born as linux. Portage, the package manager, was inspired from BSD ports. Maybe they tried to experiment with also using a BSD kernel later, as did Debian, but it was only a side project.
- nailer 4y agoThere’s a Rust coreutils too.
- aver4geredditor 4y agohttps://github.com/uutils/coreutils https://github.com/uutils/coreutils MIT license
- bombolo 4y ago> MIT license How is letting me know that apple can use it without contributing back going to affect my decision on which coreutil to use?
- phkahler 4y ago>> How is letting me know that apple can use it without contributing back going to affect my decision on which coreutil to use? Apple using those utilities could be a good thing. I've used MS PowerShell and WSL a bit, and their implementations of common CLI software is sometimes incompatible. To work around the incompatibilities you end up using proprietary features or doing something inferior. I would be better if they just dropped in the standard utilities. OTOH I understand the fear that they may provide useful proprietary extensions because of an MIT license. Example, their version of ssh does not allow a script to hand it a password, hence my script was changed to print out "hey, type this password 'blah'" and required user interaction in the middle of an otherwise totally automated process. Every OS should use the standard (GNU) utilities, or at least a set that aims for complete compatibility (Rust versions).
- bheadmaster 4y ago> I've used MS PowerShell and WSL a bit, and their implementations of common CLI software is sometimes incompatible Are you implying that Microsoft would use the common CLI software interfaces if GNU coreutils weren't GPL? Because I deeply believe they wouldn't. Embrace, extend, extinguish.
- jen20 4y agoThey already ship curl. In doubt the license is the thing stopping it, but there is some precedent here. WSL (v2) is just a fancy wrapper around a Linux VM though, so the tools you get there are from the distro, not Windows.
- Zurrrrr 4y agoIf I was going to replace coreutils, I think I'd do it with the ones rewritten in rust.
- gigatexal 4y agoSame here. I love me some BSD but I've got too much muscle memory with the GNU userland.
- nabla9 4y ago30 years ago people planned rewrite stuff written in C in C++. 20 years again people wanted rewrite stuff written in C/C++ in Java. Now people wanted to rewrite stuff written in C/C++/Java in Rust. Meanwhile core infrastructure of humanity still runs on COBOL, C, C++, Java in that order. 20 years from now people ask AI to rewrite all stuff written in C/C++/Java/Rust and it picks ADA SPARK as implementation language.
- a2800276 4y agoYou forgot Fortran!
- Zurrrrr 4y ago20 years from now programming as we know it today will be a very specialized field and not necessary for most things, and language discussions will be a thing of the past.
- ho_schi 4y agoI already thankful for an modern init- and system-management implemented in C, using plain config-files. Sometimes being slow and careful is wise. Think of XML, hard to read and hard to parse. And an implementation language with broad support and reliability is a good thing for projects which should remain for decades.
- irusensei 4y agoI tried some of those but I'm not a fan of the frilly stuff they add by default to the outputs. I was having a hard time with the output of one of these rust tools (I think it was an ls replacement) that was pretty printing and tabulating stuff. Its nice to read I agree but it was a pain to copy and paste outputs and the option for a normal output was not default.
- self_awareness 4y agoWhat would be an advantage of switching from GNU coreutils to BSD coreutils? Doesn't GNU utils have more features?
- enriquto 4y agoPrecisely; that would be a good reason!
- PlutoIsAPlanet 4y agoI can think of a few No copy-left license? Compatibility on Linux with BSD-like operating systems such as FreeBSD, MacOS? To annoy Richard Stallman?
- dingi 4y agocopy-left licenses are better for users.
- jayp1418 4y agoBut BSD devs have their own argument https://docs.freebsd.org/en/articles/bsdl-gpl/ https://docs.freebsd.org/en/articles/bsdl-gpl/
- dingi 4y agoYeah. Just look what they got from that. Big corps using their work with hardly any upstream contribution (Apple, Sony, etc). At this rate BSDs will be deader than dead within a few years.
- mnd999 4y agoNetcraft confirms it.
- EarlKing 4y agoI don't know about you, but I can't eat code. That said, some people don't care about outside contributions or reuse, so I guess I find the pro-GPL partisanship more than a little misguided. Some people just have different goals, and that doesn't make them better or worse, just different.
- irusensei 4y agoIsn't the same we have on MacOS?
- dingi 4y agowhoever doing this has some serious time wasting issue. Check the previous project https://news.ycombinator.com/item?id=26303996 https://news.ycombinator.com/item?id=26303996
- bheadmaster 4y agoWhat's wrong with wasting time? It's their time, they have the right to waste it.
- irusensei 4y agoYou don't get to decide how another person value their own time.
- nix23 4y agoSays the guy who writtes nonsense on HN....bravo.
- pxc 4y agoAh yes, the infamous waste of learning, having fun, and becoming a better programmer.
- yjftsjthsd-h 4y agoAre you perhaps on the wrong website? This is Hacker News; it's a website for people interested in fun and interesting topics, mostly neat technical stuff like this project.
- snickerer 4y agoFrom the comments I see that there are some different coreutils implementations out in the wild, mostly done for fun. I am very happy about this. This means that there is not much energy put into implementing new coreutils features or fixing bugs. I think this is good. This means they are more or less finished. Mature. Software that is done and usable. That is something outstanding. This is an example of software that does not need to be in an never-ending flow of changes, not because it is abandoned, but because it is finished. I think we need more of that.
- user3939382 4y agoThe incompatibility between the two versions of sed (I have both installed on my macOS) is super annoying.
- nerdponx 4y agoIsn't BSD Sed a subset of GNU Sed? I can't think of any outright incompatibilities that would make a BSD Sed script invalid for GNU Sed.
- alwaysbeconsing 4y agoTheir handling of the in-place flag is different enough to cause irritation if you forget which one you're invoking.
- kevans91 4y agoI'd like to change it in FreeBSD, but haven't really (yet) come up with a clever way to make it work without breaking years of scripts that may be using -i.
- user3939382 4y agoAre you a maintainer of sed on FreeBSD?
- kevans91 4y agoNot sure we have anyone that could really call themselves a maintainer for sed, but I am a FreeBSD committer that has put thought into this problem in the past.
- williamstein 4y agoFor fun, I ported much of BSDutils to WebAssembly. Code [1] and live demo [2]. It was much, much easier porting BSDutils than GNU coreutils, since the source code is often much smaller, and hence easier to read and understand with simpler dependencies. [1] https://github.com/sagemathinc/cowasm/tree/main/core/coreutils/src/utils https://github.com/sagemathinc/cowasm/tree/main/core/coreuti... [2] https://cowasm.sh/ https://cowasm.sh/