News for hackers. Stuff that matters.
Re:Rye: Flask author's new project for Python bootstrapping by sverhagen on Monday April 24, 2023 @02:47AM (#35684393)
Isn't it also declaring complete bankruptcy as far as Python's own ecosystem is concerned, that you'd have to go to Rust to fix this?
Re:Rye: Flask author's new project for Python bootstrapping by tsunagatta on Monday April 24, 2023 @02:56AM (#35684439)
Maybe if a tool like this is successful enough it could “bootstrap” the Python ecosystem into being as reliable :P
Re:Rye: Flask author's new project for Python bootstrapping by rtpg on Monday April 24, 2023 @03:12AM (#35684522)
not really? It's not like CPython is written in Python either. Almost every language that has some notion of virtual environments writes a good chunk as shell scripts for maximum environment compatibility.

Sometimes you want to use the right tool for the job, and sometimes the scripting language that has a lot of environment-based configuration will not be a good fit for an "installer" that needs to handle a lot of environments cleanly.

Re:Rye: Flask author's new project for Python bootstrapping by sverhagen on Monday April 24, 2023 @05:24AM (#35685365)
I don't think that's right. Sure, the language runtime environment often uses a lower level language to speak with the underlying hardware or abstraction. But large parts of standard libraries may be written in the language itself. Build systems may have a little bit of shell scripting to get going, but larger such programs would often be written in the language itself. This certainly is the case with NPM, Yarn (JavaScript), Maven (Java), Gradle (multiple JVM languages), Rake (Ruby).
Re:Rye: Flask author's new project for Python bootstrapping by rtpg on Monday April 24, 2023 @09:56PM (#35695697)
I think Ruby's equivalent would be something like rbenv (which is just a big shell script!). Java similiarly ends up often being installed through package managers or other bespoke system installers that would at the very least need to bundle a runtime.

To your point, One could write something like rye in Python, and then use PyOxidizer to package it up. I imagine a part of this is "Rust is fun", which is totally a legitimate reason to work it. And of course Rust comes with a very good distribution story (Go might have been another good answer for some people).

Re:Rye: Flask author's new project for Python bootstrapping by snowe2010 on Tuesday April 25, 2023 @03:47PM (#35705677)
A good example for all of these is actually asdf. Which hilariously handles _every_ language just fine, _except for _ Python and Node. It is a terrible reflection on the state of tooling in these communities.
Re:Rye: Flask author's new project for Python bootstrapping by bin_bash on Tuesday April 25, 2023 @04:21PM (#35706191)
How does asdf not handle Python and node well?
Re:Rye: Flask author's new project for Python bootstrapping by snowe2010 on Thursday April 27, 2023 @07:16PM (#35735724)
For python it routinely has trouble with pip, default locations that pip use, virtual envs break, reshimming doesn't work half the time, I can't even remember all the other issues I've had.

For node it's more of the same, old versions of node were so broken that installing them through asdf doesn't work unless you build directly from source. Reshimming doesn't work half the time, global packages can't be found, idk what else. tons. It's just ridiculous to see when _every_ other language works fine in asdf.

Re:Rye: Flask author's new project for Python bootstrapping by bsaul on Monday April 24, 2023 @07:12AM (#35686092)
And to add to your point: if even rust is preferable to python to write those kind of script-like tools, what does it says about the future of python ? (Yes, i know, ML, etc)
Re:Rye: Flask author's new project for Python bootstrapping by HelloNurse on Monday April 24, 2023 @10:09AM (#35687882)
Not quite, as noted in other comments compiling the tool to a self-contained and unchangeable executable is a very effective way to avoid bootstrapping issues where to set up a Python environment (to do something useful) you need to setup a Python environment first (to run Python tools).