top | item 44701146

(no title)

account-5 | 7 months ago

I don't think it's fair to say Microsoft hijacked the curl command. It's just an alias for a powershell cmdlet. Powershell is definitely not perfect but theres less pitfalls than bash (string quoting, etc; there's loads: https://mywiki.wooledge.org/BashPitfalls). I think powershell was/is a step in the right direction, but in that respective I also think Nushell is a massive improvement on top too.

All of this is opinion though, I just prefer the stuff you get out the box you don't with bash.

discuss

order

nunez|7 months ago

I create courses that are taken on Linux and Windows.

On one hand, I love that curl is aliased to iwr, since I can tell learners to run a curl command without arguments and trust that it will work cross platform

On the other hand, iwr is a cmdlet that shortcuts the System.Net.WebRequest .NET method, which is very, very different from libcurl.

For example, the cmdlet uses one of its properties to obtain bytes downloaded so that it can display a progress bar. Unfortunately, doing this seems to be blocking, as downloads complete SIGNIFICANTLY more quickly if you add -NoProgress to the command. This break cross platform compatibility, however, which adds complexity during course development (more tests, more copy, etc)

account-5|7 months ago

I've been using iwr for years and didn't know that the progress bar added latency! Much appreciated.

My main point to the OP was more that it's just an alias, you can remove it and use real curl if you want.