I was chatting with a friend and joked "curl is such a Swiss army knife, it makes the Swiss blush". That made me wonder if it could do actual compute...<p>A few prompts to Claude Opus 5.5 later it had a possible way forward, using the file:// protocol and the expand-variables feature from curl to have it read files from disk that then tell it what to fetch next. Repeat this a few million times and you have a working CPU.<p>Claude wrote a working demo of a RISC-V CPU using curl in a few hours, but the frames came in at 1 frame per 8.3 hours. Most of it was spent loading curl itself and almost half the instructions were software multiply/divide. It suggested it could cut it down if it could just statically compile curl to just support the file:// protocol, as curl loads 33 libraries and sets up OpenSSL before reading a single byte. Along with that it suggested to use the M extension to do multiplication / division look-ups. That saves most of the rest of the time.<p>The end result is 1 frame per +- 40 minutes.<p>Live page: <a href="https://doom.vashiru.tech" rel="nofollow">https://doom.vashiru.tech</a>
Source code: <a href="https://github.com/Vashiru/curl-doom" rel="nofollow">https://github.com/Vashiru/curl-doom</a> (RISC-V (RV32IM) computer whose CPU is curl, that just happens to run DOOM).