I hate to be that guy, but... one week old project, clear signs of vibing. I will be shocked if the remaining work listed (cpython test suite) proceeds in any reasonable timeline.
This is a pretty hard problem to just solve in a week.
EDIT: and man, these kind of comments LLM created comments are really starting to grind my gears as my job slowly turns into reviewing LLM PRs:
> Known gaps at the language level are burned down through the ratcheted floors above — the committed floor files, not this README, are the authoritative compatibility baseline.
Can those AI slop projects have a reserved tag on HackerNews? So many in the past few weeks I wouldn't have clicked and wasted my time on if I knew it was just some vibe-coded garbage.
I am a fan of AI assistance, but “ratchet” is pretty much a Claude giveaway. The kids, now in their twenties because the reference is dated, might make a joke here.
Awesome. Not for this repo specifically; more about the trend. More people are realizing that we have such powerful tools at our disposal and will want to do something awesome, worth while with them. Of course, many will fall off after a week, then more after a month, but some will survive. Knowledge will be spread and some will be winners through adoption. Grit can lead to knowledge, and can lead to awesome stuff.
If AI can find new proofs for well posed math problems, i see no reason why it shouldn't be able to implement a more performant fully featured version of an existing interpreter (eg with JIT and AOT) that emulates python api well and passes all python tests and tests of other projects. It is true that a lot of human effort and thought has been put into squeezing performance out of the existing implementation. It is true that many people have found that getting that last 1% of python test suite to pass turned out to be insurmountably hard. Same is true for math, and yet AI sometimes finds simple solutions that we somehow missed. Maybe there's a simple optimization that was used in an obscure interpreter of a domain specific language that we never heard of. Worth a shot in my mind. If that turns out to be successful, we should ideally find the code that served "as an inspiration" if any.
It might make more practical sense to start from CPython and try to optimize that further though. It even has a "not fully fleshed out" JIT already.
Dynamic typing means you don't know the sizes/offsets of things beforehand. The "compiled to metal" thing still resembles a runtime more than your typical compiled code. Like naively, object would be a struct with a hashmap of property names->values since technically you can alter the keys at runtime, and many values will be pointers to other objects. Idiomatic C or Rust code will have flatter structs.
Is it faster than the original interpreter? Maybe if you optimize out the primitives and certain well-known object types, unless you do some more advanced static analysis.
Lol, all the people squawking about how this means nothing and this is a worthless project amuses me. A lot of people just don't see it yet. This is coming for literally everything and it is so exciting. The next decade is going to be awesome.
Funny to see it took the same IR approach as I did with https://github.com/rcarmo/go-joker - although I did it somewhat based on the .NET IR and this seems a bit more AI-ish.
26 comments
[ 4.0 ms ] story [ 49.2 ms ] threadThis is a pretty hard problem to just solve in a week.
EDIT: and man, these kind of comments LLM created comments are really starting to grind my gears as my job slowly turns into reviewing LLM PRs:
> Known gaps at the language level are burned down through the ratcheted floors above — the committed floor files, not this README, are the authoritative compatibility baseline.
1. It's not Python by any means, it's a subset with its own runtime, its own quirks and nuances;
2. It will be impossible to maintain parity with CPython without AI assistance;
3. It will die the same way as dozens of similar (even non-AI projects) died before, and reasons will be the same: (1) and (2).
A subset of python is python. Half a tomato is still tomato
>2. It will be impossible to maintain parity with CPython without AI assistance
What does that even mean? If you would have said that it's impossible to update to python 3.15 of further, I'd get it.
Is a pretty oof sentence for a project with one contributor and no users. Just reeks of llm barf with no oversight.
It might make more practical sense to start from CPython and try to optimize that further though. It even has a "not fully fleshed out" JIT already.
https://github.com/Nonannet/copapy uses copy and patch, discussed here https://news.ycombinator.com/item?id=46972392
Single-pass SSA bytecode compiler and threaded-code stack VM for a sandboxed Python subset https://github.com/dylan-sutton-chavez/edge-python
Is it faster than the original interpreter? Maybe if you optimize out the primitives and certain well-known object types, unless you do some more advanced static analysis.