News for hackers. Stuff that matters.
Re:Trying Out Rye by CSSer on Thursday April 11, 2024 @11:06PM (#40009024)
This entire article has dog in burning house vibes, but I can’t tell if it was intentional or not. I’ll give them credit for being a good sport about it at any rate.

Homebrew is an interesting beast. I was debugging something architecture-related recently during one of my first forays into rust land and quickly learned that my brew-installed rust wasn’t going to cut it because I needed rustup. Meanwhile, I don’t think I’ve used brew-installed node since at least v12 because I use nvm to support and debug multiple projects with different node versions. Is this kind of thing just becoming par for the course?

For the pain with the Django project, I guess I’m also willing to cut Rye slack because the underlying goal seems admiral and sadly the problem the author encountered seems common in Python land in general.

Re:Trying Out Rye by vundercind on Thursday April 11, 2024 @11:16PM (#40009089)
Brew is best for your tools you use directly. Your editor(s), torrent client, curl, your shell. Stuff like that.

Other tools are better for build or project dependencies.

Most Linux package managers are also not ideal for that purpose, incidentally.

Re:Trying Out Rye by nindalf on Thursday April 11, 2024 @11:29PM (#40009135)
Yeah I think we’ve all independently concluded that you use brew for everything except those things complicated enough that you need to switch between versions.

I always want the latest version of git or ripgrep, no questions asked. Brew does that well. But for Rust, Node and others where you’re switching between versions, I prefer rustup, nvm etc.

Go is an exception though, I find I never want to go to a previous version of Go so brew is fine.

Re:Trying Out Rye by kijin on Friday April 12, 2024 @12:16AM (#40009328)
It seems most package managers were built with the assumption that you will stick to a single, officially sanctioned version of the language runtime and core libraries.

Which is a reasonable assumption to make, for example, if the language in question is also used by system utilities in a traditional Linux distribution. You really don't want yum invoking the wrong version of python.

For newer languages that change fast, though, we need something different. I don't think "every project brings in its own language runtime and the kitchen sink" is a sustainable situation, either. The dependency graph is crazy enough already.

Re:Trying Out Rye by woodruffw on Friday April 12, 2024 @01:40AM (#40009696)
> Which is a reasonable assumption to make, for example, if the language in question is also used by system utilities in a traditional Linux distribution. You really don't want yum invoking the wrong version of python.

Yep, this is the core reason: there needs to be a "system" distribution of Python, Ruby, etc. for packages written in those languages, and that distribution fundamentally needs to prioritize the interests of the package manager over "external" uses. This is particularly painful in the Python world, since using a "system" Python distribution for local development can break the system itself in all kinds of fun and exciting ways (usually beginning with a well-intentioned `sudo pip install ...`).

Homebrew suffers from this like other system package managers do, with the added pain that many macOS users expect Homebrew to do everything (whereas Linux users typically understand that they need `pyenv` or similar). PEP 668[1] helps a bit here by clarifying the responsibilities/expected behavior of system Python distributions, but at the cost of heartburn for some user scenarios (i.e. ones that depend on `pip install -U` and similar).

[1]: https://peps.python.org/pep-0668/

Re:Trying Out Rye by cyberax on Friday April 12, 2024 @03:40AM (#40010278)
> It seems most package managers were built with the assumption that you will stick to a single, officially sanctioned version of the language runtime and core libraries.

The problem here is that it's impossible to build a coherent distro if you allow arbitrary mixing of versions, without parallel installability. I don't think it can really be solved in the general case.

Re:Trying Out Rye by dagw on Friday April 12, 2024 @06:58AM (#40011223)
The first step is to separate system tools from userland tools. For example if system tools depend on python then they should be using their own isolate python and not the one that gets run when a user types 'python' on the command line. This way you can upgrade /usr/bin/python to 3.12 while /sbin/python (or whatever) can be locked at 3.8 to make sure important OS tools don't break. /sbin/python is not in the path of any user and only gets upgraded as part os a major OS upgrade.
Re:Trying Out Rye by matrss on Friday April 12, 2024 @07:55AM (#40011525)
Or you go the functional package management route and strip out these global paths entirely. nix and guix do this. Every package that needs python is built against a specific version of python (where a "version" is defined by its source code, compiler flags, toolchain versions, bootstrap toolchain versions, etc.; basically anything that can make the build result behave differently) and will only ever use that. Different packages can use different python versions. A system configuration can also choose to make a specific version available in the PATH, but it doesn't have to. A user environment can do the same, as can a project specific environment. All in one package management system.
[dead]
Re:Trying Out Rye by vundercind on Friday April 12, 2024 @02:27PM (#40016110)
Sure, Nix is one of the few package management systems that makes a credible attempt at being good for all three major package management roles (the system; user applications; project-specific packages)
Re:Trying Out Rye by dkarl on Thursday April 11, 2024 @11:29PM (#40009130)
> This entire article has dog in burning house vibes, but I can’t tell if it was intentional or not. I’ll give them credit for being a good sport about it at any rate.

Yeah, I appreciate the honesty. I think it's just a straightforward "this is good enough for me, but I'm not going to hide the glaring red flags that will stop anybody from using this at work" approach, which I think is cool. Some people feel compelled to pretend that the choices they make for a weekend hobby project are exactly the same choices they would make with other people's livelihood on the line, and it really doesn't need to be the same standard.

Re:Trying Out Rye by JoyousAbandon on Friday April 12, 2024 @01:49AM (#40009728)
"dog in burning house vibes"

Whatever that's supposed to mean.

Re:Trying Out Rye by danielskogly on Friday April 12, 2024 @01:52AM (#40009750)
I'm assuming it's a reference to this meme: https://knowyourmeme.com/memes/this-is-fine
Re:Trying Out Rye by CSSer on Friday April 12, 2024 @01:56AM (#40009768)
Yes, this was my haphazard, lazy way of referencing it. Thank you for sharing the link!
Re:Trying Out Rye by labster on Friday April 12, 2024 @03:24AM (#40010191)
Darmok and Jalad at Tanagra
Re:Trying Out Rye by thfuran on Friday April 12, 2024 @08:50AM (#40011997)
More like Spot when the walls fell.
Re:Trying Out Rye by 082349872349872 on Friday April 12, 2024 @08:59AM (#40012092)
A man of culture. Cap gets the reference.

(sometimes I try to make my meme* references four words long, as a nod to https://en.wikipedia.org/wiki/Chengyu )

* "ideas reproducing via people"?

Re:Trying Out Rye by isoprophlex on Friday April 12, 2024 @01:52AM (#40009752)
Re:Trying Out Rye by adamgordonbell on Friday April 12, 2024 @08:16AM (#40011706)
Wouldn't the whole python world be better if the Python Steering Council made it known it intended to standardize on Rye/Hatch/Poetry or whatever.

Choosing anything, stating that out-loud and slowly forcing convergence would benefit all.

Lot's of options are great to explore the solution space, but it feels like we are way past that.

Re:Trying Out Rye by IshKebab on Friday April 12, 2024 @11:45AM (#40014211)
It absolutely would. But there are many many things that would make the Python world better that the Python developers seem generally oblivious to so I wouldn't hold your breath.

Probably a little early to officially bless Rye though anyway.

Re:Trying Out Rye by ploxiln on Friday April 12, 2024 @11:48AM (#40014242)
pip and venv are officially sanctioned. (venv and "ensure-pip" are included in python-3.x) That's all you really need (after you have the desired version of python).
Re:Trying Out Rye by lambdaxyzw on Friday April 12, 2024 @05:11PM (#40017701)
I have never used anything other than pip and venv. Maybe I'm missing something, but I never felt like I'm missing anything. And Python package management is so easy and simple if you stick to that (well, except version conflicts, but that's always a pain somehow).
Re:Trying Out Rye by adamgordonbell on Saturday April 13, 2024 @10:37AM (#40023428)
If you use pip and requirements.txt, the dependency resolution is not great, it just installs things in order.

There isn't a lock file. How do you deal with dev dependencies? How do you work on a lib and its calling code without pushing it to pypa? Working with c deps?

All this stuff feels harder to do then it should be.

Re:Trying Out Rye by ploxiln on Monday April 15, 2024 @06:25PM (#40046403)
1) dev-requirements.txt

2) pip install . (optionally with -e)