
Tutorial: HTTP Client in C with libdill - rumcajz
http://libdill.org/tutorial-sockets.html
======
JepZ
Those titles suck. Next week I post my 'Wget in 2 lines of Bash code':

    
    
      #!/usr/bin/env bash
      curl "${@:2}"
    

I mean, if you use a lib it is no wonder you have a low line count and the
result is in fact as much Wget as curl is wget (probably even less).

How about 'Tutorial: HTTP Client in C with libdill'?

~~~
dang
OK, changed. Thanks!

------
bfred_it
If this is wget, my bicycle is a car.

This isn't "Wget in 50 lines of C code", just `wget --help` page is 192 lines.

~~~
dewey
It’s just the title that’s a bit simplified. First paragraph already says:

“This tutorial is meant as an introduction to libdill socket library. We are
going to develop a simple version of wget utility, that can be used to
download webpages from the net.”

~~~
moosekaka
a bit simplified? title would be considered clickbait if it were a webpage.

~~~
mandelbulb
Editorialized clickbait from the HN user, that is. The original is just fine.

~~~
scsh
Apparently the author and HN user are the same person.

~~~
mandelbulb
Oh, wow! Indeed. That's disappointing.

------
Aissen
libdill looks interesting, but I'm a bit surprised by the lack of prefix in
the functions, types, etc. C does not have namespaces, but open source
libraries usually use short prefixes for readability. What do you think ?

------
Skunkleton
It is disingenuous to plug your own library with a click bait title and no
indication that you are the author.

------
anonfunction
Port to Golang using stdlib:

[https://play.golang.org/p/vXTpR9IjBxV](https://play.golang.org/p/vXTpR9IjBxV)

~~~
xstartup
wget has a default read timeout of 900s, yours has no timeout.

------
irundebian
+k lines of libdill.c

~~~
wereHamster
… and don't forget libc!

~~~
rootlocus
... and don't forget the OS. It's a deep rabbit hole.

~~~
z3t4
It's all abstractions and sometimes concretions. Then there's leaky
abstractions where you need to know details of the implementation in order to
use it.

------
usr1106
libdill is about concurrency made easy (according to the home page). But this
tutorial has no concurrency as far as I can see after a quick read. That's a
bit weird way introducing a library.

------
teacpde
It would be interesting to see a performance comparison between libdill and
goroutine for concurrent network requests.

------
FraKtus
What is the difference with libcurl ?

