Live data from Hacker News

“I Could Rewrite Curl”

daniel.haxx.se

31–40 of 193 posts

Re: “I Could Rewrite Curl”

#31
post #15

What's frustrating is people who think that they can radically simplify something without knowing anything about it. The same people think they can implement a text editor in 1000 lines of code because that's how the first text editors were made. Why can't we go back to those simple days? We can't because modern software handles cases that those didn't. For example, rendering and editing text seems straightforward un…

All those people don't realise tools like curl did start with few lines back then. And after the first two minutes of testing the devs started adding additional code to handle failures, invalid inputs, different platforms, different versions of a standard etc.

One can write a lot of things in 100 lines if it doesn't have to meet higher standards than a basic chat app tutorial in the "getting started" section of a programming language.

Re: “I Could Rewrite Curl”

#32
All the best art, whether it be books, music, movies or software, make it seem so effortless. Ironically, it's when you see something bad that you kinda realize what goes into it. Like huh, hundreds of talented professionals worked really hard on this movie, and it still turned out this bad. Now imagine if I, a complete amateur, would give it a go...

Re: “I Could Rewrite Curl”

#33

Sometimes this is not completely wrong. I never used Curl or looked at the source code, I don't know about the specifics, but rewriting a simpler copycat from scratch is not always a bad idea. I've done that a few times, to prove a point or because the original was bad and too difficult to maintain.

This reminds me of bocker. (https://github.com/p8952/bocker) A minimal docker in 100 lines of bash.

Re: “I Could Rewrite Curl”

#35
post #15

What's frustrating is people who think that they can radically simplify something without knowing anything about it. The same people think they can implement a text editor in 1000 lines of code because that's how the first text editors were made. Why can't we go back to those simple days? We can't because modern software handles cases that those didn't. For example, rendering and editing text seems straightforward un…

This is "Falsehoods programmers believe about names" all over again.

Re: “I Could Rewrite Curl”

#36
post #15

What's frustrating is people who think that they can radically simplify something without knowing anything about it. The same people think they can implement a text editor in 1000 lines of code because that's how the first text editors were made. Why can't we go back to those simple days? We can't because modern software handles cases that those didn't. For example, rendering and editing text seems straightforward un…

Second link is a 404 fyi

Re: “I Could Rewrite Curl”

#37
post #24

Earlier quoted context omitted.

curl is mostly libcurl, `curl` the executable command is just one of the ways to interface with it. (Unless you're saying "let's pretend to reimplement curl by wrapping around curl behind the scenes," which is delightfully tautological.)

I think they meant their languages HTTP client, not literally the libcurl bindings

Indeed. And that default client is, statistically, likely to use libcurl under the hood (because who has time to fix all those pesky corner cases that you wouldn't think of in 10 years? Obviously someone who's been doing that stuff for 25 years.).

Re: “I Could Rewrite Curl”

#38
post #3

I'd love to see more people sponsor Daniel's work. (I do, because every job I've had in the last two decades has needed it.) https://github.com/sponsors/bagder

1998 was around the time i first got into linux (slackware) and the internet. For a long time, I thought curl was one of those commands that was just a core part of linux and a team of bofhs write and maintain. It was sort of inspiring to find that it was just 1 guy and he did it fairly recently. Mad props to Daniel, whose website and tool have been invaluable to me for 23 years.

Re: “I Could Rewrite Curl”

#39

Obviously everyone could rewrite curl*, in 2021 , or so they think. Here's the magic in that trick: we have, collectively, amassed a heap of knowledge on HTTP and its behavior in the wild; this was made possible by curl, in the first place. Once this is handwaved away, of course it's easy to do. "Look at me, [standing on the shoulders of giants,] I have a really great view from up here!" (*small print: and this is sp…

I wonder what percentage of attempts to rewrite curl in modern languages end up eventually just calling code from libcurl if you trace down through their standard libraries far enough?

I wonder how many attempts to rewrite curl would need to use curl to understand how the protocol works?

Re: “I Could Rewrite Curl”

#40
post #15

What's frustrating is people who think that they can radically simplify something without knowing anything about it. The same people think they can implement a text editor in 1000 lines of code because that's how the first text editors were made. Why can't we go back to those simple days? We can't because modern software handles cases that those didn't. For example, rendering and editing text seems straightforward un…

Second link is a 404 fyi

It's just borked due to formatting, it's adding `)are` to the end of the URL, if you remove it on the address bar it loads :)
Post reply on HN