1 comments

  • Vashiru28 minutes ago
    I was chatting with a friend and joked &quot;curl is such a Swiss army knife, it makes the Swiss blush&quot;. 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:&#x2F;&#x2F; 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&#x2F;divide. It suggested it could cut it down if it could just statically compile curl to just support the file:&#x2F;&#x2F; 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 &#x2F; 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:&#x2F;&#x2F;doom.vashiru.tech" rel="nofollow">https:&#x2F;&#x2F;doom.vashiru.tech</a> Source code: <a href="https:&#x2F;&#x2F;github.com&#x2F;Vashiru&#x2F;curl-doom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Vashiru&#x2F;curl-doom</a> (RISC-V (RV32IM) computer whose CPU is curl, that just happens to run DOOM).