frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

A Modern Web App in C

https://prophitt.me/writing/a-modern-web-app-in-c
23•prophittcorey•44m ago

Comments

paularmstrong•11m ago
> Everything about marketyour.games is modern

I can't read any of the text on that page other than the headings. Is that what makes it modern? I assume the stack mentioned in the blog post is vibe-slop as well.

fmo91•8m ago
It's not very clear to me why the author has chosen C in the first place. I appreciate the effort of sharing the experience with us, anyway.
EGreg•4m ago
I'm old enough to remember when the OKCupid guys wrote their own webserver in C++!

I took the concept of "slots" in requests, from it: https://github.com/okws/okws

afavour•6m 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.

EGreg•5m ago
"Every request spawns a fresh process. Deploying a new version is replacing one file. That means no server restart and no downtime. New requests simply pick up the new binary."

I think that's why FastCGI exists. It is the equivalent of PHP's "Swoole" or "FrankenPHP" or "amphp" or Laravel's "octane", etc. Each process is long-lived and tries to clean up its state as much as possible between requests. Forking a new process can take around 8ms (https://news.ycombinator.com/item?id=19005586)

When I was building https://github.com/Qbix/webserver in PHP, I was faced with forking a new process per request. I implemented fork-per-request at first, similar to PHP-FPM and then implemented the "FastCGI" approach of long-lived processes that clean up after each request. (Modern PHP has introspection so the engine can know what to clean up, before calling the php files to handle things.) However, some things are not really possible to completely reset in PHP, and you have to be careful with database connection pools, etc. Typically those are left open even by preforking processes like php-fpm.

Anyway, I ended up flipping it: use the "FastCGI" approach as a default, and if the original PHP code doesn't work (rare), then for that app, you can choose the regular CGI approach of forking a process per request. That way you get maximum speed by default, and manually opt into safety (this is an exception to my usual priorities).

PHP is actually quite fast. But I was also interested in transpiling it to C. So I built the transpiler at: https://ulanguage.org/playground ... used Claude to transform about 1000 PHP functions to their native equivalents, but if you use any of the others, it would hook into the Zend runtime and link with it. (There are some nuances with zvals and objects, and resources in previous PHP versions, but I managed to overcome them.) By the way, it also works with Node and Python FFI the same way.

You can basically now take PHP, Python or Javascript/Typescript code, and speed up the CPU-bound parts about 10-50x. A lot of that is because of string and JSON handling. Many web apps use strings and JSON a lot. So underneath, I had the compiler use "ropes" for the strings, and avoid concatenation. It also parallelizes the JSON encode and decode into code that can run on multiple cores at once, i.e. large JSON payloads are encoded and decoded in parallel. Those are just huge speedups.

Anyway... all of this is mostly focused on speed optimization, so you can solve the literally C100K problem (forget C10K) today, on a regular box. If you don't need speed or FastCGI, your approach is fast enough for the vast majority of applications.

Harness Learning Enables Generalizable Test-Time Adaptation

https://arxiv.org/abs/2609.35738
1•7777777phil•54s ago•0 comments

Show HN: Automated Types for Python

https://github.com/yiheinchai/trickle
1•chaiyihein•1m ago•0 comments

Is Time Travel Legal? (2016)

https://law.stackexchange.com/questions/8641/is-time-travel-legal
1•Vaslo•1m ago•0 comments

I Redesigned VLC After 25 Years [video]

https://www.youtube.com/watch?v=ERFeOgqk324
1•alexrsagen•2m ago•0 comments

The Hemispherical Quantum Selector

https://digitalmarketingco.org/white-papers/hemispherical-quantum-selector
1•marketingagency•3m ago•0 comments

Thinking Will Become a Hobby

https://www.spinellis.gr/blog/20261008/?li261008
1•pranitha_m•3m ago•0 comments

Show HN: Interactive Museum of Windows Player Skins

https://wmp-skin-museum.mitpit.com/
1•MitPitt•3m ago•0 comments

