Oooh it's a bytecode interpreter! I was wondering how they'd fit a parser/tokenizer in 500 lines unless the first was `import tokenizer, parser`. And it looks like 1500ish lines according to tokei
I think because python is a stack-based interpreter this is a really great way to get some exposure to how it works if you're not too familiar with C. A nice project!
And, in some ways, PyPy. I still think it is the sanest way to implement Python.
It makes me sad that I have to write C to make any meaningful changes to Python. Same goes for ruby. Rubinius was such a nice project.
Hacking on schemes and lisps made me realize how much more fun it is when the language is implemented in the language itself. It also makes sure you have the right abstractions for solving a bunch of real problems.
Oooh it's a bytecode interpreter! I was wondering how they'd fit a parser/tokenizer in 500 lines unless the first was `import tokenizer, parser`. And it looks like 1500ish lines according to tokei
I think because python is a stack-based interpreter this is a really great way to get some exposure to how it works if you're not too familiar with C. A nice project!
See also https://github.com/nedbat/byterun and https://github.com/rocky/x-python
And, in some ways, PyPy. I still think it is the sanest way to implement Python.
It makes me sad that I have to write C to make any meaningful changes to Python. Same goes for ruby. Rubinius was such a nice project.
Hacking on schemes and lisps made me realize how much more fun it is when the language is implemented in the language itself. It also makes sure you have the right abstractions for solving a bunch of real problems.
> And, in some ways, PyPy
What do you mean by that? I'm not familiar with PyPy
PyPy is python implemented in python. It is fast.
https://pypy.org/
Not in a great shape right now: https://news.ycombinator.com/item?id=47293415
But you can help! https://pypy.org/howtohelp.html
https://opencollective.com/pypy
PyPy is python implemented in RPython, which is technically a python subset. It's so restricted it might as well be a different language though.