Readit News logoReadit News
drcongo · a month ago
Despite not using it in production yet, I sponsor this project as I want it to succeed - I just need to find the time to move years of carefully crafted Ansible roles over and above way of making our internal modules nicely composable.
Boxxed · a month ago
I don't have anything insightful to add but I do want to say that after years of ansible et al, pyinfra is an absolute breath of fresh air.
bionsystem · a month ago
How does it compare to fabric ? I used neither of those. I'm quite proficient in ansible and fine with it but always interested in alternatives.
Boxxed · a month ago
They're sort of different things. I think of fabric as more of a remote shell, but pyinfra is exactly analogous to ansible.
1vuio0pswjnm7 · a month ago
Is the shell faster than Python

I don't use Python as it's too slow for me, e.g., the startup time for the interpreter

rented_mule · a month ago
pyinfra is for running things across a number of machines and/or containers. For example to provision them, much like Ansible. So Python's startup time isn't terribly relevant.

Also, have you tried Python's startup time in the last decade or so? On my 2-year old, $150 computer with an Intel N100 (a very low-end CPU) running Ubuntu, `python3 -c "print('hello')"` takes 15ms. On my 8-year old Mac mini, it's 35ms. Both are significantly faster than what humans perceive as instantaneous, so Python's startup time is more than fast enough for many things.

1vuio0pswjnm7 · a month ago
When I use the phrase "too slow" I am referring to being slow _relative to other interpreters_ I use, such as the Almquist shell intepreter (NetBSD sh or Debian's dash), the ngn-k interpreter, the spitbol interpreter, the dino interpreter, the lua interpeter, etc.

HN commenters often state that "Python is (pre)installed everywhere"

This is not true on the computers I operate. For example, there is no python interpreter in NetBSD's base.tgz

Here we see a project that uses Python to run the shell, even though, if HN commenters are correct, "Python is (pre)installed everywhere"

Of course, the shell _is_ preinstalled everywhere and this project relies on that fact

IME, the shell and other interpreters are much faster than Python for what I need to do

I am aware of Python's current speed as it is sometimes a compile-time requirement for third party software that I am compiling. I remove Python after I am done

1vuio0pswjnm7 · a month ago
Also, Python versus sed and AWK intepreters