News for hackers. Stuff that matters.
Re:Four Eras of JavaScript Frameworks by matsemann on Wednesday April 27, 2022 @08:06AM (#31178868)
Installs in a local folder to the project (node_modules) instead of pip which installs packages to the global python installation unless ran in a virtual env. So getting anything up and running is trivial, compared to the amount of installations and steps needed with pip, unless you wanna bork your global python installation.

With npm it's also really easy (almost too easy) to take your current folder and push it to npm, making the ecosystem bloom with packages.

Re:Four Eras of JavaScript Frameworks by goodoldneon on Wednesday April 27, 2022 @08:17AM (#31178966)
The virtual env thing is extra friction but isn’t terrible:

  $ python -m venv .venv
  $ source .venv/bin/activate
  $ pip install -r requirements.txt
Most IDEs will automatically pick up the .venv folder
Re:Four Eras of JavaScript Frameworks by neurostimulant on Wednesday April 27, 2022 @08:46AM (#31179177)
Virtualenv used to be a third party package, which was a very high friction because you'll need to install it system-wide first (e.g. from distro's package manager) before you can use it to create virtual environments.
Re:Four Eras of JavaScript Frameworks by mmcnl on Wednesday April 27, 2022 @09:20AM (#31179499)
Not terrible, but still not as good and easy as npm. For example, you can't make a distinction between runtime and development dependencies, and it doesn't solve circular dependencies. Luckily there is Poetry which exactly does this.
Re:Four Eras of JavaScript Frameworks by bin_bash on Wednesday April 27, 2022 @08:26AM (#31179031)
I don't know what you're talking about—every time I have to do this I have no idea what I'm doing and I'm a senior engineer at FAANG.

I admit that I'm not a Python engineer, but I have been in the past—twice!

Re:Four Eras of JavaScript Frameworks by _dain_ on Wednesday April 27, 2022 @08:57AM (#31179282)
It's just a little switcheroo so that your shell environmental variables point to a project-local Python install rather than a global one.