3 ms·
PowerShell obvioslly, if you can handle awesome. Now there will be tones of angry dudes complaining about: - Optional verbosity - 1-5s startup time on some m
by majkinetor 6y ago
PowerShell obvioslly, if you can handle awesome.
Now there will be tones of angry dudes complaining about:
- Optional verbosity
- 1-5s startup time on some machines
- Random MS agenda to conquer and destroy
- Random problem with usage that is solved by RTFM
- Suggesting python, ruby, go, node, perl and whatever non-shell language
Thankfully, ignoring is still a great human feature.
- jen20 6y agoFirst, I like PowerShell - sufficiently much to have used it as a login shell _on macOS_ for a while. However, you grossly overestimate the “awesome”. To answer each “angry dude” point in turn: - The verbosity is fine - in scripts, one should fully expand command names. Interactively, `gci` is fine (or the `ls` alias, though some of the default aliases are travesties). - The startup time is insane. I start a new terminal window hundreds of times per day, and the startup time is what made me abandon POSH. - Apache 2 licensed, so I don’t care. I do default to assuming that MSFT are doing something shady though, and I’m right [1]. - RTFMing is perfectly fine (and Get-Help has high quality documentation for built-ins), but one must accept that most users will not. ISE (if it existed outside of Windows) was a nice workaround for needing this. - Python, Ruby, Go, Node and Perl are all more portable (see my last comment about FreeBSD support). As an interactive shell, nushell [2] is probably the closest thing to the PowerShell experience which is not tied to .NET Core. [1]: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_telemetry?view=powershell-7.1 https://docs.microsoft.com/en-us/powershell/module/microsoft... [2]: https://github.com/nushell/nushell https://github.com/nushell/nushell
- majkinetor 6y agoSo your answers just confirm my 'angry dude' bullet list. As far as I can see, the only really problematic one is startup time, which is surely something that will be resolved in the future. I witnessed this only rarely while I use PowerShell on Windows and Linux - it was on windows and it was on VM with very slow disk, and some modules that each keep functions separated by files. I welcome nushell development, but you can't really compare it to pwsh - even if they continue developing it, its decade or so from being usable as main shell. > you grossly overestimate the “awesome”. Nah, its awesome. I save bunch of time any time I open the PowerShell. And any time when one tries to be quicker in some other language one is not, eventually.
- jen20 6y agoIn that case you cannot see sufficiently far: telemetry on by default is a non-starter. If the startup time were going to be fixed “real soon now”, it would have improved since 2006. It has not, especially when basic usability enhancements like “posh-git” are enabled. > [nushell is a] decade or so from being usable as a main shell News to me. I replaced Powershell with NuShell.
- majkinetor 6y ago> it would have improved since 2006 cross platform pwsh is just few years old > I replaced Powershell with NuShell. Sure, you can replace it with LOLCAT either, its totally legit. Regarding startup time, I can't believe there is such drama. If that troubles you so much, you can easily workaround it by always keeping powershell process pool ready in the background (1 or 2 suspended instances until you use them).
- jen20 6y ago> cross platform pwsh is just few years old It's slow on Windows too.
- scbrg 6y ago> you can easily workaround it by always keeping powershell process pool ready in the background (1 or 2 suspended instances until you use them). This is a pretty absurd take when the discussion is about alternative shells for writing scripts. Shell scripts are everywhere. A fairly heavily used UNIX box might easily execute hundreds of shell scripts every minute. A startup time of several seconds makes it completely unusable.
- majkinetor 6y agoNot sure what to tell you to break your bubble. I have literary thousands of pwsh scripts running in critical gov projects in production, most of them as part of CI, CD, build and automatic test but some of them serving millions of users. I had dozen of such projects in previous decade on Windows and several on Linux and never had any significant problem with slow startup really. Sometimes it happened that some machines had slow startup but team usually fixed that one way or another. Pattern of usage of bash scripts where hundreds of shell script run every minute is IMO not something you should brag about in systems architecture. And pwsh is different - it has modules which are encapsulated and you don't have to start another instance of shell to prevent mingle. Parallelism ofc still benefits from faster startup.