Readit News logoReadit News
collinfunk commented on Rust Coreutils 0.5.0 Release: 87.75% compatibility with GNU Coreutils   github.com/uutils/coreuti... · Posted by u/maxloh
gjsman-1000 · 6 days ago
No. The original UNIX utilities were under proprietary licenses for an extremely long time, before eventually they broke free under BSD. The BSD tools are descendants of the originals and are also the versions used by macOS.

BSD wasn’t under an open license when GNU got started, so GNU reimplemented the proprietary UNIX utilities with their own enhancements and their own GPL license.

As such, complaining about the license is rich, considering GNU basically stole it themselves from the first round. And to this day, HN complaining about macOS’s utilities is also rich considering they are actually more standard and authentically UNIX than GNU.

collinfunk commented on Using Python for Scripting   hypirion.com/musings/use-... · Posted by u/birdculture
emidln · 8 days ago
I wish env -S was more portable. It's a newer feature of the coreutils env implementation and isn't supported elsewhere afaik.
collinfunk · 8 days ago
FreeBSD 6.0 added 'env -S'. They have adopted a few different GNU inspired options recently, which I am happy about.
collinfunk commented on Notes by djb on using Fil-C   cr.yp.to/2025/fil-c.html... · Posted by u/transpute
mbrock · 2 months ago
I think that's the build of LLVM+Clang itself.
collinfunk · 2 months ago
Yes, linking LLVM takes up a lot of memory. The documented guidance is to allow one link job per 15 GB of RAM [1].

[1] https://llvm.org/docs/CMake.html#frequently-used-llvm-relate...

collinfunk commented on Hard Rust requirements from May onward   lists.debian.org/debian-d... · Posted by u/rkta
eptcyka · 2 months ago
collinfunk · 2 months ago
A lot of the complexity is to handle localized date formats on systems that support them. Most other implementations of 'date' do not do this.

The easiest way to see this is in US locales, which use 12-hour clocks in GNU 'date' but not other implementations:

  $ date -d '13:00'
  Sat Nov  1 01:00:00 PM PDT 2025
  $ uu_date -d '13:00'
  Sat Nov  1 13:00:00 2025
I added a test case for that recently, since it is a nice usability feature [1].

[1] https://github.com/coreutils/coreutils/commit/1066d442c2c023...

collinfunk commented on Hard Rust requirements from May onward   lists.debian.org/debian-d... · Posted by u/rkta
TuxSH · 2 months ago
> Or change / improve the status [quo]

uutils/coreutils is MIT-licensed and primarily hosted on GitHub (with issues and PRs there) whereas GNU coreutils is GPL-licensed and hosted on gnu.org (with mailing lists).

EDIT: I'm not expressing a personal opinion, just stating how things are. The license change may indeed be of interest to some companies.

collinfunk · 2 months ago
2 GNU coreutils maintainers, including myself, monitor the issues and PRs on a GitHub mirror that we have [1]. Generally the mailing list is preferred though, since more people follow it.

[1] https://github.com/coreutils/coreutils

collinfunk commented on Date bug in Rust-based coreutils affects Ubuntu 25.10 automatic updates   lwn.net/Articles/1043103/... · Posted by u/blueflow
larusso · 2 months ago
I think he means POSIX. Didn’t check but in some cases posix only covers some options a tool provides not all. It’s a hard lesson I learned while keeping shell scripts portable between Linux and macOS.
collinfunk · 2 months ago
Yep. I was slightly incorrect in my original message, though. SUSv2 (1997) specified egrep and fgrep but marked them LEGACY. POSIX.1-2001 removed them.

The only place that that doesn't support 'grep -E' and 'grep -F' nowadays is Solaris 10. But if you are still using that you will certainly run into many other missing options.

[1] https://pubs.opengroup.org/onlinepubs/007908775/xcu/egrep.ht... [2] https://pubs.opengroup.org/onlinepubs/007908775/xcu/fgrep.ht...

