4 ms·
Well the problem is that what should be the lingua-franca in a post POSIX/Bash world? My preference is PowerShell. It's now open source [1], it has a wide inst
by Pet_Ant 1y ago
Well the problem is that what should be the lingua-franca in a post POSIX/Bash world?
My preference is PowerShell. It's now open source [1], it has a wide install base, and is cross-platform. It is a bit heavy and slower to start (actually takes seconds), but the cleaness of it's record-based nature versus just string parsing is infinitely refreshing.
[1] https://github.com/PowerShell/PowerShell https://github.com/PowerShell/PowerShell
- chasil 1y agoIt is unlikely to be PowerShell. On my old i386 server, this is my fastest shell: $ ll /bin/dash -rwxr-xr-x 1 root root 85368 Jan 5 2023 /bin/dash The set of features in the POSIX.2 shell is designed to minimize resource usage. This is simply a place that PowerShell cannot go.
- Pet_Ant 1y agoi386 isn't even supported by Linux anymore and has less power than a Raspberry Pi. It's not the indicator of the future of anything. It might be nostalgic, but it's ewaste and better served by a Pi.
- chasil 1y agoMy mistake, my legacy rhel5 i686 on a 22nm Xeon. This does not mean that resource-constrained environments do not exist.
- kstrauser 1y agoNope, no way: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_telemetry?view=powershell-7.5 https://learn.microsoft.com/en-us/powershell/module/microsof...
- anticensor 1y agoYou can build from source to strip away telemetrics.
- mdaniel 1y ago"can" is doing some heavy lifting there, especially based on my experience with VSCodium (which by definition is forced to work within Microsoft's opinion of build systems) Anyway, uh-huh: https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github/workflows/macos-ci.yml#L74 https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github... -> https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github/actions/build/ci/action.yml#L17-L25 https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github... https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github/workflows/macos-ci.yml#L88 https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github... -> https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github/actions/test/nix/action.yml#L48-L55 https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github... and, relevant to your comment even they opt out of telemetry https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github/workflows/macos-ci.yml#L29 https://github.com/PowerShell/PowerShell/blob/v7.5.1/.github... --- As a frame of reference, to build bash one only needs /bin/sh not a pre-built copy of bash itself https://git.savannah.gnu.org/cgit/bash.git/tree/configure?h=bash-5.2#n1 https://git.savannah.gnu.org/cgit/bash.git/tree/configure?h=...
- lilyball 1y agoAnything that's slow to start is completely unusable as a general replacement for shell scripting. For specific use-cases where the script itself would take a long time to run, a slow start may be fine, but `sh` scripts are used all over the place in contexts where you want it to do its thing and get out of the way as fast as possible (e.g. tweaking env vars or arguments before `exec`ing a binary).
- Pet_Ant 1y agoDuring boot my shell took 2.5s to start up. Now, it took 0.9s to start up. I have trouble imagining a scenario where scripting is adequate, but a second or two of start up is too much. I'm thinking maybe high-availability migration or something. The benefits to correctness from the (optional) type-system seem worth it even there.