5 ms·
I think this is true. I have used the Python C-API heavily having started SciPy and NumPy and Numba. I have a pre-alpha plan for addressing the C-API by intro
by travisoliphant 6y ago
I think this is true. I have used the Python C-API heavily having started SciPy and NumPy and Numba. I have a pre-alpha plan for addressing the C-API by introducing EPython (a typed subset of Python for extending it). It is not usable and in idea stage only, but I welcome collaborators and funders: https://github.com/epython-dev/epython https://github.com/epython-dev/epython. Here is a talk that describes a bit more the vision: https://morioh.com/p/6db365736476 https://morioh.com/p/6db365736476
- seg_lol 6y agoInteresting, I assume you are familiar with Terra, Titan and Pallene research languages? I love the idea of typed base language to implement a higher level more flexible language while still being able to drop down for correctness and speed. Gradually dynamically typed, ;) Another thing to look at is https://chocopy.org/ https://chocopy.org/ a typed subset of Python for teaching compilers courses. Might be worthwhile pinging Chocopy students and enticing them towards epython. What is the semantic union and intersection between EPython and Chocopy? [1] http://terralang.org/ http://terralang.org/ [2] https://github.com/titan-lang/titan https://github.com/titan-lang/titan [3] https://github.com/pallene-lang/pallene https://github.com/pallene-lang/pallene
- Rotareti 6y agoThis looks interesting! I think the approach where a typed subset of Python is used to compile a fast extension module is the way forward for Python. This would leave us with a slow but dynamic high-level-variant (CPython) and typed lower-level-variant (EPython, mypyc & co) to compile performant extension modules, which you can easily import into your CPython code. The most prominent of such projects I know of is mypyc [0], which is already used to improve performance for mypy itself and the black [1] code formatter. I think it would be interesting to see how EPython compares to mypyc. [0] https://github.com/python/mypy/tree/master/mypyc https://github.com/python/mypy/tree/master/mypyc [1] https://github.com/psf/black/pull/1009 https://github.com/psf/black/pull/1009