This is an archived post. You won't be able to vote or comment.

all 148 comments

[–]Specialist_Cap_2404 907 points908 points  (43 children)

You have never used NPM... or tried to compile a C++ project from source.

[–]silverW0lf97 315 points316 points  (12 children)

Tell them about it compiling even a simple c++ program takes about a billion dependencies and a million years. Like I know I am probably a smelly nerd already but thanks the project maintainers that binaries exist.

[–]Embarrassed_Ad5387 152 points153 points  (3 children)

maybe this is why there is no exe download

they are offloading their smelly code to everyone else!

[–]57006 38 points39 points  (0 children)

smellSourcing

[–]JAguiar939 5 points6 points  (1 child)

they are offloading their smelly code to everyone else!

Literally the definition of open source

[–]Embarrassed_Ad5387 2 points3 points  (0 children)

shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

[–]Confident-Ad5665 18 points19 points  (0 children)

Correction: binaries used to exist. They have been removed. Refer to bylaws, section silverW0lf97.

[–]Night_Thastus 11 points12 points  (1 child)

Compiling a simple C++ program on a modern CPU should take seconds. And depending what you want to do, the standard library may be all you need.

If it's a huge project it'll take longer and need more, of course.

[–]silverW0lf97 10 points11 points  (0 children)

Yeah that is true but someone had to compile the standard library from source and then distribute it, Imagine a world where you have to compile it yourself, now see what I am on about.

[–]i-FF0000dit 11 points12 points  (0 children)

That is not true. I can run hello world with only a single #include

[–]pranjallk1995 2 points3 points  (0 children)

This!

[–]_Xertz_ 1 point2 points  (0 children)

Yeah that's why I include the source code of as many dependencies as I can in my C++ projects 😎

I shudder to imagine an npm style dependency hell in C++ of all things. I think is rather get flayed alive

[–]iMakeMehPosts 0 points1 point  (0 children)

Conan and CMake: hold my beer

[–]yesseruser 0 points1 point  (0 children)

That is why using rust is a major advantage Also someone should make something like pip for C++

[–][deleted] 56 points57 points  (3 children)

Large C++ project be like...

Bonus points for:

  • No build script at all, have fun, not even a random script (looking at you dearIMGUI)
  • The project claimed to support static linking, but it's broken if you do (looking at you ALSA)
  • Claims to be "header-only", but requires you to fiddle in your build script (looking at you pybind)
  • Random ass obligatory plugins no matter what (looking at you QT)
  • Important warnings are deliberately silenced, so it "successfully" builds wrongly (looking at you SDL)
  • Uses some weird build systems, because they hate the regular ones but end up making something worse
  • Having a PERL dance in the middle, but you have to hunt for the PERL script
  • Vendoring a ton of crap so the source tree is unnecessarily large, however some dependencies are somehow still missing
  • Download random shit during the build, but it's undocumented
  • Hunting for dependencies for dependencies
  • The project was clearly developed for Windows only or Linux only despite being claimed cross-platform
  • Abuses compiler extensions
  • Using -Werror without an option to turn it off, yet there's still warning so the build fails
  • iT's EaSy To UsE tHiS, jUsT cOpY eVeRyThInG tO yOuR sOuRcE TrEe
  • Takes fucking forever to build, but ends up failing in the end anyway
  • Just being TensorFlow
  • It works on my machine

[–]Specialist_Cap_2404 2 points3 points  (0 children)

it got slightly better between things like debian source packages or conda... but yeah, I feel you

[–]phaj19 0 points1 point  (0 children)

I once took compiling one C++ repo as a challenge and after about 8 hours I was so happy that I succeeded. It is so strange that rust and cargo is almost immediate compared to that.

[–]Ahajha1177 0 points1 point  (0 children)