collinfunk commented on Date bug in Rust-based coreutils affects Ubuntu 25.10 automatic updates   lwn.net/Articles/1043103/... · Posted by u/blueflow
xxs · 2 months ago
In some cases it was possible to crash (overflow) sort.c, not just DoS. I did try to look more info the issue - it was not handled for quite some time however I did not find any real world impact.
collinfunk · 2 months ago
Minor correction, but that bug was never in any "official" coreutils release. The bug was in a multi-byte character patch that many distributions use (and still use). There have been other CVEs in that patch [1].

But the worst you can do is crash 'sort' with that. Note that uutils also has crashes. Here is one due to unbounded recursion:

  $ ./target/release/coreutils mkdir -p `python3 -c 'print("./" + "a/" * 32768)'`
  Segmentation fault (core dumped)
Not saying that both issues don't deserve fixing. But I wouldn't really panic over either of them.

[1] https://lwn.net/Articles/535735/

collinfunk commented on Date bug in Rust-based coreutils affects Ubuntu 25.10 automatic updates   lwn.net/Articles/1043103/... · Posted by u/blueflow
ajross · 2 months ago
You don't attack coreutils. You attack the scripts. In this case it was an update script that failed because of an incompatibility. It's not too hard at all to imagine one failing in an exploitable way.

Honestly, Rust-related hilarity aside, this project was a terrible, terrible idea. Unix shell environments have always been ad hoc and poorly tested, and anything that impacts compatibility is going to break historical code that may literally be decades old.

See also the recent insanity of GNU grep suddenly tossing an error when invoked as "fgrep". You just don't do that folks.

collinfunk · 2 months ago
> See also the recent insanity of GNU grep suddenly tossing an error when invoked as "fgrep". You just don't do that folks.

The 'fgrep' and 'egrep' didn't throw errors, it would just send a warning to standard error before behaving as expected.

Those commands were never standardized, and everyone is better off using 'grep -F' and 'grep -E' respectively.

collinfunk commented on A years-long Turkish alphabet bug in the Kotlin compiler   sam-cooper.medium.com/the... · Posted by u/Bogdanp
okanat · 2 months ago
As a Turkish speaker who was using a Turkish-locale setup in my teenage years these kinds of bugs frustrated me infinitely. Half of the Java or Python apps I installed never run. My PHP webservers always had problems with random software. Ultimately, I had to change my system's language to English. However, US has godawful standards for everything: dates, measurement units, paper sizes.

When I shared computers with my parents I had to switch languages back-and-forth all the time. This helped me learn English rather quickly but, I find it a huge accessibility and software design issue.

If your program depends on letter cases, that is a badly designed program, period. If a language ships toUpper or a toLower function without a mandatory language field, it is badly designed too. The only slightly-better option is making toUpper and toLower ASCII-only and throwing error for any other character set.

While half of the language design of C is questionable and outright dangerous, making its functions locale-sensitive by all popular OSes was an avoidable mistake. Yet everybody did that. Just the existence of this behavior is a reason I would like to get rid of anything GNU-based in the systems I develop today.

I don't care if Unicode releases a conversion map. Natural-language behavior should always require natural language metadata too. Even modern languages like Rust did a crappy job of enforcing it: https://doc.rust-lang.org/std/primitive.char.html#method.to_... . Yes it is significantly safer but converting 'ß' to 'SS' in German definitely has gotchas too.

collinfunk · 2 months ago
> While half of the language design of C is questionable and outright dangerous, making its functions locale-sensitive by all popular OSes was an avoidable mistake. Yet everybody did that. Just the existence of this behavior is a reason I would like to get rid of anything GNU-based in the systems I develop today.

POSIX requires that many functions account for the current locale. I'm not sure why you are blaming GNU for this.

collinfunk commented on Show HN: ut – Rust based CLI utilities for devs and IT   github.com/ksdme/ut... · Posted by u/ksdme9
westurner · 2 months ago
uutils/coreutils has a `base64` in Rust which just gained better performance due to the base64-simd crate for SIMD: https://github.com/uutils/coreutils/pull/8578
collinfunk · 2 months ago
Note that uutils does not work if the file does not fit into memory.

With GNU coreutils:

   $ base64 /dev/zero | head -c 1 | wc -c
   1
With uutils doing the same would exhaust your systems memory until either it freezes or oomd kills the process.

u/collinfunk

KarmaCake day84December 8, 2023View Original