Simple HTTP Server Implemented in Mov

by Mockapapellaon 11/4/2024, 4:03 PMwith 1 comments

by Mockapapellaon 11/4/2024, 4:03 PM

Hey HN, a few years back I came across this talk about how `mov` is turing complete and how this can be hacked into writing programs that run entirely using only `mov` instructions (https://www.youtube.com/watch?v=R7EEoWg6Ekk).

A couple years later I stumbled across an article explaining how to implement a simple http server from scratch (https://bruinsslot.jp/post/simple-http-webserver-in-c/).

Naturally, I tried to combine the two concepts but the AI models weren't good enough at the time and I didn't have the bandwidth for yet another questionably useful rabbit hole. Fast forward to today and o1 was able to implement it with some iteration.

I hope you enjoy this quick weekend project. I tried to make the README as helpful as I could to get it running on your own computer easily, though I probably missed some steps. I also tried to use o1 to review our conversation to add reasoning for various changes that were made between the original server implementation and the one that is `mov` compatible.