Uv is so good. I'm a curmudgeon about adopting new tooling, and tried uv with a lot of skepticism, but it was just better in every way. And even if it wasn't so polished and reliable, the raw speed makes it hard to go back to any other tool. Uv combined with type hints reaching critical mass in the Python ecosystem, and how solid PyLance is in VSCode, feels so good it has made me consider investing in Python as my pr…
I wish we had a language that had the syntax of Python (notably including operator overloading, which is absolutely critical for neural networks, ML, data science and numerical computations), the performance, compile times and concurrency support of Go, the type system flexibility of Typescript, and the native platform integration of C/C++.
Uv is the best thing to happen to the Python ecosystem in a decade
771–780 of 1001 posts
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#772Earlier quoted context omitted.
I wish we had a language that had the syntax of Python (notably including operator overloading, which is absolutely critical for neural networks, ML, data science and numerical computations), the performance, compile times and concurrency support of Go, the type system flexibility of Typescript, and the native platform integration of C/C++.
Than you would probably like the Nim[1] programming language. It has the syntax of python, but transpiles to C/C++. A good type system. The main problem would probably the compiles times. Because you basically compile just C/C++ code. And of course the eco-system is much much smaller than Python. [1] https://nim-lang.org/
It also compiles to JS.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#773Uv is so good. I'm a curmudgeon about adopting new tooling, and tried uv with a lot of skepticism, but it was just better in every way. And even if it wasn't so polished and reliable, the raw speed makes it hard to go back to any other tool. Uv combined with type hints reaching critical mass in the Python ecosystem, and how solid PyLance is in VSCode, feels so good it has made me consider investing in Python as my pr…
I wish we had a language that had the syntax of Python (notably including operator overloading, which is absolutely critical for neural networks, ML, data science and numerical computations), the performance, compile times and concurrency support of Go, the type system flexibility of Typescript, and the native platform integration of C/C++.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#774Earlier quoted context omitted.
On performance: 3.13 removed the GIL and added experimental first-party JIT (like PyPy). In two years I bet we’ll be seeing v8 level performance out of CPython.
The “Faster CPython” team were let go from Microsoft because they could only produce a 1.5x speedup in four years instead of the planned 5x. It’s wildly optimistic to now expect a 10x speedup in two years, with fewer resources.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#775Earlier quoted context omitted.
I would also add UV_NO_SYNC as smth I had to learn. It comes in combination with uv pip
What's your use case for UV_NO_SYNC? I assume the option exists for a reason, but aside from maybe a modest performance improvement when working with a massive complex package environment, I'm not sure what problem it solves.
so i do uv pip install ipdb.
but then, after uv add somepackage
uv sync happens and cleans up all extras. to keep extras, you need to run uv sync --inexact. But there is no env var for `--inexact`, so I end up doing the sync manually.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#776Earlier 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. Case in point: uv itself is not written in Python. It's a Rust tool. It always amazes me when people work on an ecosystem for a language but then don't buy enough into that to actually use it to do the work. Avoidance of dogfooding is a big red fl…
the python interpreter is not written in python :-)
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#777Arguably this article is missing one of the biggest benefits: Being able to make Python scripts truly self-contained by including dependencies via a PEP 723 inline header and then running them via `uv run ` [1].
It's made Python my language of choice for one-off scripts easily shareable as gists, scp-able across systems etc.
[1] https://pybit.es/articles/create-project-less-python-utiliti...
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#778Earlier quoted context omitted.
What you describe I think is what most other people hate the most about python. The fact that everything pollutes the global environment, which then becomes a mess of things depending on various versions, which also ends up breaking tools included in the OS and suddenly your whole system is effed.
My sentiment coming to Python after getting used to the DX of Node https://uploads.dailydot.com/2024/04/damn-bitch-you-live-lik...
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#779Earlier quoted context omitted.
This was always my issue with pip and venv: I don’t want a thing that hijacks my terminal and PATH, flips my world upside down and makes writing automated headless scripts and systemd services a huge pain. When I drop into a Node.js project, usually some things have changed, but I always know that if I need to, I can find all of my dependencies in my node_modules folder, and I can package up that folder and move it w…
Having a directory like node_modules containing the dependencies is such an obviously good choice, it's sad how Python steering council actively resists this with what I find odd arguments. I think a lot of the decades old farce of Python package management would have been solved by this. https://peps.python.org/pep-0582/ https://discuss.python.org/t/pep-582-python-local-packages-d...
Having dependency cache and build tool that knows where to look for it is much superior solution.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#780But what was wrong with pip, venv and pyproject.toml in the first place? I just keep a system installation of python for my personal things and an environment for every project I'm working on. I'd get suspicious if a developer is picky about python versions or library versions like what crazy programs are you writing?