5 ms·
Does anyone miss when "pure python" was a selling point of your library? I understand the need for speed, but I wish it were more common to ship a compiled bi
by dec0dedab0de 2y ago
Does anyone miss when "pure python" was a selling point of your library? I understand the need for speed, but I wish it were more common to ship a compiled binary that does the thing fast, as well as the same algorithm in python to fall back on if it's not available.
- pphysch 2y agoI certainly don't miss needing to install additional system libraries in addition to my pip install.
- pjmlp 2y agoIn what way does having to compile a Rust library prevent this?
- pphysch 2y agoIME, and I may be off base, the new generation of Rust/Go binaries have a more "batteries-included" philosophy, i.e. developers don't assume that they can piggyback off existing user system libraries, which generally makes it a nicer install UX.
- pjmlp 2y agoIt will fail to compile as well if they depend on any system library or OS specific feature not present on your system.
- pjmlp 2y agoI rather find tragic that contrary to other dynamic languages, Python seems to fall under the curse of rewriting bindings into C and C++, or nowadays more fashionable Rust. And yes, Smalltalk, Self and various Lisp variants are just as dynamic.
- woodruffw 2y agoWhy is it tragic? It's more or less idiomatic in Python to put the hot or performance-sensitive paths of a package in native code; Rust has arguably made that into a much safer practice.
- pjmlp 2y agoBecause it forces mastering two languages, or depending on third party developers for anything that matters beyond basic OS scripting tasks. It became idiomatic as there was no other alternative.
- woodruffw 2y agoYou don’t have to master Rust to use this, the same way you don’t have to master C to use all of the critical extensions written in it. (Besides, no language has this regardless of native extensions: a huge part of Python’s success comes from the fact that there isn’t a perfect graph of competencies in the community, and instead that community members provide high quality abstractions over their respective competencies.)
- pjmlp 2y agoAssuming someone else fixes the issues that might come up. One of the pain points from Python is exactly native libraries and getting them compiled.
- woodruffw 2y agoSure, but that’s the general maintenance risk. I don’t think native code changes that dynamic, particularly in ecosystems where it’s the norm. And doubly so for cryptographic code, where native is the norm for performance and certification reasons. It’s my impression as a maintainer of many projects that native compilation hasn’t been a driving issue in Python packaging for a while now. Most users download wheels and sidestep the entire problem. Whether or not they should trust random binaries from the internet is of course a bigger question.
- sharperguy 2y agoThey should just distribute it in some kind of bytecode compiled language with JIT VM like java. Then at least it will be cross platform.
- pjmlp 2y agoYeah, I heard about this new one taken from browsers. It is supposed to fix everything that previous ones never achieved.
- smnrchrds 2y agoPure Python was a huge selling point back when using a compiled library involved downloading and running random .exe files from someone's personal page on a university website. It is much less of a selling point now that we have binary wheels and uv/Poetry/etc. that create cross-platform lock files. I feel nostalgic seeing (a mirror of) that download page again, but that era was such a pain. Mirror: http://qiniucdn.star-lai.cn/portal/2016/09/05/tu3p2vd4znn http://qiniucdn.star-lai.cn/portal/2016/09/05/tu3p2vd4znn
- dec0dedab0de 2y agoI always thought the selling point of Pure Python was that you might be running on some esoteric implementation of python, or hardware that the library maintainer didn't include binaries for. I mean, I am glad wheels exist, they make things a lot easier for a lot of people. I just believed in the dream of targeting the language for maximum compatibility and hoping a better implementation would eventually run it faster.
- kccqzy 2y agoIndeed. I was an early adopter of Google's App Engine using Python and at that time Pure Python is a must.
- deleted 2y ago[deleted]