by kaplpot · 2y ago · 0 comments
This is how Python got big: Discuss cute issues endlessly, pretend to be a funny, benevolent community. But real issues like performance, correctness or security are never addressed, and people who dare to mention them are punished severely.
The mailing lists are non-operational for political reasons and because most competent people have left. Patches have never been contributed via the mailing lists.
Python is the language for ML not because of the "community", which is an exploitative system where talkers who go on stage at a PyCon and never do anything get more money and worse, control who can earn money in the Python ecosystem.
It is the language for ML because Python had a decent C-API and a lot of scientific software has been written early on.
Remember that Torch originally had a Lua frontend, and was only later turned into PyTorch, citing the same availability of scientific software.
But considering that Lua has a far better C API than Python, why did those initial scientific/mathematical software use Python?
And Lua has a great API for calling into C, but for exposing lua APIs from C you’re basically writing bytecode for a stack VM in C. This is not very fun to expose large rich APIs.
An other significant divergence is because Lua primarily targets embedding rather than freestanding, backwards compatibility is pretty far down the list of considerations, you’re not going to do a major lua upgrade once you’ve released your game.
Python had one major compatibility break 5~15 years ago (depending when you switched) and teeth are still gnashing over it, Lua does that much every major version.
Python C API is one of the better ones, it's extremely easy to connect C/C++ code to Python.
Python is also extremely good at reshaping data, parsing files, scraping data and so on - the preprocessing part required by many scientific computations.