3,979 karma · joined March 23, 2015
https://youtube.com/watch?v=1YW_6OXYB7E
warpgate.io
The project has a few goals:
(1) see how far I can push AI -- this project is extremely complex -- an n:m work-stealing stackful runtime for Python with multiple I/O backends. If I can reasonably get such a project stable fully vibe coded. Then that sells the model to me at least.
(2) scale Python's networking as there is a huge gap between Python and Go. Most people don't think of Python as their first choice for networking. But I love python, i think its extremely elegant. So what if we could add a runtime extension that improved python networking.
That's the work so far at least. It was about 2 - 3 months of testing and the commits now show the history.
I'd say start here for some basics
https://github.com/robertsdotpm/runloom/blob/main/docs/quick...
https://github.com/robertsdotpm/runloom/blob/main/docs/cookb...
Then if you want the fastest performance possible for a server this is the epoll-based fastest benchmark program (it calls directly into an optimized server dispatcher built into the runtime. It's designed to minimize Python call overhead while still supporting handlers):
https://github.com/robertsdotpm/runloom/blob/main/benchmark/...
There's an equivalent of that for TCP connections too. UDP hasn't been added yet (optimized version.) And yes -- I have to admit that the API is a mess at the moment and so are the docs. This hasn't been designed well to be user-friendly (like 10 ways to do the same thing...) I just haven't had time to do it. All my time went into testing the project. And tuning performance. So you see a mix of different approaches. But this could be fixed fairly easily in the future.
For the Python code you've really got 3 ways to use this extension:
1. You can use the main API. No monkey patching stuff. You use things like channels and the optimized serve API (this is what had the highest number in bench marks.) Here, you're using the projects APIs for networking.
2. Monkey patching. You use regular Python code inside the fibers. So you can write stuff like socket.socket ... and its patched to call runloom networking functions. You can see this points back to (1) but it has an overhead on top. You get to use libraries you're familiar with.
3. AIO bridge. This is to get asyncio code running on the scheduler. When you use the asyncio bridge it only uses a single thread. The main purpose of this is kind of like: "try out the project with your existing code." It also served the duel purpose of helping to find bugs in the runtime. Since I could reuse literally millions of test cases for the bridge.
tl; dr, (1) for a new project trying runloom -- learn the APIs. Or (2) if you mostly don't want to bother learning anything new / optimising anything. It might be a little slower but it will work. (3) you can mostly ignore. Unless you want to try asyncio code on it for the hell of it.
>book too large
>didn't read
>0/10, heh
Most of that code is from:
(1) simulating all of asyncio (not a main feature)
(2) monkey patching (not a main feature)
(3) synthetic program suite (dynamically built sample projects)
(4) entirety of the asyncio test suite in the test dir
(5) and other tests
The actual code surface for the run time is very small. The parent comment just ran a blind measure over the whole repo.
This wasn't all written in one shot. I built the project over several months and spent the whole time testing it. Most of the code in the repo is QA / tests.
I had written an article that speaks about the project that I'd hoped would get upvoted (instead of this github link.) It speaks a lot about where the project aims, how it works, and the testing process, (read about my testing process at the end):
https://robertsdotpm.github.io/software_engineering/goroutin...
Literally, how. How does one determine what abusive use looks like for the API without context into the client? All requests look like the same stuff. If there was a better way then they would have done it. Or is the author hoping that if Anthropic writes "hey china, please don't steal our models, kthanks" they won't? Like get real. This stuff means nothing in China. China can't even manage to regulate their building industry enough to use real concrete where it's warranted.
There is another bottleneck though and it's important: the personal computing needed to really do this well is ... expensive. What I mean is to even utilise this in a development process you need access to your own high-end hardware where the agents can run experiments fast. That requires (1) a lot of cores (2) and a lot of RAM. So there's a bottleneck in personal computing, too. Unfortunately, I really do think we're all screwed here. Increasingly: the most optimistic projections for what AI will be able to do are starting to become reality every few months. So the odds aren't looking good here.