Earlier quoted context omitted.
> But then I remember that Python is dog slow compared to other languages with comparable ergonomics and first-class support for static typing, and...idk it's a tough sell. Post like these aptly describe why companies are downsizing in lieu of AI assistants, and they are not wrong for doing so. Yes, Python is "slow". The thing is, compute is cheap these days and development time is expensive. $1000 per month is consi…
Python is bad for large projects, and it's not just because of speed. I see it shine for scripts and AI but that's it.
Uv is the best thing to happen to the Python ecosystem in a decade
991–1000 of 1001 posts
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#992Earlier quoted context omitted.
> But then I remember that Python is dog slow compared to other languages with comparable ergonomics and first-class support for static typing, and...idk it's a tough sell. Post like these aptly describe why companies are downsizing in lieu of AI assistants, and they are not wrong for doing so. Yes, Python is "slow". The thing is, compute is cheap these days and development time is expensive. $1000 per month is consi…
>$1000 per month is considered expensive as hell for an EC2 instance, but no developer would work for $12000 a year. If using Python instead of what we use, our cloud costs would be more than double. And I can't go to CEO and CFO and explain to them that I want to double the cloud costs (which are already seen as high). Then, our development speed won't really improve because we have large projects. That being said,…
You won't double your costs and I can safely say that without knowing anything about your service. Because if you use PyPy, the speed up is generally 2x. So right there, your argument is defeated.
But even without PyPy, I am willing to bet that your service has a dominant component of either network calls, or data processing. In the former case, you can use Python with things like uvloop and multiprocessing to basically structure your service so that you are filling the processing time with waiting for network calls, spending minimal time in actual compute, which means you don't get any slower. In the latter case, its pretty straightforward to write a data cruncher in a more optimized language like C and run it from Python - even if you don't wanna deal with native interfaces, an LLM can write you a small udp server that can listen on a unix pipe for messages to process, and from python you just launch it with subprocess and send data to it.
So unless you run a highly specialized service with a very niche use case, you would be absolutely fine with Python.
And even then, Im willing to bet based on average use case that your cloud costs aren't even close to optimal. In the case of AWS, so many companies use managed services like Dynamo DB when they could easily run a reserved small EC2 instance and run their own version of Mongo or something similar. At my current company, the only AWS services we use is S3 and EC2, where things like database software or caching software is all manually installed and ran on EC2. If you know what you are doing, its not really that hard to manage. We even have or own version of AWS Lambda.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#993Re: Uv is the best thing to happen to the Python ecosystem in a decade
#994Re: Uv is the best thing to happen to the Python ecosystem in a decade
#995uv add package
uv remove package
But also to upgrade a package and upgrade all packages in the pyproject.toml . The uv sync --upgrade can already do this in uv.lock , but not in pyproject.toml
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#996Earlier quoted context omitted.
Installing an out-of-distro deb/rpm/msi/dmg/etc package is just as unsafe as curl|sh. Or even unsafer, as packages tend to require root/admin.
A package is at least a signable, checksummable artefact. The curl | sh thing could have been anything and after running it you have no record of what it was you did. There have also been PoCs on serving malicious content only when piped to sh rather than saved to file. If you want to execute shell code from the internet, at the very least store it in a file first and store that file somewhere persistent before execu…
There's no guarantee packages are actually making use of package features in any reasonable way, other than convention.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#997Earlier quoted context omitted.
conda (and its derivatives that are also “conda” now), and conda-forge specifically, are the best ways to install things that will work across operating systems, architectures, and languages - without having to resort to compiling everything. Want to make sure a software stack works well on a Cray with MPI+cuda+MKL, macOS, and ARM linux, with both C++ and Python libraries? It’s possible with conda-forge.
Conda is hell for multi operationg systems projects. Its lock file is OS dependent. You can't commit it and hope it will work anywere. It is probably the easiest way to install a lot of binary dependencies, good for who doesn't have experience with sofware development and don't care with reproductbility.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#998Earlier quoted context omitted.
I think better developer tools tend to compound over time, they raise expectations and push the whole ecosystem forward. IMO, uv is quickly becoming one of the best reasons to start a new project in Python. It’s fast, and brings a level of polish and performance that makes Python feel modern again.
I think uv is one of the best examples of why not to start a new project in Python. I mean, depending on the project really, Python has its place. But if your project is anything like uv, uv proves you can't actually write an app like uv in Python. So for as great as uv is, its proximity to Python is a constant reminder of its shortcomings.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#999Is there a resource to understand the nuanced technical differences between pip and uv? As an outsider to the python ecosystem I've wanted to learn the _how_ behind uv as well, but that hasn't been immediately clear
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#1000Earlier quoted context omitted.
I would very much like to know the reason why they named it bin/ here and Scripts/ there. To get some closure.
Because bin/ is a conventional name that Linux inherited from UNIX going back literally decades; but there is nothing analogous in the Windows ecosystem, while Windows has a culture of trying to give folders names that are convenient for (and understandable to) end users with none of that UNIX cultural exposure. "bin" means absolutely nothing to the average person who grew up using Windows and is now learning to prog…
I grew up using Windows and decision to name a folder Scripts (inconsistently), in a multiplatform open source software development project is incomprehensible to me.