Hacker News new | past | comments | ask | show | jobs | submit login

> Apple has shipped and used curl in their products for twenty years but they never assist, help or otherwise contribute to the development. They also don’t sponsor us in any way, like with hardware.

Do they have an obligation to? Even a moral one? Honestly I don't think (I hope!) Apple actually uses curl in their products (probably a good thing). It's just provided as a convenience to developers who might be used to it.

I got curious about Apple's use of Curl and Googled it. One of the top hits was another blog post complaining about Apple not donating Macs:

https://daniel.haxx.se/blog/2021/09/25/curls-first-twenty-ye...

I think you could replace 99% of the uses of Curl (download one file via HTTPS) with like 100 lines of Python or Rust or Go. It's not critical infrastructure in the same way that OpenSSL or LLVM or WebKit are.




I don't think they have a moral obligation to, necessarily. But in exchange for $1000 of hardware (at retail price, mind) they would easily get >>$1000 of value for them and their customers.

It doesn't make sense not to do it, if the corporation is a single rational hive mind. Of course, it isn't. A corporation is a collection of individuals, each operating with different goals and limited information.


> It's not critical infrastructure in the same way that OpenSSL or LLVM or WebKit are.

libcurl is for sure


It's not. The main application of libcurl could be very easily replaced. Just because it is widely used (assuming it is) doesn't mean it is valuable.

You wouldn't say `ls` is critical infrastructure.


I would absolutely call coreutils critical.


Ok maybe "critical" doesn't convey what I mean. What I mean is it's not something that would be difficult to replace.

It's like... you might use your phone's timer app all the time. But if it suddenly started nagging you for donations all the time you aren't going to donate; you'd just switch to a different timer app. It isn't uniquely valuable.


"Fetch files over HTTP/S" is easy to replace, but lib/curl is a lot more than that, both in protocols and in the endless "fun" edge cases that pop up in the wild west that is the internet.


Yeah but almost nobody is using it for any of those weird protocols.


Cars use it and they're almost always not connected to the internet constantly. I am willing to bet they use weird protocols all the time.


>it's not something that would be difficult to replace

That's very naive. It's just not something that hard to imagine to replicate. Why do you think a 26 year old project exists, if it's something that could be replaced by a 100 lines something? Is the author stupid, or does he just include a lot of cruft and boilerplate? Are Apple and all the other users wrong?


Because it's useful and it works? Also we didn't have as many HTTP implementations available in the past.

How old do you think `cat` is? Does that mean it would be hard to replace?

> Is the author stupid, or does he just include a lot of cruft and boilerplate?

I never suggested that. Curl had it's own HTTP implementation. A replacement would obviously not do that. Also curl supports a gazillion protocols that almost nobody uses.


Cat is an interesting example because it's not as trivial as it seems, especially when it comes to performance and resilience:

https://endler.dev/2018/fastcat/

https://ariadne.space/2022/07/17/how-efficient-can-cat1-be/

I think this is one of these "not built here" discussions. It's very easy to underestimate the number of edge-cases to support especially in the case of network transfer. You start implementing your own, then you've got to handle non standard certificates, 300 redirects, temporary failures, backoff strategies, optimizing chunk size, handling proxy calls, etc. Using a standard library makes sense.


have you ever tried? How was it complexity-wise?

(And critical IMO means 'important in fact' not 'not replaceable in theory'.)


I’d suggest learning what libcurl is used for before throwing it out with the bath water ¯\_(ツ)_/¯


It's used for downloading files (and occasionally uploading them) over HTTP(S). It has plenty of other features but that's what it's used for 99% of the time.

What do you think it is used for?


Almost every new car uses libcurl. You can find curl in TVs, gaming consoles, smart watches, smart phones and so on.


Right... and they use it for downloading files over HTTP(S).

Also smart phones, smart watches and TVs generally don't use libcurl for that. Android, iOS and WebOS have their own HTTP stacks. I don't know about cars or consoles.


You seem fixated on "downloading files over HTTP(S)" and are missing the point.

Nearly every videogame for instance use libcurl as their HTTP stack. You know why? Because it's the best HTTP library for C/C++.

If you have a C/C++ application doing HTTP traffic it's likely using cURL. Or, I dunno, you could look at this page to find out: https://curl.se/docs/companies.html


So the Curl Project in GH has 9751 issues closed. You are talking about 100 lines of Python or Rust/Go. That claim is kind of funny given the amount of edge cases HTTP requests come across and Curl having solved them. As a web dev we use frequently Curl for Downloading file, post request, follow redirects, check HTTP status. There are countless other usage of Curl apart from File downloading as you are repeating.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: