Live data from Hacker News

Coreutils for Windows

github.com

121–130 of 260 posts

Re: Coreutils for Windows

#121

Earlier quoted context omitted.

honestly your point is a bit weird. powershell is good. its much better than unix's everything piped is Text idea. godawfull that. outputs being objects is a really solid take. WSL is trash. besides that, lf vs. crlf is silly as you mention but crlf is more logical considering what its implementing. that being said the notion of these control chars is already based on outdated and limited ideas. if you want a consist…

> outputs being objects is a really solid take. Glad I'm not alone here ha! Being able to go someoutput | Format-Table | Select ColumnName,ColumnName,CloumnName is great. Beats memorizing the output format of any specific command and trying to wrangle it with awk.

You can skip the `| Select` btw.

Just do `someoutput | ft ColumnName,ColumnName,CloumnName`

Re: Coreutils for Windows

#122

Windows really needs to ditch CRLF and just use LF, and switch from backslashes to forward slashes. Or better yet, just switch everything to full POSIX. In powershell everything is much better than cmd, but it's just not enough. WSL is generally great, but there are annoying downsides. I often get "catastrophic" crashes and the zone identifier files drive me nuts. Plus it takes so much longer to start VSCode when con…

> ... Or better yet, just switch everything to full POSIX. Interix[0] did a pretty good job of this, but MSFT killed it. I was compiling GNU tools w/ GCC and running bash under Interix back in in 2000 under Windows 2000. It was grand. [0] https://en.wikipedia.org/wiki/Interix

I ported a million-line, OpenGL/Motif application using Interix (before it was acquired). Indeed, it was grand.

Re: Coreutils for Windows

#124
post #96

You can install gnu-compative shell commands when installing git for Windows. It even includes useful unix utilites like bash, so check it out if you're interested. More project information: https://gitforwindows.org/ Official download: https://git-scm.com/install/windows

Always wondered if git bash was cygwin, I don't think it is, but it seems very similar.

Close, it's MinGW/msys - different pathname semantics and under-the-hood approaches.

Re: Coreutils for Windows

#125

I wonder if the motivation is to make Ai agents work better on Windows?

The intent was simply to give people coming from macOS and Linux more of the CLI tools they're familiar with. In other words, agents weren't the focus at all. But if it ends up helping them, that's a good added benefit of course.

Could come pre-installed with cygwin instead.

Re: Coreutils for Windows

#126
post #50

Earlier quoted context omitted.

nope. With ClaudeCode you can create skills ( basically markdown instructions) to teach your agents what command to use. You can also update CLAUDE.md to inject custom instructions that are feeded anything ClaudeCode is started.

If that was sufficient wouldn't it just be easier to map to the Powershell commands directly?

Claude code (at least the cli) has this, their code leaked so you can see their extensive (1000+ LOC) PowerShell took script.

Re: Coreutils for Windows

#127
post #50

Earlier quoted context omitted.

If that was sufficient wouldn't it just be easier to map to the Powershell commands directly?

Claude code (at least the cli) has this, their code leaked so you can see their extensive (1000+ LOC) PowerShell took script.

Tool* (no edit button?)

Re: Coreutils for Windows

#128
post #96

You can install gnu-compative shell commands when installing git for Windows. It even includes useful unix utilites like bash, so check it out if you're interested. More project information: https://gitforwindows.org/ Official download: https://git-scm.com/install/windows

Always wondered if git bash was cygwin, I don't think it is, but it seems very similar.

Cygwin executables need cygwin1.dll to run while MSYS-based distributions are using Windows APIs directly. One major difference is around process management: in Cygwin fork() is implemented* while MSYS2 packages will need to use whatever the NT kernel provides (i.e. also need to modify the source to build for this target): https://stackoverflow.com/questions/985281/what-is-the-close...

Re: Coreutils for Windows

#129
post #85

Windows really needs to ditch CRLF and just use LF, and switch from backslashes to forward slashes. Or better yet, just switch everything to full POSIX. In powershell everything is much better than cmd, but it's just not enough. WSL is generally great, but there are annoying downsides. I often get "catastrophic" crashes and the zone identifier files drive me nuts. Plus it takes so much longer to start VSCode when con…

Windows is also a rare bird in UTF-16. "UTF-16 is used by the Windows API, and by many programming environments such as Java and Qt. The variable-length character of UTF-16, combined with the fact that most characters are not variable-length (so variable length is rarely tested), has led to many bugs in software, including in Windows itself. "UTF-16 is the only encoding (still) allowed on the web that is incompatible…

> Windows is also a rare bird in UTF-16.

Web browsers use UTF-16 internally. So Windows isn't even largest "platform" that uses UTF-16.

Post reply on HN