Live data from Hacker News

“I Could Rewrite Curl”

daniel.haxx.se

171–180 of 193 posts

Re: “I Could Rewrite Curl”

#171
post #106

Earlier quoted context omitted.

A question that arises out of this is, should the 90% use cases be handled by a small, simple tool, or by the tip of the iceberg of a large, complex tool such as curl? I can see the advantages of standardizing on a complex, powerful tool for simple use cases. For one thing, it may be the only way to standardize: simple versions are too easy to write, and therefore you get dozens of competitors, none of whom are popul…

Sometimes yes, sometimes no. Counter-example: Jenkins. It does what you ask of it, its base install is "naked" and only contains the minimum functionality in the core. Everything then becomes a plugin. Git. GitHub. Branch for multi-branch pipelines. Credentials management. And on and on and on. Now you have stay on top of maintaining the plugins in addition to the core. Also, many plugins require other plugins so jus…

well written monoliths are the dream.....

curl is a utility, like power.

you don't worry about electricity not being able to power your TV because it was designed for light bulbs, it just works.

Re: “I Could Rewrite Curl”

#172
post #150

Earlier quoted context omitted.

> What's frustrating is people who think that they can radically simplify something without knowing anything about it. I run into this problem with my manager a lot, who knows just enough to get himself in trouble. There's probably a term for it, but I call it the "complexity trap". He sees a problem, thinks he has an "aha!" moment, and tells me about a simple solution, and asks me to implement it. This solution, of…

I’ve found that a small amount of mathematical rigor reduces the size of most complex code by a few orders of magnitude. It has the effect of short circuiting the complexity of the problem, because it defines all the corner cases in a compact form. Interface with sloppy spaghetti systems can usually be hidden away at the edges of the system. The main problem is that less experienced engineers invariably come in and s…

> I’ve found that a small amount of mathematical rigor reduces the size of most complex code by a few orders of magnitude.

I agree, though this is generally limited to singular problems, and usually becomes harder to implement the higher up the abstraction train you go. I've found this especially true in business logic, where you don't know what the requirements or even end goal is; by the time you're ready to apply some nice mathematical based optimizations at a high abstraction level, doing so often requires a lot of work exposing all of the information you need from lower abstraction layers. All comes down to planning.

> As long as there’s someone that diligently guards against such things, it works out OK. Results vary wildly after those people leave.

This is specifically why I mentioned my manager haha, who will both come up with crazy edge cases that in many cases don't even apply, and will come up with "aha!" solutions to problems that ignore major edge cases. Perks of not working for a software company.

Very interesting history on the HP printer drivers, thanks for sharing that. I do remember some of the evolution that they went through, from the Linux perspective, and it was amazing how that tangled mess just started to magically work, circa 2008 if I remember right.

Re: “I Could Rewrite Curl”

#173

Earlier quoted context omitted.

Kudos to you for supporting multiple cursors from the start, which a buffer with a gap can't support efficiently. Douglas Englebart would have approved! https://en.wikipedia.org/wiki/Collaborative_real-time_editor >History of key products: The first instance of a collaborative real-time editor was demonstrated by Douglas Engelbart in 1968, in The Mother of All Demos. Widely available implementations of the concept to…

The multiple-cursors problem goes to show how much of computing is STILL strongly single-user, even for all our multiuser underpinnings. Arguably the only "single user" devices should be things like the mouse itself, as multiple people can see the same screen (and maybe even use the same keyboard). Some games implemented this to allow two-player on the same machine - each would get a joystick or "their half" of the k…

The Thinkpad with two Trackpoints was ostensibly single user, but multi-hand, which applications still are not designed to cope with, let alone multi user multi hand/finger/trackpoint!

Given a program that supported multiple trackpoints, two people could use the two Trackpoints on each side of the keyboard, just like you describe with keys.

Now we have multitouch APIs on mobile devices, at least. But they're not a good match for supporting multi-mouse/trackpoint, since they only support tracking fingers while they're touching the screen, not pointing around without pressing like a mouse/trackpoint does.

