5 ms·
Maybe pip should not work by default (but python -m venv then pip install should)
by makapuf 2y ago
Maybe pip should not work by default (but python -m venv then pip install should)
- avmich 2y agoLegends say there were times when you'd have a program.c file and just run cc program.c, and then could just execute the compiled result. Funny that programmer's job is highly automatable, yet we invent ourselves tons of intermediate layers which we absolutely have to deal with manually.
- EnergyAmy 2y agoAnd then you'd have to deal with wrong glibc versions or mysterious segfaults or undefined behavior or the the code assuming the wrong arch or ...
- KeplerBoy 2y agopython solves none of those issues. It just adds a myriad of ways those problems can get to you. All of a sudden you have people with C problems, who have no idea they're even using compiled dependencies.
- EnergyAmy 2y agoIn theory you're right, CPython is written in C and it could segfault or display undefined behavior. In practice, you're quite wrong. It's not really much of a counterargument to say that Python is good enough that you don't have to care what's under the hood, except when it breaks because C sucks so badly.
- KeplerBoy 2y agoI was specifically talking about python packages using C. You type "pip install" and god knows what's going to happen. It might pull a precompiled wheel, it might just compile and link some C or Fortran code, it might need external dependecies. It might install flawlessly and crash as soon as you try to run it. All bets are off. I never experienced CPython itself segfault, it's always due to some package.
- davedx 2y agoI actually did a small C project a couple of years ago, the spartan simplicity there can have its own pain too, like having to maintain a Makefile. LOL. It’s swings and roundabouts!
- makapuf 2y agoI agree simplicity is king. But you're comparing making a script using dependencies and tooling for those dependencies and a C program with no dependencies. You can download a simple python script and run it directly if it has no dependencies besides stdlib (which is way larger in python). That's why I love using bottle.py by example.
- avmich 2y agoAgree. But even with dependencies running "make" seems to be way simpler than having to install particular version of tools for a project, making venv and then picking versions of dependencies. The point is the same - we had it simpler and now, with all capabilities for automation, we have it more complex. Frankly, I suspect most of the efforts now are spent fighting non-essential complexities, like compatibilities, instead of solving the problem at hand. That means we create problems for ourselves faster than removing them.
- reportgunner 2y agoYou can do the same in python if you're not new to programming.
- jononor 2y agoSome Linux distros are moving that way, particularly for the included Python/pip version. My Arch Linux already does so some years, and I do not set it up myself - so I think it is default.