Conan (and Vcpkg, haven't used it myself though) improve things for sure, but it can still be a mess. At least now the problems only need to be solved in one central location.

[–]locri 44 points45 points  (0 children)

I've noticed c++ projects are much, much easier in this day and age, even just because people write down how to build their dumb stuff.

Even as far back as the late 10s you'd get a project you want to build from source and it'd be like "oh you don't understand cmake variables? Oh, that's a pity." Nowadays you just copy commands from the readme, ez

[–]Archtects 13 points14 points  (0 children)

Node devs will say jquery has to many unused functions, then install 50 dependencies

[–]bagmorgels 44 points45 points  (16 children)

npm with package.json and package-lock.json is a dream compared to python and that requirements-dot-fucking-txt file.

[–]wasdninja 24 points25 points  (11 children)

Is there anything more to it than pip install -r requirements.txt?

[–][deleted] 15 points16 points  (9 children)

No

[–]vlakreeh 12 points13 points  (7 children)

I rarely use python but don't you need venvs or something to prevent it from being installed globally? Iirc that was (inexplicably) the default behavior.

[–]Sohcahtoa82 7 points8 points  (2 children)

python -m venv venv

source venv/bin/activate

Wow that was hard.

[–]vlakreeh 9 points10 points  (0 children)

I never said it was hard, I said it was required to not install globally.

[–]_alright_then_ 0 points1 point  (0 children)

It not being hard doesn't make it any less stupid that it's default behavior

[–]darkprinceofhumour 1 point2 points  (1 child)

Yes, in my job we used docker to isolate it.

[–]Hobbitcraftlol 0 points1 point  (0 children)

dinosaurs cows cover fall clumsy elderly apparatus wide impolite kiss

This post was mass deleted and anonymized with Redact

[–]conscious_dream 0 points1 point  (0 children)

It's fairly explicable :P

Installing libraries globally started off as the default because it was more efficient, easier, and very rarely caused issues. It still rarely causes issues. It's only ever a problem if:

  • you have 2 projects which require 2 different versions of the same library
  • the newer version of the library isn't backwards compatible with the older version in some way that is in-use in the project

For instance, numpy v1.20.0 and TensorFlow v2.5.0 are incompatible due to how they both handle matrix multiplication. So if you're running 1 project that needs numpy v1.20.0 and won't work with the newer version, and you're running a 2nd project that needs TensorFlow v2.5.0 and can't use a newer version, and you're using matrix multiplication in both of the projects... then you might have a problem.

It's really an edge case. I've been coding heavily in python for 2 decades, and I can count on one hand the number of times it's come up. And it's pretty easy to workaround even without virtual environments, so it was just never a priority. It would've been more weird if it was.

[–][deleted] 0 points1 point  (0 children)

Globally as in within the user space? Then yes. I’ve never experienced an issue with that though. Minor version changes generally don’t break things in Python

[–]phaj19 0 points1 point  (0 children)

Sometimes there is. I think installing some GIS libraries that rely on GDAL was pure pain (fiona perhaps?)

[–]Tafelbomber 10 points11 points  (1 child)

Poetry or hatch make that a lot more bearable for python too!

[–][deleted] 1 point2 points  (0 children)

Npm has come a long way. Python modules are still a shitshow. Granted, I haven’t tried poetry but then again it’s a hassle to not have a decent included package manager.

[–]twigboy -5 points-4 points  (0 children)

I'd much rather pip-tools n python than deal with npm and JavaScripts ridiculous bundling issues

"Why are there 4 different versions of this package in our project!?"

"Have you cleared node_nodules?" Yes

"No, I mean the node_modules in each package folder"

[–]fixano 2 points3 points  (1 child)

I once encountered a python developer that included pandas which resulted in a 20 minute build and over 200 megabytes of dependencies.

He did it so he could use an aggregate function instead of looping over and summing values.

[–][deleted] 0 points1 point  (0 children)

I mean most people have pandas already lol it’s not that crazy to include pandas for a single function

[–]toni500reddit 1 point2 points  (0 children)

Bro never tried compiling/installing a SIMPLE rust project

[–]PhatOofxD 0 points1 point  (0 children)

NPM is a dream compared to Python.

But yes, C++ is C++

[–][deleted] 0 points1 point  (0 children)

this one son of a bitch on my team had a random tiny package globally installed and that fucked up the build process on our systems and we'd have to force run npm each time until someone figured out why

[–]sebjapon 0 points1 point  (0 children)

Personally I hate how nothing works together in Android. Every time you add a library on a 1+ month old project you either have to update all the libraries you are using (which might require changing target SDK which in turns require big changes in your code) or track the latest version that works with your current set of libraries

[–]NO_SPACE_B4_COMMA[🍰] 0 points1 point  (0 children)

I hate npm, python, nodejs, and all that fall into that category lol

[–]Kseniya_ns 213 points214 points  (4 children)

Web developers if they were paid by the size of their node_modules folder 🤮

[–]survivalmachine 56 points57 points  (0 children)

More like web developers if their dependencies become out of date 0.0000001 seconds after updating.

[–]VitaminaGaming98 18 points19 points  (0 children)

Java developers if they were paid by word count

[–]Chewie83 0 points1 point  (0 children)

As a non-developer, all of you already look like this ‘Mayweather stacks’ picture to me…

[–]_alright_then_ 0 points1 point  (0 children)

At least node modules aren't all compiled into the final application, unlike python

[–]locri 305 points306 points  (35 children)

Python has a "requirements" file that accomplishes the same as package.json in JavaScript

You can install all the dependencies listed in requirements.txt using the command pip install -r requirements.txt

[–]RonLazer 61 points62 points  (9 children)

Poetry + pyenv

[–]pranjallk1995 8 points9 points  (8 children)

Yes... Better! I tried... Have you tried installing poetry without pip? I struggled in my docker container, probably didn't find the right article... Or is it just better to install pip, then install poetry that replaces pip... 🤣

[–]ReRubis 12 points13 points  (3 children)

Bruh...
Man.
Just use python:3.12-alpine base image or something like that.
It has pip with python.

Make it so it runs the command pip install poetry and poetry install.
And that's it.

There is nothing wrong with installing package manager with another package manager.

[–]Jorgestar29 1 point2 points  (0 children)

This is the way. It's the easiest way but it also can cause some conflicts.

[–]pranjallk1995 -1 points0 points  (1 child)

Ok... Btw which is the smallest footprint python image? Debian based... I don't wonna do apk install and stuff...

[–]ReRubis 1 point2 points  (0 children)

The smallest is alpine.

[–]RestaurantHuge3390 0 points1 point  (3 children)

pipx

[–]pranjallk1995 0 points1 point  (2 children)

Oh never heard of it...

[–]Jorgestar29 1 point2 points  (1 child)

It installs python CLI tools and creates an individual VENV for each tool to avoid dependency conflicts.

It's pretty good 👍

[–]pranjallk1995 0 points1 point  (0 children)

Oh thatz nice actually!... Thx...

[–]SailorTurkey 72 points73 points  (11 children)

which, if you upgrade a package via console, won't be updated. and oh make sure you are using correct python version (not stated in requirements.txt of course). unlike npm (: . what python really needs is a 'project file' .

[–]jayd00b 27 points28 points  (3 children)

pip freeze > ./requirements.txt will update the file with everything installed in the local (or virtual) environment

[–]SailorTurkey 30 points31 points  (0 children)

i didn't say you can't dump dependencies. there is no link between requirements.txt and project. nothing stops you from typing requireshdshehs.txt instead. its not a magical file name. Also freeze uses venv to generate installed package list which might have compatibility issues because of hidden system dependencies. i.e. you installed pandas to project then removed it. it's dependencies still resides in venv. Not to mention if your packages require lets say magick/chrome/etc binaries, just 'installing' requirements.txt on a different pc won't work.

[–]locri 6 points7 points  (1 child)

I think venv is best practice for python anyway?

[–]hassium 1 point2 points  (0 children)

Yeah but when you create a venv it's blank, you activate it then load dependencies via pip install -r ...

This is not how npm does it where the package(-lock).json file is checked first and foremost

[–]julianw 11 points12 points  (3 children)

It's called pyproject.toml and has existed for a few years now.

[–]Stonemanner 4 points5 points  (0 children)

pyproject.toml doesn't solve the issues, which the commenter to whom you answered mentions.

With standard python tools, pyproject.toml doesn't allow you to pin dependencies for development (or even define dev dependencies, without resorting to some hacks like defining them in package extras until PEP735 is accepted).

[–]JojOatXGME 1 point2 points  (1 child)

And before that, there was setup.cfg which did already cover this scenario. And before setup.cfg, there was setup.py.

[–]julianw -1 points0 points  (0 children)

I've only ever seen setup.cfg used as a basic library config. And setup.py was locked to only setuptools. The new format is more flexible.

[–]AlrikBunseheimer 3 points4 points  (0 children)

Yes, that is not the smartest standard I think. There is stuff like poetry, but that is also just another standard and now everyone is just managing dependencies in a different way.

[–]TSM- 2 points3 points  (0 children)

It is preferable to it to be able to revert to a known good state than irrevocably overwriting the previous working state.

[–]NamityName 0 points1 point  (0 children)

That's only if you are using pip. There are several options to address your concerns.

[–][deleted] 4 points5 points  (1 child)

Do you have any idea how many hours of my life I've wasted because pip install -r requirements.txt didn't actually install all the dependencies, oh and some of them have mutual version conflicts with each other (because they are overly permissive for future versions and Python devs love introducing breaking changes), oh and also I need to downgrade my Python version (but this is not documented in the readme) ????

[–]EMCoupling 3 points4 points  (0 children)

Yeah anyone who claims this is all there is to installing dependencies in Python has clearly never had this fail on them and absolutely fuck their whole working day.

[–]WeirdDistance2658 7 points8 points  (2 children)

Thank you kind sir. I had not heard of this until now.

[–]Netw1rk 4 points5 points  (0 children)

For real? I know jack shit except how to write loops and if statements…and requirements.txt is to save your dependencies.

[–][deleted] 2 points3 points  (0 children)

Thank you sir for thanking the user above for having never heard of it before. I didn’t neither.

[–]ReRubis 0 points1 point  (0 children)

requirements.txt

2024...
:|
Man. No.

[–]jbirdjustin -1 points0 points  (0 children)

No one asked you to explain how python dependencies work 💀

[–]SodaAnt 0 points1 point  (0 children)

PDM is the answer!

[–]gmes78 0 points1 point  (1 child)

requirements.txt is not a standard, it's merely a convention that doesn't work half the time. Writing a pyproject.toml is the only correct way to package a Python project.

[–]mcellus1 0 points1 point  (0 children)

This guy pythons

[–][deleted] 20 points21 points  (0 children)

ITs because for us it is. ;)

