News for hackers. Stuff that matters.
Re:Show HN: A little web server in C by stevefan1999 on Wednesday May 17, 2023 @05:32AM (#35973032)
I hate to say it, old man, we have Rust today and we can do things as efficient and as performant as you while being safer overall.

We have tokio to handle all the IO stuff, we have hyper to handle HTTP parsing, and we even have tungstenite to handle websocket out of the box. While I appreciate your work but it will not be practical to write C anymore in the modern age. Well, unless you need to target something LLVM isn't there yet and maybe you need some weird GCC toolchain (cough cough AVR)

Re:Show HN: A little web server in C by easytiger on Wednesday May 17, 2023 @07:37AM (#35973881)
> While I appreciate your work but it will not be practical to write C anymore in the modern age.

been hearing that for 20 years

Re:Show HN: A little web server in C by capableweb on Wednesday May 17, 2023 @07:57AM (#35974030)
If you goal is to just reuse as much stuff as possible, which you seem allude to, then you should just use Apache/nginx/caddy directly. But the goal here doesn't seem to be that, so it makes sense to implement it without using as many libraries as possible.

Both approaches are valid and serve different purposes, you seem to have misunderstood the purpose here.

Re:Show HN: A little web server in C by raxxorraxor on Wednesday May 17, 2023 @10:43AM (#35975907)
People will use C just to get away from Rustafaris (I know...) out of spite some day.
Re:Show HN: A little web server in C by easytiger on Thursday May 18, 2023 @07:22PM (#35995695)
Like the people who took up python to get away from the unbearable Ruby zealots.

Religious wars will persist

Re:Show HN: A little web server in C by robdelacruz on Thursday May 18, 2023 @02:51AM (#35984807)
Confession: I write in C because it's fun and feels like you can do anything in it. Agree it's probably not the most practical or commercial-friendly solution. I like C!
Re:Show HN: A little web server in C by stevefan1999 on Thursday May 18, 2023 @03:47AM (#35985107)
C is like a footgun with naive bullets while Rust is also a footgun but with smart AI assistant. One will faithfully cripple you, but the other will cripple your mind before you shoot. I prefer the latter as it makes you consider