Earlier quoted context omitted.
> Millions of people put it into Docker, or they just deal with it and you see the results with tons of Stackoverflow questions Arrogantly wrong. I've coded in Python for almost 20 years. Many of those years I've had it as my primary language at work. 2024 was the first year I actually needed a virtualenv. Before that, I'd happily use pip to install whatever I want, and never had a version conflict that caused proble…
Some packages are written by researchers in fields that aren’t engineering. Sometimes you go all the way and reach for a VM.
I'm switching to Python and actually liking it
591–600 of 718 posts
Re: I'm switching to Python and actually liking it
#592Earlier quoted context omitted.
You don't generally want API keys accidentally recorded into someone's bash history.
What exactly is your threat model, where the attacker can read ~/.bash_history but can't execute (or capture output from) /usr/bin/env?
Re: I'm switching to Python and actually liking it
#593Earlier quoted context omitted.
> Millions of people put it into Docker, or they just deal with it and you see the results with tons of Stackoverflow questions Arrogantly wrong. I've coded in Python for almost 20 years. Many of those years I've had it as my primary language at work. 2024 was the first year I actually needed a virtualenv. Before that, I'd happily use pip to install whatever I want, and never had a version conflict that caused proble…
I was talking about pip, not venv. I don't use venv either, not because I think it's a bad idea but because I can't be bothered. Stuff does end up conflicting unless I use Docker (lol) or uv.
It's wise to keep silent in such cases.
Re: I'm switching to Python and actually liking it
#594For me, python is the closest thing to writing pseudocode that functions. Every time I have the instinct to gloss over a thing when writing it down (because it feels obvious in my head), it turns out that python has an intuitive abstraction for it. Coming from a mathy background I found it incredibly satisfying, although I’ve come around to other languages since.
As a mathy person myself, I find the OOP leaning difficult to think about. Better equational reasoning, better lambdas, fewer side effects to worry about, avoiding mutation so that I can define something and still know what it is later during runtime, those are what help me think clearly. To me OOP is about the furthest paradigm from math that I’ve used.
Re: I'm switching to Python and actually liking it
#595I'm glad someone else discovered they can like python. I got forced to learn it for a project where I was proposing Ruby and the customer insisted on Python. This was years ago when Ruby was much slower. I was annoyed but I got used to it and here I am enjoying it many years later. I take issue with the description and use of make though! :-D What is the point of it if you're not going to use dependencies? One might…
Ruby's syntax is much nicer. I just can't stand the idea of using whitespace for scope delimiting.
Re: I'm switching to Python and actually liking it
#596Earlier quoted context omitted.
Java unequivocally won the war, though.
Having used both, I still can't understand why.
I can see similar way why Swift eventually can loose market share - too late to open source and too late to embrace cross-platform.
Re: I'm switching to Python and actually liking it
#597 uv venv activate
The command actually creates a new venv in a dir called "activate". The correct way to activate the venv is like this: source .venv/bin/activateRe: I'm switching to Python and actually liking it
#598> Not only because the syntax is more human-friendly, but also because the Python interpreter is natively integrated in all Unix distros That's kind of very optimistic evaluation - literally anything beyond "import json" will likely lead you into the abyss of virtual envs. Running something created with say Python 3.13.x on Ubuntu 22.04 or even 24.04 (LTSs) / Rocky 9 and the whole can of worms opened. things like vir…
“import json” is the kind of thing which requires picking and installing libraries in batteries-not-included languages, and it’s just one of many modules which are in the standard library. That’s not a compelling basis for large projects but over the years I’ve shipped a ton of useful production code which never needed more than the stdlib and thus spent no time at all thinking about deployment or security patching.…
Re: I'm switching to Python and actually liking it
#599Re: I'm switching to Python and actually liking it
#600Earlier quoted context omitted.
Using it as a replacement for Bash. No environment required, Perl is already installed on every computer on earth. Perl is generally quicker to write for string-oriented workflows - which is what Bash is. Regex is quick and easy. Perl falls apart when you need structure and even small projects. For short scripts meant to do what you would use Bash for, it's a godsend. Safer, more portable, less friction.
Perl does not fall apart when you need structure, it's OO. In fact it's better structured than Python (hello, PyPI? It's CPAN calling, we wanted to let you know hierarchical packages are a thing). If you mean "forcing people to program in an opinionated manner", it doesn't do that by default, but that's what linters and formatters are for (like the ones Python programmers use)