92 points · by beshrkayali · 11y ago · 63 comments
I have gone to a number of conferences with MS employees over the years, especially MS lawyers, and with respect to software, they often seem like they have been indoctrinated into a cult. As if the existence of software outside of MS Windows does not exist and as if MS holds the key to solving all problems. But MS does not offer solutions. They create problems (e.g., for anyone who has to deal with their licensing) and then offer "solutions" to the problems they created. It is like someone who proposes to "simplify" something by introducing more complexity.
The idea of MS embracing a proper shell seemed laughable to me. Windows users expect pointing and clicking (and today they want to be able to touch the screen).
Now fast forward to 2015 and it seems like PowerShell has a significant number of users. I am sure it is helping Windows users greatly. Good for them.
But I still think it is laughable. The name still makes me laugh.
I'd rather use something like Back Orifice (which has a simple UNIX client) to control Windows from a proper shell on a computer running UNIX. Or SSH via Cygwin. Or even SUA which has ksh and tcsh. Alas no simple Bourne shell (better for writing portable scripts).
In order to write a script, you first have to change your system security settings.
More subtly, because it's comparatively new it's not very dogfooded and there isn't a rich source of examples. UNIX systems usually have lots of shell scripts in /etc for you to learn from.
If the UNIX designers had chosen some other lowest common denominator, all of these diverse utilities would be communicating over that protocol instead of ASCII. The choice to use "text" came first and the ecosystem came afterward.
They are honestly too long.
I haven't used inforno-shell, es or rc, so can't comment on them directly. That said, if they are easily comparable to bash, ksh, etc, then you probably owe it to yourself to see what powershell is about and why it's fundamentally different.
It worked better than one might expect. You'd get emails about failed backups (backup flag files removed after a successful backup), backups were versioned, and restore was quick & easy (execute a simple script from the shared drive, then sys c: from a boot disk).
Ah, but no; I would end up saying some things that would have been too ironic to come from a Microsoft person, such as:
- why are you Unix people making a POSIX standard which covers the shell command language, if you're going to insist on one reference implementation being used on everyone? Just dump the source code listing of that into a document, add a few comments here and there, and call it the standard.
- isn't it healthier to have multiple implementations rather than a "monoculture"? Do we all use the same C compiler?
- the MKS shell could be made to diagnose and reject the use of Korn shell extensions, helping the programmer write a more portable script.
- wait, did you say your name was Korn, or Bourne? I didn't quite hear you from the back. If you're Mr. Korn, I would appreciate it if Mr. Bourne would now stand up, if present, and ask you why you don't just use the shell with his name on it.
a) Red herring. No one is talking about a reference implementation of Unix shells, but about Korn shell compatibility in particular.
b) Red herring. Don't imply it's a Korn or Korn-compatible shell - that's the issue here.
c) Red herring. Though the conversation was never recorded, it's implied that nothing was said about "portability", per se, but in particular compatibility with the Korn shell language specification.
d) Red herring and an insult. Stephen Bourne didn't write the first Unix shell. Ken Thompson did. Is your implication that no one should iterate or create new designs? Microsoft creating a Unix shell is fine, but the issue at hand is that it wasn't a Korn shell like they claimed it to be.
https://en.wikipedia.org/wiki/MKS_Inc
MKS claimed to have a Korn-shell workalike, AFAIR.
> The MPM asserted again that the shell was pretty compatible and should work quite well
which sounds reasonable, and isn't an assertion that MKS has the Korn shell in it such that it is 100% compatible. (And could anything even be 100% compatible, if not running on Unix? The Korn shell source ported to DOS woudln't be 100% compatible with the Korn shell, just "pretty compatible" so that many things work "quite well".)
They probably had some good reasons to with MKS, because in fact it isn't easy to port a shell: not to the DOS environment. Or Windows. The minimal example of doing this reasonably well might today be the MSYS environment used by MinGW, which has to re-create significant infrastructure (a whole C library from the ground up and other things).
Maybe Microsoft also had favorable licensing with MKS, avoiding the AT&T license.
Any shell that isn't compatible with the _reference_ implementation of that shell is flawed.
A reference implementation accompanying a document can be at odds with the specification. If a document says that a reference implementation shall be held correct if there is any discrepancy, then specification is greatly diminished in value. It's obviously just a best effort to describe the reference implementation, and not a forceful standard.
What if a buffer overflow is discovered in the reference implementation? Everyone must have the same one to be compatible?
Edit: here's the gopher link for it gopher://gopher.quux.org/0/Humor%20and%20Fun/Microsoft_KSH.txt|/MBOX-MESSAGE/1