Hacker News new | ask | show | jobs
by larodi 2105 days ago
let's consider PowerShell for a moment. when it came out the bulk of windows admins noted as much as the command prompt changing its Color, and the bulk of Unix admins did not even pay a cent, cause they are so happy with existing Unix tools.

no one noted that PS is literally taking 'the best of Unix shells and then some', putting this on steroids which vastly simplifies all DevOPs and does so in a fairly structured-OO-fancy. Even even the worst PS1 program is practically more comprehensible than arbitrary /etc/init.d script. And it pumps objects, not streams that you need to through Regexes against to parse.

It's been very clear that MS is very well into the idea of embrace opensource, because there is value to it, which even blind opensource advocates can not properly evaluate and then put to work.

The non-developer crowd blindly believes that open source is about free software and daring David-vs-Goliath, but open software actually has cost, and this cost can be quite high. at the end - someone pays the bill.

For example - number of big organizations put money into Postgre and it's why it's still there. Put money in RedHat, do put money and effort for linux kernel, and I really hope Mozilla will transform soon to actually be able to sell some stuff. Opensource is key asset in this case but likely valued are the communities around it.

By no means is open software built by enthusiasts, the most fundamental parts opensource software are built by top-notch hard-core developers unmatched in their coding skills.

5 comments

> no one noted that PS is literally taking 'the best of Unix shells and then some', putting this on steroids which vastly simplifies all DevOPs and does so in a fairly structured-OO-fancy.

This is a big thing on Windows, but not so much on Linux, where you have a number of languages available - you don't need to write all your scripts in Bash - a lot of my company's automation is written in Python, which is vastly superior as a programming language - and you don't need to limit yourself to what's built into the shell - there are dozens of small utilities that operate on streams that make your life easier. The self-contained approach of a shell-to-end-all-shells makes sense in the Windows environment (where "curl" is not an executable) and absolutely doesn't anywhere else.

Putting the whole .net library as available to use as well as any CLI tool is very interesting. The syntax is a slightly on the quirk side. But not terrible and it is consistent in its own logic.

To put it to someone who has not used PS it is like taking the entirety of the C/C++ runtime and whatever lib is in your libs folder available to use without writing a bunch of wrapper bits of code to use it. Then still being able to use the existing set of wrapper bits.

MS has lost the server space, and a good chunk of the developer space on desktop to opensource and macos. To expect them to sit back and not do something would be astonishing. Of course they are going to make software for those platforms. They make software even if they do not own the platform it runs on. MS sees software as a way to get things done. Sometimes in the opensource world people see it as a lifestyle decision. Those can coexist, because they are not against each other. They can complement each other.

This was how Xerox PARC and ETHZ workstations worked, and is a great idea that UNIX never grew to adopt.
Powershell is more akin to Xerox PARC REPLs than anything UNIX, besides the pre-configured alias.
True, the way PS passes objects is great and I really miss that on Linux now :)
PowerShell runs on Linux, too.
Sure it does but the OS integration isn't there so it's not nearly as useful.
Yeah, PowerShell is light years ahead of any linux shell. I wonder when will we see first linux distro that uses it as default shell.
You’ll have to elaborate on how PS is actually better rather than different
It brings the Xerox PARC and ETHZ workstations REPLs into Windows.

Basically everything in the OS is available for scripting, regardless if it is a DLL, COM, .NET library.

And the shell is a proper programming language with modules support and uses structure data as default.

This means you can easily make use of any OS feature or even automate existing GUI applications via COM/OLE, or their own libraries.

And there is an OS provided IDE as well, with integrated debugger.

So overall one gets a little closer to what the Lisp Machines used to be, just with a mix of .NET and native libraries.

Yes this would be possible in UNIX, but given the fragmentation and POSIX culture, it will never be adopted at scale for it to work the same way as Powershell does on Windows.

Its better because you are way more efficient because you do not parse strings. You can't argue with that fact.

Besides, everything that can be used with bash can be used with PowerShell. Opposite is not true.

Better. Much much better.

It has deep ties to Windows, which makes it very powerful, on Windows.

Windows users seem to be fond of its syntax, which is understandable considering how starved of languages they'd been for the past 40 years.