Top
Best
New

Posted by prophittcorey 7 hours ago

A Modern Web App in C(prophitt.me)
344 points | 153 commentspage 4
geoffbp 5 hours ago|
I remember the days of wrangling cgi-bin on Linux hosts! Not a common paradigm these days..
orphereus 3 hours ago||
Wow, you are a role model for me
Alifatisk 6 hours ago||
Reminds me of the Vibe.d web framework for D lang. Good memories.
chmaynard 5 hours ago||
Not open source, apparently. Am I missing something?
gfalcao 3 hours ago||
Yes, but why? Why really? Are you Valgrinding the s*t out of the code? What about memory leaks? No template language? Did you use an A.I. Agent? I mean, the code is probably porn for GTK/glib coders, unless it's a horror movie instead. I'm really confused on the motivation there.
fg137 2 hours ago|
> CGI's decline was justified in 2004 but doesn't hold up in 2026.

I mean, the article should not be taken seriously on any technical level. It's ok just for fun.

chihuahua 2 hours ago||
I think the best parody is one that leaves the reader wondering if it was intended as parody, or if the author was serious.
afavour 7 hours ago||
A shame to hand code a project in C and then use AI to write a blog post.

It’s a cool project to test yourself but most of the benefits outlined would also apply to Go, Rust, etc, and then you also get memory safety thrown into the mix as well.

skrrtww 7 hours ago|
I don't think the post was written by AI.

It has headers like AI blogposts, and features a lot of parallel structure like AI blogposts ("there's no <blank>. you <blank>"), but if you actually read it none of it reads like slop. To me anyway.

xd1936 6 hours ago|||
Interestingly, Pangram says that exactly the first 50% is AI and the second half is not. ¯\_(ツ)_/¯
Muhammad523 6 hours ago|||
Not that those tools are that accurate
CharlesW 6 hours ago||||
https://mitsloanedtech.mit.edu/ai/teach/ai-detectors-dont-wo...
exe34 5 hours ago|||
You could have saved milliseconds and used a pseudo random number generator.
exe34 6 hours ago||||
It reads like autism to me. The theme confirms that.
cnqso 6 hours ago|||
[flagged]
a3w 3 hours ago||
why not dietlibc/gatling/append-only-DBs?
rfgplk 5 hours ago||
Decent, but a half measure. Meaning you still depend on a separate web server (httpd in this case) to actually push your sites over the wire. This limits you in terms of how expressive your web application can be (ie you cannot arbitrarily write HTTP headers or choose how to serve your clients), and in terms of performance.

A far better (and harder approach) is to actually write the whole stack yourself. Meaning the actual web application and web server are packaged from a single binary. You of course have a myriad options in how to actually implement this (the server loop can run as a separate coroutine/thread/process/etc), but overall the performance and expressiveness flexibility is limitless. On top of that you can actually get blazing fast performance compared to classical approaches.

I'd also advise everyone to avoid CGI at all costs. It's overhead is massive (new process every time, more or less) and _itself_ is a half measure since implementing a proper code hot loading/module system for servers is too much of a hassle (and standardizing it is hard). Nowadays you want to inline your server and then handle HTTP generation separately (however you'd like).

sophacles 4 hours ago|
CGI does allow arbitrary HTTP headers.
andrepd 3 hours ago|
Instantly reminded me of this: source code of the first big Portuguese www portal and search engine: https://github.com/celso/sapo
More comments...