I scored all 84 Dallas-area cities on 288 data points

https://realust.com/best-places-to-live-north-texas/
1•viahaynes•6m ago•0 comments

What's Left for Us?

https://rodolphoarruda.pro.br/whats-left-for-us/
2•speckx•8m ago•0 comments

Self-Serve Drill Bits Are a CIAM Use Case

https://ciamweekly.substack.com/p/self-serve-drill-bits-are-a-ciam
1•mooreds•8m ago•0 comments

AI spots nearly 19,000 road offences, in 2 week trial

https://www.bbc.com/news/articles/c39wzpegqgd9o
1•kitbrennan•8m ago•0 comments

A return to two-pizza culture

https://www.allthingsdistributed.com/2026/06/return-to-two-pizza-culture.html
1•mooreds•8m ago•0 comments

Commercialization of laser fusion energy [pdf]

https://xcimer.energy/wp-content/uploads/2026/04/XEC-20260224-Commercialization-of-LFE-Whtppr-SHA...
1•Eridanus2•9m ago•0 comments

Joseph Gordon-Levitt Has Some Things to Say About A.I

https://www.nytimes.com/2026/10/10/opinion/joseph-gordon-levitt-united-nations-ai.html
1•mooreds•9m ago•0 comments

Muse Wonder

https://research.meta.ai/blog/muse-wonder
6•meetpateltech•9m ago•0 comments

Show HN: Authrot – extract your story elements out of chapters and graph them

https://authrot.app
1•JoeOfTexas•10m ago•0 comments

Make Big Brother Bad for Big Business

https://www.theatlantic.com/newsletters/2026/10/flock-surveiilance-cameras-regulation/688971/
1•paulpauper•10m ago•0 comments

Show HN: Cohesive – one button for when your thumb opens the feed on its own

https://apps.apple.com/us/app/cohesive-digital-detox-nope/id6742073987
1•carbaj03•10m ago•0 comments

The Disappointing Death of Deno: What Happened, Why, & What's Next

https://brettcodes.com/the-disappointing-death-of-deno/
1•brettcodes•10m ago•0 comments

Casio F-91W using Statecharts

https://github.com/dundalek/casio-f91w-fsm
1•austinallegro•11m ago•0 comments

Hermes vs. OpenClaw: Which AI agent I kept after running both

https://www.dhawalshah.net/article/hermes-vs-openclaw/
3•djshah•11m ago•0 comments

New Math from OpenAI

https://thezvi.substack.com/p/new-math-from-openai
2•paulpauper•12m ago•0 comments

Picks and Shovels: Game about AI industry built by AI

https://blog.fsck.com/2026/10/11/picks-and-shovels/
1•CharlesW•12m ago•0 comments

Michael Woodford, Nobel Laureate

https://marginalrevolution.com/marginalrevolution/2026/10/michael-woodford-nobel-laureate.html
2•paulpauper•14m ago•0 comments

Android is the best and worst thing about Googlebooks

https://www.theverge.com/tech/1008750/googlebooks-android-best-worst-notifications-app-cast-file-...
1•thm•15m ago•0 comments

Poverty Changes Your Mind-Set (2018)

https://www.chicagobooth.edu/review/how-poverty-changes-your-mind-set
2•chistev•16m ago•0 comments

Program Performance Degrades with Usage

https://www.dotnetperls.com/2026_10_12_program-performance-degrades
2•speckx•16m ago•0 comments

Why Language Models Are So Hard to Understand

https://www.quantamagazine.org/why-language-models-are-so-hard-to-understand-20250430/
3•Bluestein•18m ago•0 comments

The Welfare State Is Crushing Britain

https://www.wsj.com/world/uk/united-kingdom-welfare-disability-payouts-737d77a0
4•impish9208•19m ago•1 comments

Helix World: A real-time world model that generates video and stereo sound

https://noiz.ai/lp/blog/meet-helix-world
2•acossta•19m ago•0 comments