Remix.run Logo
mschuster91 14 days ago

> And if your system has bash, it often has python as well, or at least it's easy to install.

The problem is, bash is a universal target. Every unixoid system has bash in one way or another, usually at /bin/bash or in a pinch /usr/bin/env bash. No matter if your target system is Debian oldoldstable or bleeding edge Gentoo, it will run.

Python however is a hot mess. Some operating systems are at `python` yielding v2, others v3. Others (Macports) have python2 and python3 binaries if the user doesn't also do a `port select` afterwards. The user may have overridden this with virtualenv's (that this exists at all is a disgrace in itself). And that all is before `pip` even has entered the stage, or before you try to figure out what whitespace format Python expects and what whitespace format you just used in the last YAML file you edited.

(The whitespace shit is what will keep me from using Python if at all possible.)

thyristan 14 days ago | parent | next [-]

That is why you don't use Python, you use Perl. Every Unix has Perl, and Perl has backward compatibility into the last millenium. Always use 'strict' and proper linting for readability and typo avoidance.

If you are able to install modules, add 'IPC::Run' and 'Getopt::Declare' or 'Getopt::Euclid'. Never again will you be able to tolerate anything else ;)

theamk 14 days ago | parent | prev | next [-]

Yeah, the naming was pretty bad for a while, but it seems today `#!/usr/bin/env python3` is a safe bet. And pip/virtualenv should not matter - remember, we've are talking about "python-without-dependencies"

As for tabs vs spaces - I really don't get it... My editor (emacs) picks the style automatically, I don't think I even had to set this up. But most of the python code I see use 2 or 4 spaces, so if someone puts tabs, it's immediately visible 8-character indents, which makes me alert (and then I turn on whitespace highlighting in my editor).

IshKebab 14 days ago | parent | prev [-]

uv has pretty much solved those issues, but it does need to be installed. Fortunately it's very easy to install.

Another option I've used is Deno.