Seeing such clever use of mmap makes me dread to imagine how much Python spaghetti probably tanks OpenAI's and other "big ML" shops' infra when they should've trusted in zero copy solutions.
Perhaps SWE is dead after all, but LLMs didn't kill it...
On the other hand, many business and professionals wouldn't exist :)
It's not the easiest syntax, not the best compiler support, performance and threading is a joke. The entire language is based on hype back from the time when the only two mainstream languages were C++ and Java.
If there was a superior alternative that covers the breadth of the Python ecosystem I’m pretty sure no one would have any scruples in using it. A programming language and its syntax is the least interesting or complex part when it comes to solving problems. Just rattling off some amazing libraries I've used over the last few years:
https://scikit-image.org - Image processing
https://imgaug.readthedocs.io - Image augmentation
https://scikit-learn.org/stable - ML
https://pymoo.org - Multi objective optimization
https://simpy.readthedocs.io/ - Discrete event simulation
https://lifelines.readthedocs.io - Survival analysis
https://bambinos.github.io/bambi - Bayesian modeling
https://unit8co.github.io/darts/ - Time series forecasting
https://abydos.readthedocs.io/en/latest/abydos.distance.html - Basically any string distance metric you can think of
The list just goes on and on.. oh yeah, some Deep Learning libraries too, which some people find useful.
Sure, but that is the gun, especially (as reflected in your examples) for machine learning. The best frameworks (PyTorch, TensorFlow, JAX) are all Python, with support for other languages being an afterthought as best.
The use of scripting languages (Python, Lua - original Torch) for ML seems to have started partly because he original users were non-developers, more from a math/stats background, and partly because an interactive REPL loop is good for a field like this that is very experimental/empirical.
Does it make sense that we're now building AGI using a scripting language? Not really, but that's where we are!