News for hackers. Stuff that matters.
Re:Show HN: A pure bash web server. No netcat, socat, etc. by dzove855 on Tuesday January 04, 2022 @11:01AM (#29796228)
Bash is not mean for kind of projects like this. I even develop on other languages. But i like bash. A good bash script, is like reading a novel, because it's challenging to have a clean script.
Re:Show HN: A pure bash web server. No netcat, socat, etc. by ramses0 on Tuesday January 04, 2022 @11:16AM (#29796443)
This is my favorite "reference" bash script: https://git.einval.com/cgi-bin/gitweb.cgi?p=abcde.git;a=blob...

...it feels like "if it's possible to do in bash, this does it".

Re:Show HN: A pure bash web server. No netcat, socat, etc. by istjohn on Tuesday January 04, 2022 @12:05PM (#29797030)
5500 lines of bash. Wow.
Re:Show HN: A pure bash web server. No netcat, socat, etc. by pmarreck on Tuesday January 04, 2022 @11:13AM (#29796403)
I get it. The challenging part is fun. You can learn all the corner cases, the clever bash-isms, and then show off. But the code you end up with is essentially unmaintainable, especially since you don't have any test coverage, so...
Re:Show HN: A pure bash web server. No netcat, socat, etc. by dzove855 on Tuesday January 04, 2022 @11:16AM (#29796450)
Well that's true. I took me two hours to get this done. Since accept was not clear at the beginning. But it will be cleaner in the future, i'm still not convinced how it works currently.
Re:Show HN: A pure bash web server. No netcat, socat, etc. by carlhjerpe on Tuesday January 04, 2022 @11:53AM (#29796892)
You could be a doctor! "I don't really know why or how this works, but I'll prescribe enough for you to last a month".