Live data from Hacker News

Microsoft cURLs too

daniel.haxx.se

61–70 of 107 posts

Re: Microsoft cURLs too

#62
post #9

Curl is alright, and congratulations on this massive and very impressive step forwards, but the CLI not exactly very user friendly. httpie[1] is a great tool if you find curl invocation somewhat arcane. 1. https://httpie.org/

HTTPie is great, but sometimes you need curl. Curl supports a lot more protocols.

Plus, it's easy to forget that httpie is SLOW. Sometimes when testing an API the timings are worrying, until you remember and switch over to cURL to confirm everything is right with the world.

Re: Microsoft cURLs too

#63
On a side note, for all my daily download tasks (other than debugging some web API) I've settled with aria2[0]. It seems to support every protocol used in modern Internet and has plenty of flexibility (connection multiplexing, bandwidth control etc.). It can even serve as 24/7 torrent client managed via remote API.

0. https://aria2.github.io/

Re: Microsoft cURLs too

#64
post #51

Cool, now I don't need to remember the arcane incantation to download a file with Powershell. Do you think we'll see things like the good old "curl | bash" for Windows now? They still have no package manager worth using.

> the good old "curl | bash" I would be thankful if the habit of trusting a random IP with control of one's shell could die, forever.

Why would you be using a random ip? That incantation is usually used with a URL where you would have just downloaded and installed the software manually anyway.

There are various arguments against the curl-piped-to-shell idiom but "random ip" doesn't seem like a valid one.

Re: Microsoft cURLs too

#65

Cool, now I don't need to remember the arcane incantation to download a file with Powershell. Do you think we'll see things like the good old "curl | bash" for Windows now? They still have no package manager worth using.

Curl some url and execute is a massive security risk.

In what way is it more of a risk over downloading and executing an installer from the same site?

The only reason I can think of is if the script partially downloads and only half executes. Doesn't seem "massive" though...

Re: Microsoft cURLs too

#66

One thing I am always sure to share with collegues when we discuss curl, is the fact from the command line you can generate the underlying C code. This is pretty useful when creating a CLI for pretty much any app, and I've used it regularly to generate a CLI for an app. My post on how to do it: http://austingwalters.com/export-a-command-line-curl-command...

There is one for generating goalang code as well: https://github.com/mholt/curl-to-go Also, it does not depend on libcurl.

Re: Microsoft cURLs too

#67

Earlier quoted context omitted.

It's like they're trying to get a record by not doing that. For years I've been baffled why Notepad at the very least couldn't understand unix line endings.

It's because windows line endings are actually the technically correct one. Ever tried raw output to terminal?

I go back and forth on this.

On the one hand, you're right in that you need both a line feed and a carriage return to actually "start a new line" (+1 to Windows). On the other, it seems wasteful to have two characters do a job that, in text files, could be just as easily done by one; editing and storing text is not the same as printing it, especially when the print incantation is a vestige of mostly-obsolete hardware (+1 to Unix).

Re: Microsoft cURLs too

#68

Cool, now I don't need to remember the arcane incantation to download a file with Powershell. Do you think we'll see things like the good old "curl | bash" for Windows now? They still have no package manager worth using.

If you're still using Windows PowerShell proper instead of PowerShell Core, you still need to delete the curl alias or call curl explicitly as curl.exe in order to use it. Also, take a look at Chocolatey for package management. Yeah it's not a built-in thing, but it's pretty decent.

I hated Chocolatey. Those binary shims seemed to produce slow, unstable binaries. There also still isn't a fully-usable Chocolatey backend for the PowerShell package manager.

The Programs & Features pane works just fine for me as a package manager.

Re: Microsoft cURLs too

#69

Earlier quoted context omitted.

It's like they're trying to get a record by not doing that. For years I've been baffled why Notepad at the very least couldn't understand unix line endings.

It's because windows line endings are actually the technically correct one. Ever tried raw output to terminal?

Maybe according to the defined behavior of those characters, but that can't be why notepad doesn't support Unix line endings, as it still doesn't actually line feed when it sees a line feed character. I have never tried but I also suspect it won't do a carriage return for just a carriage return character (to be fair, that wouldn't really makes sense in a text editor anyway).
Post reply on HN