Hacker News new | past | comments | ask | show | jobs | submit login
It's easier to port a shell than a shell script (quux.org)
65 points by lpgauth on Aug 9, 2010 | hide | past | favorite | 16 comments



Something similar has happened to me before. I was sitting in the audience of a talk, and the speaker said something blatantly wrong about something I had worked on, so I asked them to clarify, and they responded with something like "they did such and such", which was also wrong, so I said something to the effect of "well, 'they' is 'me' and you're wrong because blah blah". They didn't have much to say after that.


The story reminded me of an analogous experience I had some years ago. A client asked me to help negotiate a software license agreement drafted by the other side’s lawyer. I saw that the other lawyer had selectively copied and edited a set of model software license provisions developed by an ABA committee. It amused my client when, on the negotiation conference call, I pointed out to the other lawyer that he had left out certain language that had been included in the model provisions to make them a reasonable compromise on the issue in question. The other lawyer was a bit discomfited when he realized that I was the lead author of the model provisions and the chairman of the drafting committee. (This actually happened twice, in the space of just a few days, for two different clients.)


I hate to send people email out of the blue so I'm just asking permission first - can I email you for a career advice question?


Sure - sorry it's taken so long to respond, I haven't looked at this post in awhile.


It is rather hilarious. I have similar situations more than too often when some of my students will argue with me that it is not possible to do something, even after they just received indisputable proof that it just happened.

I usually try to humbly explain why they were wrong in that case(usually some misconceptions on how something works), which will usually reduce the amount of future arguments regarding the material presented. While patronizing will usually just make them try to prove themselves more often , and catch you in the nuances of a subject.

In this case it doesn't surprise me that Microsoft was (again) caught trying to redefine standards based on their own perception of those standards.


> [...] Microsoft was (again) caught trying to redefine standards based on their own perception of those standards.

Or, more simply and less nefariously. They put a management droid on stage. The person answering the questions likely wasn't aware of the nuances in ksh implementations. Hey's just the Microsoft equivalent of a used car salesman.


Incidentally, Microsoft abandoned MKS almost immediately. They bought Interix very soon after. Interix implemented UNIX system calls natively, so it always came with traditional, useful shells. It's now bundled into Windows as a free product: Subsystem for Unix Application (SUA) or Services For UNIX (SFU).

Last I checked, you could still buy MKS Toolkit from MKS, but I have no idea why you would want to.


How does it compare with cygwin? Can I fire up bash with SUA?


It's been a while since I played with Services-For-Unix, but I recall it's better than Cygwin in that it's not a POSIX shim sitting on top of Win32, but actually sits beside Win32 on top of the NT kernel (which was always designed to support POSIX to some degree). It integrates the POSIX notion of user IDs with ActiveDirectory, etc.

Where it all falls down, of course, is the usual bane of proprietary unicies - packaging. I think there's a 'freeware' site with tarballs of various useful tools you can download, but nothing approaching even Cygwin's small and limited packaging and upgrade system, let alone a real distro like Debian.


It's much, much faster than Cygwin. Yes, it comes with most of the common shells out of the box: bash, ksh, etc. Even sets up start menu shortcuts for each, to encourage you to dip your toe in the water.

Most of the user-space tools are based on OpenBSD userland rather than GNU utilities. Like Cygwin, it uses PE-COFF for binaries. It comes with both real GCC and a GCC-like wrapper for MSVC so that you can attempt to build software without modifying existing build files.

Unfortunately, software compatibility isn't great. It's not that SUA/SFU is a bad implementation of UNIX, it's just that we live in a world where "everything is Linux." Building things on SUA/SFU really sucks, just like it sucks to build software on any other niche UNIX. (AIX, HP-UX, etc)


Microsoft bashing seems so dated now. Poor MS. Had no idea how to build a decent shell.


They should have ported the standard shell, /bin/sh, which is still used for executing most scripts (via the #!/bin/sh shebang at the top of the script), independent of what shell the user uses interactively.


Right, that's part of 'worse is better'. Easier to build the system, harder to program well on it.

EDIT: I wrote that before reading. The title isn't very relevant to the post.


Is this down or is port 70 being blocked by my firewall? Why not run on the proper port!?


Because it's actually a gopher server that understands HTTP. You can also get to the page at gopher://gopher.quux.org/0/Humor%20and%20Fun/Microsoft_KSH.txt|/MBOX-MESSAGE/1


Didn't work for me. However the Almighty Google found this which appears to be the same thing: http://www.reddit.com/r/programming/comments/cyojx/its_easie...




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: