4 ms·
Except Powershell isn't a real shell in the same way that cmd or any of the POSIX shells are. It's a REPL for a language running on the .NET VM. I'm neither a f
by int_handler 10y ago
Except Powershell isn't a real shell in the same way that cmd or any of the POSIX shells are. It's a REPL for a language running on the .NET VM. I'm neither a fan of the language nor having to wait several seconds due to the latency of having to start the .NET VM when you start posh.
- majkinetor 10y agoWith nano server speed is optimised. It starts under 500ms. It has too, otherwise it would be slower then docker run.
- majkinetor 10y agoWith nano server speed is optimised. It starts under 500ms. It has too, otherwise it would be slower then docker run.
- ygra 10y agoWhat is a shell for you then? If the defining characteristic is that it's not written in a managed language, well, okay, but I don't think many people share that sentiment. I have observed the several seconds startup time last with PowerShell v2 or so and that was not the time needed for the CLR to start, but rather PowerShell which was slow to start. v5.1 starts instantly here and the only slow thing about it is my profile, which admittedly does a bunch of things that take time (it's not yet at a point where it's annoying me so much that I edit it, and I can start typing commands during that time anyway (considering that I often spend more time thinking about what to write that's okay)).
- flukus 10y ago> What is a shell for you then? A way to execute programs. The parent is right, powershell is more like a REPL to execute .net code. It's still no where near as good as a unix environment.
- pjmlp 10y agoSays the one that never used a Xerox PARC like OS in anger. A GUI workstation using a REPL for scripting/automatic is so much powerful than a plain UNIX shell.
- ygra 10y agoBut as long as you only execute programs a script for cmd, bash, PowerShell and a number of other shells looks pretty much the same. In PowerShell executing a program is simply to state the program name (barring spaces in the path for now). You don't have to do something like execute_program(name, args, input_redirection, output_redirection, ...). Well, you can, if you're so inclined, but it's usually unnecessary. Any shell is "just a REPL for a scripting language". Interactive use is one of the tenets of a shell, otherwise it's more a batch processing system, I guess. And just like in other shells the language is one geared towards running commands (cmdlets or external), managing their execution and processing their output. That it works better for general programming than many other shell languages (in my eyes) is a nice bonus. Heck, running programs is even easier than in most other shells since there's a specific token that stops argument parsing completely which means you don't have to care about quoting at all (an ever-present nightmare at times).
- flukus 10y agoThe difference is that windows/PowerShell don't provide the programs that make a she'll useful.
- ygra 10y agoWow, then I've done a lot of apparently-useless PowerShell work. I beg to differ, by the way. Different is not the same as »not useful«. It's not a traditional Unix shell and doesn't pretend or want to be. That doesn't make it useless, just different.
- tremon 10y agoIt's not a traditional Unix shell and doesn't pretend or want to be. Except in the sense that it provides aliases for most popular Unix shell commands. They even made their aliases incompatible with other Unices, like every other traditional Unix shell.
- rikkus 10y agoIt's around 1.5 seconds here on an i7-6600U (whether I launch it in its own window or in a cmd window). I'd rather it was 1/10th of that as a maximum, but it's worth the wait!