Show HN: A little web server in C
11–20 of 121 posts
Re: Show HN: A little web server in C
#12This may sound sort of “old man waves at cloud” of me but one thing I’ve found sad is the gross over-complication of later versions of standards such that the sort of project linked here may not be as practical for something like HTTP/3 for example. Similarly, the large, muddled tool chain that is “required” to make modern JavaScript applications makes it hard for newer learners to really understand what is going on…
Re: Show HN: A little web server in C
#13This may sound sort of “old man waves at cloud” of me but one thing I’ve found sad is the gross over-complication of later versions of standards such that the sort of project linked here may not be as practical for something like HTTP/3 for example. Similarly, the large, muddled tool chain that is “required” to make modern JavaScript applications makes it hard for newer learners to really understand what is going on…
I see what you’re saying and agree that HTTP3 is complicated but I would that since it’s a backwards compatible standard, the added complexities are completely optional. For most use cases the basic protocol is perfectly suitable and only as the scale evolves does it require the additional complexity.
Re: Show HN: A little web server in C
#14Cool project, but this project demonstrates the reason I've stopped writing things in C. The standard library has garbage string functions and it seems every project has its own version of this file: https://github.com/robdelacruz/lkwebserver/blob/main/lkstrin... It's fun to write this (and read others' versions) the first 3 or 4 times, but it gets old quickly.
Re: Show HN: A little web server in C
#15Cool project, but this project demonstrates the reason I've stopped writing things in C. The standard library has garbage string functions and it seems every project has its own version of this file: https://github.com/robdelacruz/lkwebserver/blob/main/lkstrin... It's fun to write this (and read others' versions) the first 3 or 4 times, but it gets old quickly.
I have the same issue, but I blame the absence of good package management. If it had that, one of the thousands of these libraries would have won out and become quasi-standard.
Re: Show HN: A little web server in C
#16Cool project, but this project demonstrates the reason I've stopped writing things in C. The standard library has garbage string functions and it seems every project has its own version of this file: https://github.com/robdelacruz/lkwebserver/blob/main/lkstrin... It's fun to write this (and read others' versions) the first 3 or 4 times, but it gets old quickly.
Re: Show HN: A little web server in C
#17Cool project, but this project demonstrates the reason I've stopped writing things in C. The standard library has garbage string functions and it seems every project has its own version of this file: https://github.com/robdelacruz/lkwebserver/blob/main/lkstrin... It's fun to write this (and read others' versions) the first 3 or 4 times, but it gets old quickly.
https://github.com/robdelacruz/lkwebserver/blob/main/lkstrin...
Re: Show HN: A little web server in C
#18Earlier quoted context omitted.
I dunno. I haven't written a multiplexing I/O server. I haven't written a CGI forking process. I haven't written a reverse proxy handler. Heck, I haven't written C in years. All sorts of reason why someone might want to write one of these. There's even a bunch of free tools to help test it (and who doesn't like free tests!). Until you put fingers to keyboard, you just don't know, it's all book learnin'.
Good for you. Great way to learn!
Re: Show HN: A little web server in C
#19[flagged]
I dunno. I haven't written a multiplexing I/O server. I haven't written a CGI forking process. I haven't written a reverse proxy handler. Heck, I haven't written C in years. All sorts of reason why someone might want to write one of these. There's even a bunch of free tools to help test it (and who doesn't like free tests!). Until you put fingers to keyboard, you just don't know, it's all book learnin'.
This!
Also writing a HTTP server seems like a hacker rite of passage, like creating your own lightsaber for a Jedi.
So last Christmas, I did just that :)
Personally, I like retrocomputing so I did mine in perl. I learned a lot of things, and I added a few "modern features" as extras like mDNS and cosmopolitan, because it's more fun to use something.local that 127.0.0.1)
It's on https://github.com/csdvrx/PerlPleBean and if you want to dig into mDNS, check the Bonjour part on https://github.com/csdvrx/PerlPleBean/blob/main/experiments/...
It's very fun to be able to launch just one executable and then curl whatever.local
Re: Show HN: A little web server in C
#20Cool project, but this project demonstrates the reason I've stopped writing things in C. The standard library has garbage string functions and it seems every project has its own version of this file: https://github.com/robdelacruz/lkwebserver/blob/main/lkstrin... It's fun to write this (and read others' versions) the first 3 or 4 times, but it gets old quickly.
This is how I felt writing Go. Writing the same nongeneric functions with slightly different type signatures and/or endless interfaces and/or interface{} signatures. It's 2023.
and never mind that Go has had generics for over a year now right? sometimes having a small, stripped down language is better than having a huge bloated monster. I would point to examples, but you know what they are.