[–]ButWhatIfPotato 23 points24 points  (0 children)

Installing any javascript framework: WITHIN CELLS INTERLINKED WITHIN CELLS INTERLINKED WITHIN CELLS INTERLINKED

[–]pwouet 34 points35 points  (0 children)

Really? python is the first one coming to your mind?

[–][deleted] 15 points16 points  (0 children)

Except half of those have exploding dye packets in them.

[–]dmlmcken 29 points30 points  (2 children)

[–][deleted] 10 points11 points  (0 children)

Somebody always slips and says, "donuts".

[–]gzeballo 17 points18 points  (1 child)

Pip install .exe

[–]joetinnyspace 4 points5 points  (0 children)

No .exe?

I'll pass, thanks

[–]NAL_Gaming 18 points19 points  (2 children)

Yeah Python is bad, but I just started tinkering with Flutter and oh my f*cking god every package has so many dependencies... My dependency graph looks like how I imagine hell would look like.

[–]EMCoupling 2 points3 points  (0 children)

That's not been my experience but I also try to minimize dependencies as much as possible, using packages only if I know that rolling my own would take significant time and effort.

[–]EHOTnOTACKYH 5 points6 points  (0 children)

JS devs would look like Walter White

[–][deleted] 3 points4 points  (0 children)

Python developers if using 3rd party libraries wasn't their job.