Re: “I Could Rewrite Curl”

#174
post #154

Earlier quoted context omitted.

Micro-services, for example, are pretty much all HTTP + JSON. The only place for HTTP is the browser and purely for historical reasons. Using it for anything server-server is a waste of network and CPU.

Thankfully it is going away with gRPC and friends.

Which is HTTP/2, another monster, not even fully implemented by web browsers, which is why gRPC doesn't work using web browsers.

Re: “I Could Rewrite Curl”

#176

Earlier quoted context omitted.

Well, your distro choose to include one lib that can be used with most protocols out there. They include the multi tool and many of the apps also included on the box require the tool. If you want to use something else. You have to install it on the host. Every box comes with bash, but we still install other languages and frameworks on the host so we can run out applications with tools that make sense. If you want a d…

The point is that you’re not always the person who gets to decide which distro, which tools to install atop the distro, or which dependencies your scripts will use. If you own those choices, of course you can add in your own tool, but you frequently don’t own those choices.

But cannot this charge be levied upon all tools and utilities? If you do not have the permission to bring your own tools it stands to reason that you will have to use the tools already in place, be that curl or some other random assortment of literally anything else. I don't much see the moral basis behind showing up at the construction yard and then lamenting over your lack of choice simply because your employer only brought makita brand tools.

Re: “I Could Rewrite Curl”

#177
post #106
post #30

Let's be honest here. Curl to 98% of people is http/1 requests with some post params and maybe json body, with some custom headers. Most language standard libs (which might be using libcurl) can facilitate writing that relatively quickly. And probably with a more 'modern' CLI. Curl though, is a very wide breadth project. It currently supports the following protocols: DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP,…

A question that arises out of this is, should the 90% use cases be handled by a small, simple tool, or by the tip of the iceberg of a large, complex tool such as curl? I can see the advantages of standardizing on a complex, powerful tool for simple use cases. For one thing, it may be the only way to standardize: simple versions are too easy to write, and therefore you get dozens of competitors, none of whom are popul…

I agree. At any rare the System default curl is rarely compiled with all those features enabled, so finally one sticks to http/https/ftp/ftps subset for curl all the time.

Re: “I Could Rewrite Curl”

#178

Earlier quoted context omitted.

Well, your distro choose to include one lib that can be used with most protocols out there. They include the multi tool and many of the apps also included on the box require the tool. If you want to use something else. You have to install it on the host. Every box comes with bash, but we still install other languages and frameworks on the host so we can run out applications with tools that make sense. If you want a d…

The point is that you’re not always the person who gets to decide which distro, which tools to install atop the distro, or which dependencies your scripts will use. If you own those choices, of course you can add in your own tool, but you frequently don’t own those choices.

I feel the alternative is not better, a light weight bare minimum lib and no ability to install your own is definitely worse.

Re: “I Could Rewrite Curl”

#179

Earlier quoted context omitted.

Seen this comment a lot in the thread, I'd like to know which libraries do. Google didn't help (as usual nowadays).

http://pycurl.io/ PycURL is a Python interface to libcurl.

I was hoping to see less obvious examples, and especially standard libraries

Re: “I Could Rewrite Curl”

#180

Earlier quoted context omitted.

Well, your distro choose to include one lib that can be used with most protocols out there. They include the multi tool and many of the apps also included on the box require the tool. If you want to use something else. You have to install it on the host. Every box comes with bash, but we still install other languages and frameworks on the host so we can run out applications with tools that make sense. If you want a d…

The point is that you’re not always the person who gets to decide which distro, which tools to install atop the distro, or which dependencies your scripts will use. If you own those choices, of course you can add in your own tool, but you frequently don’t own those choices.

I guess I don't understand the complaint? You're worried that other people are using it for their own projects? The reason it's on every box is because it exposes the API and it's a library for half the shit on the host.

If you don't get to choose anything on the host, why are you concerned what other people use? If you install your own apps, add that lib you want?

Post reply on HN