Leaving uv
I thought this project would be
done when one could run
uv add red-dwarf to get it.
You know, like how serious libraries do.
I know it would bring some hurdles, sure: find how to build the package, perform checks on test.pypi, then host on pypi...
I would have learned so much! I would have become such a better programmer!
But maybe that's not the way.
The split incident
One morning I split the source code into smaller files.
The 600-lines code was easily split into 3 files: a main interface with
all user-facing stuff,
server.py for route registration and
wire.py for parsing and sending requests and responses.
It made sense, right? I would lose nothing except...
except the ability to curl.
curl > uv
Consider an environment where you don't have access to uv, not so uncommon under security restrictions like in corporate environments.
Or consider that pip/uv can be compromised as in the eMudhra incident.
Now, imagine one file that does what it says. Just one file. You certainly won't regret one file.
After all, why wouldn't it be possible? One of the requirements of Red Dwarf was pure Python, no external dependencies. Why waste this?
Requirements? Decently recent Python. Version? Check the comment at the
top of the file. Docs? Online, and a .md version for you
and your clanker.
Secure? Sure, ask Claude to review it for all I care. Watch for supply chain attack on your clipboard, they're spooky.
Limitations
Sure, in an actual version control system, you'd want to keep track of the RD version used (and that's if you have to grab it from pypi and can't input it manually because of reasons).
But sometimes the reason we can't have nice things is that we're afraid to grab them.
Conclusion
Yeah fuck it we ball. I went single-file curl install for RD. Cut code down to less than 500LOC.
My focus is make sure the code is readable top to bottom.
Hope nobody tells me to curl my enthusiasm.