Live data from Hacker News

Escaping from Anaconda's Stranglehold on macOS

paulromer.net

131–140 of 286 posts

Re: Escaping from Anaconda's Stranglehold on macOS

#131

Earlier quoted context omitted.

Never took it, huh.

two second search -- "Statistics is considered a mathematical science that is distinct from mathematics, though it does use mathematical methods:" "statistics arguably is not a branch of mathematics. It is a mathematical science, built upon the mathematical discipline of probability. Some ways in which mathematics and Statistics differ include: Statistics often does not produce definitive conclusions whereas mathemat…

In other two second searches: Lab Leak is Real, Ivermectin cures COVID, 9-11 was an inside job.

LLM's give you what you want to hear.

Now get some live quotes, both for and against, from actual working mathematicians.

There are a lot of definitive conclusions about lines | planes | surfaces that "best fit", by many metrics, sampled data, etc.

Re: Escaping from Anaconda's Stranglehold on macOS

#132

Earlier quoted context omitted.

After that I wonder why people think Python is a good choice to teach as a first experience in programming. Virtual environments is actually my biggest gripe with Python. I think it is interesting to consider why Python is so popular despite such fiascos. The answers can be very informative but can also be giant red flags.

It’s not just the packaging situation that makes Python a bad first language. Whenever I write in Python, I find it completely impossible to stop myself from constantly making basic, beginner-level programming mistakes. Every time I miss having a compiler and strict typing that will yell at me when I’ve done something stupid.

Modern linters and type-checkers for Python come pretty close to something usable for these situations. But it's certainly something they tacked on to the language afterwards.

I like the recent addition of (proper) pattern matching to Python.

Re: Escaping from Anaconda's Stranglehold on macOS

#133

Earlier quoted context omitted.

> I know virtualenvs suck to explain to people, but in my opinion it needs to be done This is because Python doesn't have versioned imports, which means you can't have multiple versions of the same package in the same environment, but I like to dream about a world where this isn't the case. If instead of import foo we had import foo@x.y.z#optional-checksum, the Python world would be massively improved. It seems like…

Virtualenvs solve not having separate workspace-local package installations, not a lack of versioned imports. Versioned imports are not a good solution to separate installations of packages: code is harder to upgrade, cluttered, and encouraged to depend on specifics rather than contracts. There’s a reason every major language localizes their version pinning into a per-project dependencies file (which can be anywhere…

> And that’s before considering the troublesome behaviors that emerge when you permit importing multiple versions of the same library in the same program, if you want that too.

Rust has versioned imports. So you can import different versions of the same module (at least in your transitive dependencies).

Re: Escaping from Anaconda's Stranglehold on macOS

#134
post #102

> 10. What Changes When You Are Free > You will not be forced to work inside something known as a “virtual environment.” Oof, this terrible advice cancels out an otherwise reasonable post. Beginners who don't know what they're doing are the last people who should be `pip install -r requirements.txt`-ing into the system Python the way this article is recommending. That's not only going to make working on multiple proj…

What I do on every dev machine is build Python from source and install it to ~/.localpython and put it in my path. Then I can pip install away care-free, and quickly run scripts / repls without having to activate an environment.

Why does it need to be built from source for that?

Re: Escaping from Anaconda's Stranglehold on macOS

#135
post #18

I collaborate with people that use macOS while I use Linux. For reproducible environments, Nix has served us well. Despite the myth, it is not hard to use unless you need to package something complicated or messy. Then it may become hard. The advantage of Nix is total version reproducibility and declarativeness. It's quite reassuring to know things are exactly the same on all computers.

Is Nix still hard to uninstall on macOS? That's what scared me off but it's been years now...

Re: Escaping from Anaconda's Stranglehold on macOS

#136
post #18

I collaborate with people that use macOS while I use Linux. For reproducible environments, Nix has served us well. Despite the myth, it is not hard to use unless you need to package something complicated or messy. Then it may become hard. The advantage of Nix is total version reproducibility and declarativeness. It's quite reassuring to know things are exactly the same on all computers.

I've had nix disappear out from under me a couple times on Mac, enough for me to start drifting away from home manager. Sucks cuz I like the tooling!

But seriously, let's say you have a Python project (like a Django application with a couple requirements in your `requirements.txt`), what is the least disruptive way to get it working? Many things I've looked at involved doing one-time transformations of requirements files or otherwise easy-to-desync things...

Re: Escaping from Anaconda's Stranglehold on macOS

#137

> 10. What Changes When You Are Free > You will not be forced to work inside something known as a “virtual environment.” Oof, this terrible advice cancels out an otherwise reasonable post. Beginners who don't know what they're doing are the last people who should be `pip install -r requirements.txt`-ing into the system Python the way this article is recommending. That's not only going to make working on multiple proj…

I teach using python. You should try explaining virtual environments to students, most of them with no programming experience, or any real notion of the state of a computer system. I do, because we recommend students use them. Every class consists of endless debugging of student systems. After that you might understand the OP's viewpoint.

Not sure how helpful this advice is for students I'm in my late 30's have programming experience but had never touched Python until about 6 months ago.

What made Virtual environments work for me was switching to a different Editor. I use Visual Studio Code currently it works well with Virtual Environments.

When you first create a new python file in a given "project folder" it prompts you to create a new Venv and when you switch project folders it remembers and restores the Venv for each project.

One of my work colleagues pointed me to VSCode - it streamlined a lot of python things for me.

If your students are disciplined about creating a new folder for each project managing virtual environments vscode could help them.

Only issue I have is my work office has a corporate proxy setup and pip needs certificate to connect (and if I work remotely I have to turn this setting off) I wrote a shell script to toggle between the two proxy settings. Not sure if university will have the same issue proxy issues but if so this would certainly be a pain point for many students.

Re: Escaping from Anaconda's Stranglehold on macOS

#138

Earlier quoted context omitted.

But then you're explaining virtualization and networking to your students, how to manage interactions in and out ("I wrote a program in Txtedit, how can I run it?"), when it's started and when it's not etc. I could see giving them a remote access to a prebuilt env (which can be containerized) to be simpler to explain.

In finding it very difficult to see what exactly is the problem with teaching a minimum of computer and operating system fundamentals to people that have to learn programming.

Not every person wants to become a software engineer, anymore than every person wants to learn to become a plumber or car mechanic. The vast majority, and by vast majority I mean more than 95% of students who are taught to code are training to be scientists, mathematicians, engineers, economists, accountants, or some such. They need to run simulations to understand their field. Any pain in the way of that is a failure of those who create software for a living.

Re: Escaping from Anaconda's Stranglehold on macOS

#139
If you give a man a fish, he eats for a day. If you teach a man to fish, he eats forever.

These instructions are a fish, and don't really any is the core principles and knowledge that a developer should really know.

Yes, it fixes the problem but doesn't really address the "Why?" part at all.

Re: Escaping from Anaconda's Stranglehold on macOS

#140
post #18

I collaborate with people that use macOS while I use Linux. For reproducible environments, Nix has served us well. Despite the myth, it is not hard to use unless you need to package something complicated or messy. Then it may become hard. The advantage of Nix is total version reproducibility and declarativeness. It's quite reassuring to know things are exactly the same on all computers.

Is Nix still hard to uninstall on macOS? That's what scared me off but it's been years now...

this installer comes with an uninstaller https://install.determinate.systems/
Post reply on HN