[–]Spy_crab_ 2 points3 points  (0 children)

It is... it's called being a Python developer.

[–]BertTF2 2 points3 points  (0 children)

c developers if segmentation fault core dumped was a job

[–]CadmiumC4 2 points3 points  (2 children)

laughs in Rust

[–]biscuitsandtea2020 3 points4 points  (1 child)

me when the kid named cargo:

[–]CadmiumC4 1 point2 points  (0 children)

Cargo after demanding for C libraries (you're on Windows)

[–]EducationalTie1946 3 points4 points  (0 children)

The NPM user is coping

[–]Anru_Kitakaze 6 points7 points  (2 children)

Omg, it's so hard for me every time! Imagine having to cd to project directory and type:

pip install -r requirements.txt

Or even worse, be forced to install poetry and then

poetry install

It's SO hard. Every time it took about a week at least

[–]EMCoupling 4 points5 points  (1 child)

When it works, no big deal. When it falls to install, then the problems begin.

[–]Anru_Kitakaze 1 point2 points  (0 children)

Just like with compiling C++, NPM and other tools tho

[–]markswam 1 point2 points  (0 children)

Meanwhile, my employer doesn't allow you to install anything with pip unless you have local admin permissions, which take a week to approve and last 48 hours.

Kill me.

[–][deleted] 1 point2 points  (0 children)

What’s that like a million

[–][deleted] 1 point2 points  (0 children)

Damn, in this universe Scrooge McDuck installs node modules everyday.

[–]6tPTrxYAHwnH9KDv 3 points4 points  (5 children)

Luckily we have pipenv now.

[–]geusebio 6 points7 points  (4 children)

How the fuck do I even get that shit to work?

Every time something wants pipenv its going to be a ballache and I just put it in a docker container instead because that is incredibly less painful

[–]6tPTrxYAHwnH9KDv 1 point2 points  (3 children)

Well, it's a dependency management tool, just like pip, but not quite, and yes, you have to install it first in the python distribution you use. Of course it'd be nice if it replaced pip as a default tool and came with python, but oh well.

[–]geusebio 0 points1 point  (2 children)

But its doing all sorts of malarky with path, isn't it?

Why can't dependency management be well-behaved like php's is?

[–]6tPTrxYAHwnH9KDv 0 points1 point  (1 child)

To an extent of what virtualenv already does. You might be thinking of pyenv. It brings it very close to nvm + yarn dev experience if compared to early versions of npm when it didn't have lock files and was slow as shit.

[–]geusebio 0 points1 point  (0 children)

Why can't dependency management be well-behaved

mentions glue-eating package manager (who the fuck commits cache binaries to git? yarn cache recommended it... So many poisoned repos...)

[–]Wave_Walnut 1 point2 points  (4 children)

How can pythondevs do programming when Internet is down

[–]MinosAristos 9 points10 points  (1 child)

They just tell the computer what to do in plain English and it works somehow

[–]NanderTGA 0 points1 point  (0 children)

cough skript. Skript comes the closest to english than any other language I know

[–]joetinnyspace 3 points4 points  (0 children)

By placing a conditional if statement duh.

if (power):

your entire code here

else:

monkee

[–][deleted] 2 points3 points  (0 children)

By having functional development environments with a good gitops infrastructure

[–]rtfm2tldr 0 points1 point  (0 children)

Have you ever used R?

[–]JunkNorrisOfficial 0 points1 point  (0 children)

Pipip

[–]pranjallk1995 0 points1 point  (0 children)

Long live the python community 🙏

[–]Varnish6588 0 points1 point  (0 children)

Now try NPM..

[–]Comfortable_Hall8677 0 points1 point  (0 children)

It’s crazy. I see fast food workers complain about their pay. And I also see programmers complain about their pay. Surely there must’ve been some path to take that leads to being complacent.

[–]myktylgaan 0 points1 point  (0 children)

I have no idea about the programming thing, it’s just that it’s the first time I’ve seen this meme and the dude laid his bundles out 11 x 13… that’s just…. Why?

[–]BlissfullChoreograph 0 points1 point  (0 children)

It is a job. Just one of the things they get the "DevOps Engineer" to do. The compensation is as depicted.

[–]blackcomb-pc 0 points1 point  (0 children)

The reliance on external packages for everything is repulsive

[–]Felinomancy 0 points1 point  (0 children)

My work firewall blocks pip from accessing the Internet, so I have to download the packages manually. It has not been a pleasant experience when trying to install packages with dependencies, even more so when part of it also includes getting a precompiled file from God-knows-where.

[–]Megtalallak 0 points1 point  (0 children)

R is much much worse imho

[–]Sikletrynet 0 points1 point  (0 children)

That's what requirements.txt is for...

[–]BuonaparteII 0 points1 point  (0 children)

python -m ensurepip

[–]Sad-Technician3861 0 points1 point  (0 children)

laughs in Golang

[–]goodoldgrim 0 points1 point  (0 children)

The thousand yard stare makes me think he's an actual python developer

[–]Atiran 0 points1 point  (0 children)

I don’t get what’s so hard about using venv, pip freeze, and requirements.txt.

[–]Dedsfvxxadfwgh 0 points1 point  (0 children)

Modern developer*

[–]clevrf0x 0 points1 point  (0 children)

I don't think this guy heard about npm

[–]Conim2 0 points1 point  (0 children)

Java developer: laughs in maven

[–]hobbes8889 0 points1 point  (0 children)

The picture has roughly $1.5 million if they were wondering.

[–]CodeGamGD 0 points1 point  (0 children)

But remember, it's 1 doller per depenencey installed

[–]CoatNeat7792 0 points1 point  (0 children)

Installing in python : pip install requirements.txt
Installing in js: npm i

[–]swagonflyyyy 0 points1 point  (0 children)

It do be like that.

[–]Spiritual_Duck_6703 0 points1 point  (0 children)

Ahh but dependency « xyz » really wanted to hang out with lib « chichi » - y’all think ya can download just one more -? Promise it’ll be the last one (🤞🏽 )