Microsoft’s latest episode of The .NET Show is largely about the new command shell, MSH (alias Monad), that will debut on Longhorn. It includes powerful scripting facilities and unix-like piping with a twist — instead of text being piped, rich .NET based objects can be piped between commands. The transcript for the show includes instructions on how to get access to download a preview of the shell and the SDK to run on Windows XP.
It only took twenty years to get a decent shell. Oh wait, it’s still not out yet (debuts in (Long)Longhorn). None-the-less, very innovative.
Yet again, Lisp has had this for more than 20 years. Yet again their claims to innovation is false.
Didn’t M$ says that linux (and Unix) is obsolete because it uses “arcane” command line ?!
It appears that M$ is learning from linux… 🙂
Does anyone know if this will run on Windows 2000?
All system admins know that the most powerful tools are in the console. I would love to see a console only version of windows that has many feature but little bloat.
I realize that I can change my default shell to “CMD.EXE” but I like my Blackbox, and good riddence to Explorer shell, and desktop..
I just hate it when “Explorer” crashes and reboots the entire system and desktop.
— iamcanadian
This is snazzy… I wonder how long until something similar is written for Mono…
> I just hate it when “Explorer” crashes and reboots the entire system and desktop.
Have you used an NT or better version of Windows? That really hasn’t been a problem since the 9x Windows. Under the NTs, if it crashes, it just automatically restarts explorer. I’ve never seen it take down the machine.
“Have you used an NT or better version of Windows? That really hasn’t been a problem since the 9x Windows. Under the NTs, if it crashes, it just automatically restarts explorer. I’ve never seen it take down the machine.”
Actually that was the default for XP even. When there was a system error with Explorer the whole machine would reboot. That behaviour can be changed with the proper settings, and I believe through service packs it is disabled by default now, not sure on that though.
I have been wishing MS would expand on the command line for a long time now, when I am using Linux, I miss the superior GUI of windows, when I am in Windows, I miss the superior CLI of Linux. I am still not about to get my hopes up that this will be as useful as your every day standard bash shell though.
The Bash shell is possibly one area where MS would have been smart to adopt OSS, I guess they feared they if their 96% windows user base learned UNIX CLI and shell scripting that the transition from Windows to Linux would be much easier.
RE:[i]I just hate it when “Explorer” crashes and reboots the entire system and desktop.<i/>
So stop using win98, in 2k or XP you can kill explorer in task manager and then run it as a “new task” if you’d like, it won’t take the system with it.
but if you looked at the video, its actually quite cool and nothing to see with bash.
I mean, i’d love if i could output *so* simply my data or *objects* to openoffice/excel for example – that rocks.
It’s not entirely hypocrisy.
While they’re clearly trying to lure *nix sysadmins by subtly painting MSH as being very much like a *nix shell, the “shell” here clearly takes on a more active role, and data is passed not as plain text streams but as objects and such.
For better or worse, this is at least different than (at least the way the vast majority of) *nix shells handle output of programs run from within them.
I have been wishing MS would expand on the command line for a long time now, when I am using Linux, I miss the superior GUI of windows, when I am in Windows, I miss the superior CLI of Linux. I am still not about to get my hopes up that this will be as useful as your every day standard bash shell though.
The Bash shell is possibly one area where MS would have been smart to adopt OSS, I guess they feared they if their 96% windows user base learned UNIX CLI and shell scripting that the transition from Windows to Linux would be much easier.
A number of excellant UNIX and GNU shells already available for Windows, like cygwin, and SFU.
I meant from, not like.
:”I mean, i’d love if i could output *so* simply my data or *objects* to openoffice/excel for example – that rocks.”
its true that MS has done some improvements here but something dbus and newconf could be combined with bash to do something similar.
It includes powerful scripting facilities and unix-like piping with a twist — instead of text being piped, rich .NET based objects can be piped between commands.
[shakes head]
Lawks a massy.
My new kitchen counter includes powerful plumbing facilities and sink-like piping with a twist — instead of water being piped, rich raw sewage can be piped out of the faucet.
I am not jerking you around here. This is all the “power” of Unix without any of the saving elegance. Truly an idea only a marketer could love.
Actually that was the default for XP even. When there was a system error with Explorer the whole machine would reboot. That behaviour can be changed with the proper settings, and I believe through service packs it is disabled by default now, not sure on that though.
I know I’ve never changed a setting to make it restart explorer and as long as I can remember it just does that under XP and 2000. I’ve never seen it reboot unless there was a BSOD which is not the same as explorer dying. I don’t think you saw what you think you saw.
To elucidate Charlie Mac’s comment:
Some Lisp environments (most notably the Lisp Machine), the standard shell was essentially a Lisp interpreter. Instead of writing shell scripts in a one-off, hacky, special-purpose language, your command interpreter used the same powerful general purpose language your apps did, and indeed, essentially the same language that the OS did.
The closest thing you can find on a current OS is probably eshell for emacs (see here: http://www.newartisans.com/johnw/eshell.html). With it, you get access to an elisp-based command line, while also being only a key-combo away from a full CL development environment (assuming you have SLIME or ILISP installed).
Let me clarify my sink analogy.
There are roughly three kinds of apps:
1. Old-school Unix-style scripts
2. Binary desktop apps
3. HTML/XML-based portal apps
These represent roughly the past-to-present, present, and present-to-future of computing, respectively.
Tyes 1 and 3 are primarily plain-text based. Type 2 is primarily binary-based.
New instances of types 1 and 3 are under constant development, because the need for 1 has never gone away and the need for 3 is constantly making itself known. Despite hoopla over OpenOffice and Mozilla, the market for 2 is largely stagnant, saturated, and in the hands of one player (Microsoft).
Plain text is open. Plain text is free. Plain text is clean in its interfaces. Binary formats are obscure, closed, and messy. One must depend upon the graces of their implementors for tools to read them, licenses for those tools, and support when the tools don’t work.
For better or for worse, Microsoft’s future is bound up with binary formats. This is reassuring since they’re not going to go away any time soon. This is scary since it’s clear that in the long term the desktop apps will be defined by plain-text XML files and will spit out plain-text XML files in return.
This command-line binary object passing thing shows the increasingly sophisticated lengths to which Microsoft will go to shore up its binary-format investment. I do not look forward to re-engineering the ugly hacks it’ll produce over the years.
A pipe is a pipe. Does the command shell care if it’s, text, binary data or .net objects it is piping? If so, something went horribly wrong. It’s the programs on both sides of the pipe who must use a format both understand.
Ugly hacks? It seems both elegant and simple to me…
have to admit, microsoft is innovating
How, precisely? Passing objects back and forth in streams? It’s trivial in Lisp or Python, probably in other languages too. Full language as a shell? Nope, that’s not innovative either.
Didn’t M$ says that linux (and Unix) is obsolete because it uses “arcane” command line ?!
It appears that M$ is learning from linux… 🙂
Where? When? In what paper or publication? Prove it. Go get on Google and research your supposed quote to provide us with a link to the original source. If you can’t then you are just guilty of a (quite poor) attempt at spreading FUD. Either that or just making Linux users out to be childish zealots with a chip on their shoulder and an inferiority complex.
If such a stupid statement was true then why has there been a command shell in every version of Windows released?
Does the command shell care if it’s, text, binary data or .net objects it is piping? If so, something went horribly wrong.
Agreed, but:
It’s the programs on both sides of the pipe who must use a format both understand.
Everything understands plain text, or can be made to trivially. Only apps from MS and its licensed partners fully undertand MS’s binary formats.
If I need to query an object, I should to be able to grep it as serialized XML vel sim. Giving me instead some kind of over-engineered binary decoder to do the same job, and a big favor is being done, is absurd.
Telling me I can pipe around objects, with the implicit understanding that I can only pipe them to tools with approved access to the same over-engineered decoder ring, and acting like a big favor is being done, is likewise absurd.
This rich object piping is a feature only insofar as it makes underlying serious misfeatures just barely tolerable.
This rich object piping is a feature only insofar as it makes underlying serious misfeatures just barely tolerable.
Actually, it’s a nifty feature — it’s just not so much a shell feature as a language feature. The shell should just pipe bytes, it doesn’t need to care if those bytes are plain-text or some binary format. Any language worth it’s salt should let you serialize objects to a byte stream. By keeping these features orthogonal, you can have plain-text piped between processes, or fully-serialized objects piped between processes, and everything inbetween.
Where? When? In what paper or publication? Prove it. Go get on Google and research your supposed quote to provide us with a link to the original source. If you can’t then you are just guilty of a (quite poor) attempt at spreading FUD. Either that or just making Linux users out to be childish zealots with a chip on their shoulder and an inferiority complex.
If such a stupid statement was true then why has there been a command shell in every version of Windows released?
Hold on there, hombre. You’re right that it’s not legitimate to say MS is “copying off of” Linux. After all, GNU & Linux “copied” all their stuff off the open Unix standard.
But Microsoft is definitely “copying off of” Unix also. Yes there has been a command line in every version of Windows released. But have you ever tried to do anything complicated with it? The DOS shell was fine when all personal computer systems were single-user and severely limited in disk space, but it has not scaled well at all.
MS is being quite open about the fact that they’re imitating Unix here. In particular, Unix pioneered the use of command-line pipes. Of course the Windows ones are supposed to be “better” than the Unix ones, but the source of inspiration is clear and acknowledged, even if there’s IMHO needless and IMHO potentially harmful functionality tacked on to prove how superior it is over its predecessor.
Sorry, I replied about the wrong thing. Okay, the issue wasn’t MS copying off of Linux, but MS saying that Linux was bad because of the “arcane command line”.
Right, must consume less Jolt.
Anyhow, I don’t specifically remember that insult being slung at Linux, although I wouldn’t be surprised. But, slagging off the “arcane command line” was a huge part of the campaign for Windows 95, when it was directed against – believe it or not – DOS.
You see, even back then, Microsoft’s biggest competition was their existing installed base.
Hi,
Okay, you kinda already replied to yourself (anonymous) before I got a chance =). Although I’m unaware of any media release talking about the “arcane command line”, the marketting line coming out of Redmond since Windows XP has been that the command-line is dead.
Have you ever tried to boot into the command line from WinXP? A lot of people complained when they took out the official support for that. Trust me, working from the command line is sometimes preferable to some bloated, overdone GUI that assumes the user is an idiot (and that applies to another one, starts G, ends in NOME)
Just my 2 cents.
Bye,
Victor
Although I’m unaware of any media release talking about the “arcane command line”, the marketting line coming out of Redmond since Windows XP has been that the command-line is dead.
1995-2004 -> The command line has been dying for almost a decade!
“Anyhow, I don’t specifically remember that insult being slung at Linux, although I wouldn’t be surprised. But, slagging off the “arcane command line” was a huge part of the campaign for Windows 95, when it was directed against – believe it or not – DOS.”
This new MSH is quite different from the previous dos command line – its far more extensible for starters, and has a much looser syntax. The current beta version will accept moving around with either windows or unix style paths, its got aliases for every common unix or windows command i tried, plus heaps more.
One of the features I quite like is its ability to mount just about anything as a “file system”, like it does for ActiveDirectory or the Registry. It’s hardly a new idea, but its a hell of a lot easier to implement it, compared to writing a file system drive in Unix.
Although I’m unaware of any media release talking about the “arcane command line”, the marketting line coming out of Redmond since Windows XP has been that the command-line is dead.
Again, prove it. Post a link to even one add from Microsoft that, either overtly or covertly, impies that command lines are bad. I, for the life of me, can’t recall one television or print add that did so.
People who say Microsoft implies the command line isn’t a useful tool don’t actually bother to do much with Windows, I’m guessing. Not only did they put a DOS compatibility system into the NT based OSes (NT, 2K, XP), but they enhanced the aged batch files with much more powerful .cmd files (although not many people ever used them) and then included the Windows Scripting Host to allow people to script things in a variety of languages (most notably, JavaScript, VBScript, and Perl).
Anyone have a direct link to the wmv
I agree with a few posters that binary piping is a bad idea. With Linux/Unix text piping you can incorporate any command line utilities you wish into a script. With binary piping you can only incorporate programs that have the ability to understand that binary. In order to allow all programs to understand a particular binary you have to add a lot of overhead to each program. You also run the risk of having severe incompatibilities with 3rd party programs. This is not a problem with plain text piping. I can’t imagine MS changing its ways and opening its binary formats to allow 3rd party apps to incorporate MS products via piping. This is a step backward and actually makes the shell less functional.
Again, prove it. Post a link to even one add from Microsoft that, either overtly or covertly, impies that command lines are bad. I, for the life of me, can’t recall one television or print add that did so.
People who say Microsoft implies the command line isn’t a useful tool don’t actually bother to do much with Windows, I’m guessing. Not only did they put a DOS compatibility system into the NT based OSes (NT, 2K, XP), but they enhanced the aged batch files with much more powerful .cmd files (although not many people ever used them) and then included the Windows Scripting Host to allow people to script things in a variety of languages (most notably, JavaScript, VBScript, and Perl).
Well, he is telling the truth. I did remember seeing gates on the news touting how WinXP means the end of the command line and with that he typed ‘exit.’
It was a few years ago.
Once the GUI becomes efficient at certain tasks like administration in general, then maybe the CLI will be useless. But at this point, the command line is just too stinking wonderful.
And doesn’t cygwin get you a shell on windows anyway?
He wasn’t touting an end to the command line in general. He was touting an end to DOS.
As mentioned above, XP still includes a command line (2 in fact, CMD and WMIC), and supports scripting.
Here’s an excerpt from XP’s Launch:
So what pieces have we thrown out here? Well, in fact, in a sense this is the end of an era. Microsoft and the original PC rose to prominence based on the MS-DOS product. And even as Windows came along, Windows 3.1, Windows 95, Windows 98, underneath MS-DOS was running there. Windows simply sat on top of MS-DOS.
Well, so today it really is actually the end of the MS-DOS era. It’s also, we would say, the end of the Windows 95 era. That was the most important Windows milestone up to this day. And even when we did that launch we talked about that the Windows 95 era would come to an end. Let me show you a little clip from the Windows 95 launch.
(Begin video clip.)
BILL GATES: I get interviewed a lot. People say, “Well, you know, isn’t this a huge problem between you and Apple that you’ve got this Windows 95 thing?” And I say, “No, we’re really coming together, because until today only Apple thought Windows 3.1 was a crummy operating system. And now we agree, Windows 3.1 is a crummy operating system.” (Cheers, applause.) And some day we’ll say that about Windows 95 I’m afraid. (Laughter.) But give us two or three years before we can figure out why we’re going to have to say that. (Laughter.)
(End video clip.)
(Applause.)
BILL GATES: Well, it took more like six years, but certainly our users gave us a lot of reasons to say that Windows 95 simply isn’t good enough.
Well, let me herald the end of the DOS era here. I’ll just simply type “exit” for the last time in MS-DOS. (Laughter, applause.)
MS-DOS: Excuse me, Bill?
BILL GATES: Yes, DOS?
MS-DOS: Bill, I brought you the PC. I helped make Windows. And I’m running over 400 million PCs today. You aren’t going to do this, are you, Bill?
BILL GATES: Sorry, DOS.
(Laughter, cheers, applause.)
BILL GATES: Well, that movie wasn’t called 2001 for nothing. (Laughter.)
http://www.microsoft.com/billgates/speeches/2001/10-25winxplaunch.a…
Really. Like I have said mant times before, ‘plain’ text is just a pain in the arse. You have to cobble together horrible, horrible hacks with perl or those weird programs like grep, awk, etc. to make use of the arbitrary output formats of various Unix programs. It is simply a complete waste of (my and the CPU’s) time converting to ASCII and back again. Not what I call ‘elegant’.
Similarly it is COMPLETELY BRAINDEAD to start a whole new process, complete with its own virtual address space and open file table, just to do some quick and trivial processing. Pipes… don’t get me started on pipes. (As you can see, I hate Unix-style shells 🙂
As for this MSH, I will have to wait for the video to download before I comment…
Have you ever tried to boot into the command line from WinXP?
You can install the command console. It is basically CMD with no graphics (it is not DOS). I don’t know if you can run normal programs from it. Last time I tried it, it kept saying ‘access denied’ when I tried to ‘cd’ 🙁
How, precisely? Passing objects back and forth in streams? It’s trivial in Lisp or Python, probably in other languages too. Full language as a shell? Nope, that’s not innovative either.
So you are telling me I can open a command prompt on windows right now and do all the things they are demoing with Lisp or Python on windows today ? Well color me pink. I had no idea.
“I agree with a few posters that binary piping is a bad idea. With Linux/Unix text piping you can incorporate any command line utilities you wish into a script. With binary piping you can only incorporate programs that have the ability to understand that binary. In order to allow all programs to understand a particular binary you have to add a lot of overhead to each program. You also run the risk of having severe incompatibilities with 3rd party programs. This is not a problem with plain text piping. I can’t imagine MS changing its ways and opening its binary formats to allow 3rd party apps to incorporate MS products via piping. This is a step backward and actually makes the shell less functional.”
All third party applications need to do to be compatible is use the .NET framework – its that simple. The framework for the command shell is completely extensible, anyone at all can use it to write their own command shell compatible apps.
Binary transfers may make cross platform compatibility more difficult, but Microsoft DO NOT have any obligation to make it easier for their competitors at the cost of functionality. As others have said, passing data via text is an absolute pain in the arse to handle, requiring the use of awful tools like awk and sed. This functionality allows data to be directly passed between apps, no conversions.
Having said that, I’d be surprised if its not somehow possible for the objects to be serialized to XML, considering that the .NET framework already has integrated XML support for serialization. This would allow any applications at all, regardless of whether or not they were written in .NET to interact with other apps.
I’ve just read through the documentation that comes with the SDK, it states that XML Serialization is used for passing data between MSH apps in the context of remoting, even if it isn’t implement by microsoft, it should be trivial to enable most MSH apps to support it as well for their output.
Even without this serialization, all of the commands have the ability to do normal console output, there’s no reason a non-MSH app wouldn’t be able to use this just like it can use regular console text output.
It is not better or worse than text stream shells, it is MORE than them. You get structured data (reflection of objects) to manipulate, somewhat similar to database queries, while universality of plain text is only good if you treat your data as arbitary character sequence, otherwise it is parsed somewhere to manually [re]create structure.
It is interesting to note that such an enviroment may potentially benefit from different interface concepts than traditional console shell.
“One of the features I quite like is its ability to mount just about anything as a “file system”, like it does for ActiveDirectory or the Registry. It’s hardly a new idea, but its a hell of a lot easier to implement it, compared to writing a file system drive in Unix.”
Ok, so we’ve established working with files is a good thing (everything is a file, part of the unix mantra). To use a file system under Windows, even with MSH, you still need a driver to access it. Writing a driver for windows is, to my knowledge, no harder or easier than writing a driver for Unix. I fail to see how the standard, make everything appear as a file is easier under MSH than Linux or any other Unix for that matter.
BTW, Unix’s “registry” is already a file, or rather a bunch of files under /etc and ~/.*. Except in AIX, because parts of AIX are really f**cked up.
You know what it would be funny? If the open source community releases something equivelent to Monad before even Microsoft releases Monad
Binary transfers may make cross platform compatibility more difficult, but Microsoft DO NOT have any obligation to make it easier for their competitors at the cost of functionality.
Since most shops are heterogeneous environments, loss of cross-platform interoperability would be a loss of functionality.
Having said that, I’d be surprised if its not somehow possible for the objects to be serialized to XML, considering that the .NET framework already has integrated XML support for serialization. This would allow any applications at all, regardless of whether or not they were written in .NET to interact with other apps.
Oh, I wouldn’t be surprised at all. But I’m wary of MS XML. The new .DOC -> .XML export (which only works on the Professional edition anyway) does not contain any presentation information. Which for a WYSIWYG document is really part of the crucial data.
I’d expect object serialization XML to be similarly crippled.
Really. Like I have said mant times before, ‘plain’ text is just a pain in the arse. You have to cobble together horrible, horrible hacks with perl or those weird programs like grep, awk, etc. to make use of the arbitrary output formats of various Unix programs. It is simply a complete waste of (my and the CPU’s) time converting to ASCII and back again. Not what I call ‘elegant’.(
Who said you have to use ascii/human readible formats in pipelines or other ipc? Never has been a requirement, never will.
Sure, it is a pain manipulating data in the middle of a command chain. You (the one inserting the manipulation) have to understand & deal with the possible input formats and acceptable output formats.
But that has nothing to do with whether the data is in human readable form or not. Passing intermediate data around in human readible form by convention makes it much more transparent & easier to work with for the programmer who follows you.
Yes, xforms from arbitrary/undocumented text through grep/awk/perl/whatever to arbitrary text may be ugly. But trying to fudge from some arbitrary/undocumented binary structure to another is even uglier. No one ever said mashalling to ascii was elegant, just practical.
Of course, that argument goes away if all your programs, and all the programs which could ever talk to it, and all the programs which it could ever talk to use well documented and extensible apis so you never have to peek under the hood.
The binary vs ascii format as a sideways method of api (hence vendor) lock-in is a different animal and I land squarely on the side of ascii as a user.
Similarly it is COMPLETELY BRAINDEAD to start a whole new process, complete with its own virtual address space and open file table, just to do some quick and trivial processing. Pipes… don’t get me started on pipes. (As you can see, I hate Unix-style shells 🙂
Now, you might just be trolling Typing ‘|’ is hardly any work at all, for both you and what you’re telling Unix to do. Process creation is cheap in Unix, unlike real life.
And quick and dirty processing is what made Unix and its shells and pipelines take off in the first place. It’s really very good at making you good at it.
As for this MSH, I will have to wait for the video to download before I comment…
Yup.
Have you ever tried to boot into the command line from WinXP?
You can install the command console. It is basically CMD with no graphics (it is not DOS). I don’t know if you can run normal programs from it. Last time I tried it, it kept saying ‘access denied’ when I tried to ‘cd’ 🙁
Sadly, have had the same experiences with 2000 and XP. The recovery console seems to be useless even for recovery.
“Ok, so we’ve established working with files is a good thing (everything is a file, part of the unix mantra). To use a file system under Windows, even with MSH, you still need a driver to access it. Writing a driver for windows is, to my knowledge, no harder or easier than writing a driver for Unix. I fail to see how the standard, make everything appear as a file is easier under MSH than Linux or any other Unix for that matter.
BTW, Unix’s “registry” is already a file, or rather a bunch of files under /etc and ~/.*. Except in AIX, because parts of AIX are really f**cked up.”
Actually, It doesn’t use a file-system driver to mount the drives, it uses a “provider” class, written in .net. There’s a basic example with the MSH SDK, it’s actually pretty simple to code for.
The recovery console seems to be useless even for recovery.
Yep, only used for fixmbr, and as I’m weaning off Windows, that one goes away too.
.. they replaced it with vim 🙂 (watch 00:57-00:58)
“Oh, I wouldn’t be surprised at all. But I’m wary of MS XML. The new .DOC -> .XML export (which only works on the Professional edition anyway) does not contain any presentation information. Which for a WYSIWYG document is really part of the crucial data.
I’d expect object serialization XML to be similarly crippled.”
Come on, this is not only FUD, it is just plain wrong.
Firstly, I don’t know how you were saving the document as XML, but for me (using Microsoft Word 2003), When I go Save As, and set the format to XML, then open the document in either Word or IE, the result is a document identical to my original. I’ve tried it with a number of documents (ranging from a newsletter page to a several thousand word essay), and they all worked fine. How were you saving it that you didn’t get a proper document?
Secondly, .NET’s XML serialization format fully serializes the entire state of an object, just like any other sort of serialization. It’s a working, fully functional protocol – it’s the main method of .NET object serialization over a network. .NET’s XML is a completely separate implementation to the one used in Office.
ewinemiller
Hello?
Windows explorer has crashed on me MANY times under win2k and XP.
And no, I wasn’t in fact witnessing a BSOD. FIrst explorer starts behaving strangely, then blip! Restart.
Everyone I work with has had thus happen too.
Been using windows long?
That’s one thing I like about OSX. You can restart the finder 99% if the time. It’s just another app.
That isn’t just an explorer crash. Explorer is also “just another app” and can be restarted if it crashes w/o restarting the OS. Whatever is affecting the computer may cause explorer to crash or act wierd, but explorer isn’t taking down the OS and causing the reboot.
By default, XP is set to reboot whenever a BSOD occurs. Whatever is causing explorer to mess up (likely graphics card drivers or an explorer add-in) is ultimately causing a BSOD which is why the computer reboots.
Also, if you aren’t behind a firewall or using AV, you could have a badly coded trojan/worm that kills necessary system processes in addition to explorer and causes the reboot. It could also be a badly coded commercial app that does the same thing, or a hardware issue (bad memory, too much heat, loose add-in card, etc.).
Getting away for a moment from the basic argument of whether it’s good or bad or whether it’s new or old…
I’m fairly familiar with piping commands, and I (think I) understand the implications of object/binary piping, but… What’s it for? I mean in a practical day to day situation.
Reinventing parts of the wheel. Jolly good show:-)
“I’m fairly familiar with piping commands, and I (think I) understand the implications of object/binary piping, but… What’s it for? I mean in a practical day to day situation.”
A decent command line’s a damned handy thing to have in a system, something like this can be of immense value in day to day operations…..
The main use, however, for this implementation, is as an admin tool. In a networked situation, its still immensely useful to be able to script things to run at logon, a better command shell environment helps greatly in this regard. Plus, often command line tools are of great use in just regular configuration and admining of a machine. We all know just how useful ping can be, and I can’t count the number of times i’ve used ipconfig /all to check network settings. A better command line environment (which is easily extensible, as this one is), can make a world of difference.
Ok, I may have been trolling a bit, that was not necessary 😉 That’s what I think sometimes though… Ignore my late-night posting.
The kind of shell I would like already exists in certain forms, e.g. Python. It doesn’t have to convert or pipe since it is all in the same object format and heap area. But I am being a bit hypocritical since Python is really inefficient anyway (but in different ways than a shell) 🙂
With the MS shell you’ll be able to do things like:
get-process | where-object “handlecount -gt 400” | format-list
Also they seem to be planning to map teh whole registry to a drive:
HKLM:/system> cd “CurrentControlSetControlSession Manager”
Or even interact with the active directory:
new-drive -Name Fabrikam -Provider AD -Root DAP://hr.fabrikam.com -username “hrjsmith” -password “secret!@~~”
MSH Fabrikam: > get-children -Filter “(anr=40/*)” –Recurse true | format-table Name, Title, TelephoneNumber
(BTW, for those who wonder, those examples were from a MSH preview document that a MVP/MS beta tester leaked on a newsgroup)
etc etc etc. Don’t ask me, but this seems *powerful*, and while this doesn’t replace text-based shells, it looks like they complement it, I’ll have to admit it that Microsoft is *innovating* here. Unix has been working with bash-alike shells for 30 years. It’s a shame that the obsession for using those shells and not breaking scripts has stopped the innovation on them. Yes, there’s python and all, but can I use it as a shell instead of a script engine?
>For better or for worse, Microsoft’s future is bound up >with binary formats. This is reassuring since they’re not >going to go away any time soon. This is scary since it’s >clear that in the long term the desktop apps will be >defined by plain-text XML files and will spit out plain->text XML files in return
Not true. IIS 6 stores it’s config in XML files. The old binary repo from IIS 5 is gone. .net stores app settings in XML files, the registry is deemphasized. MS finally has realized the issues with binary formats (hard to back up, check into source control, etc)
So you are telling me I can open a command prompt on windows right now and do all the things they are demoing with Lisp or Python on windows today ? Well color me pink. I had no idea.
On Windows, the capability is all there, but it doesn’t come pre-canned like MSH. On the Lisp machines, this functionality came pre-canned, just like MSH. Even the process model was very similar. Both MSH and the Lisp machine shell work by loading modules (.NET shared libraries for MSH, Lisp definitions for the LispM) into the shell. Making a Windows-only version of a mature and well understood technology is hardly innovative. Useful, yes, but not innovative.
Damn,I can’t see the show with firefox 0.9.And I don’t have netscape either…
I just don’t see how adding the ability to read and write a binary format into every application is a viable solution. It’s too much overhead and there is so much room for mistakes.
Again, prove it. Post a link to even one add from Microsoft that, either overtly or covertly, impies that command lines are bad. I, for the life of me, can’t recall one television or print add that did so.
You’re so full of shite my friend.And hypocrite too.Of course MS will never say something like that.But all those great OS reviews,previews and so on said,and they are still saying : Linux sucks because is a command line OS. MS funded previews without any doubts.I’m glad that we can have a real shell(if it will ever happen) in Windows.I preffer that one to many gui apps.Bottom line,stop being hypocrite.And to cut the crap , I will ask you : prove that MS never said so!.Prove it! If you can.
I would love to see a console only version of windows that has many feature but little bloat.
That is funny, use Linux man.
” Actually that was the default for XP even. When there was a system error with Explorer the whole machine would reboot. That behaviour can be changed with the proper settings, and I believe through service packs it is disabled by default now, not sure on that though. ”
Actually the default was if there was a core system error such as a Driver conflict that the entire machine would reboot, not necessarily applications. I have had my explorer crash and it wouldnt reboot the system and mines is set to reboot. I have had many applications crash on Windows XP and it doesnt bring down the system.
So who asked for this feature? To me this sounds more like a feature dreamt up by marketeers than one requested by users.
On Linux there was an effort to rewrite basic utilities (ls, grep, et al) to use XML instead of plain text. I lost the link though. Basically that way you can pipe objects too – serialized as XML.
Why is it that people are having such a hard time accepting the fact that microsoft are doing something good, not just for Microsofties, but for everyone who has to use Windows to do something useful.
Not only is this not vaporware (you can get it now), but it’s probably one of the few things I’ve seen to do with the .Net framework that actually seeks to help end-users, not just developers. It’s things like this that make it seem like .Net is not just so much hype about a Java replacement.
Regardless of the merits of the system of object piping, it is definitely an improvement over CMD.EXE, even if it’s not as mature as bash or tcsh in it’s user interaction. It seems to me to be a reasonably innovative combination of ideas even if none of the ideas are actually new.
It’s nice to see Microsoft not just blindly cloning something, and combines Microsoft’s staples of vendor lock-in and proprietary language with an actual improvement in the operating system. It’s nice to see them paying some attention to the neglected command line that’s barely changed since DOS 3.
In case anyone is wondering, I’m a dyed in the wool Unix-geek with ne’er a nice thing to say about Microsoft. For once they’re doing the right thing by their users (even if it’s not nice to competitors), and no-one wants to say anything nice about them.
To the Unix zealots saying this is a copy of such-and-such shell: I’ve been using Unix a long time and have never seen anything that promises to what this shell can if .Net proves to be as popular as MS wants it to be.
To the MS zealots saying this is nothing new: CMD.EXE doesn’t cut it boys and girls. It was a bad clone of a bad Unix shell back in 1984 or whenever DOS sprouted heirarchical directories and text-piping and it hasn’t improved since. It’s about time Microsoft recognised that there are still a lot of people working hard on command-line tools for Windows and gave their admins a break. That’s what this will be in 2020 when all the features promised in Longhorn finally make it to market, and .Net has decent take-up.
Abraxas, you should watch the video. (There’s a transcript attached to the video that also includes inline code snippets, so you can read through it even if you have a low-bandwidth connection.)
The whole point is that not only do you not have to write binary parsing logic, you don’t have to write TEXT parsing logic either.
It’s all done using .NET reflection: runtime discovery of which methods and properties the object exposes. This means someone writing a new command (commandlet) can focus on the logic and doesn’t have to be concerned with parsing the input, parsing arguments, or even producing text output. Because of this, command A can manipulate the objects returned from command B, even though B was written after A, and A has no explicit knowledge of B or B’s objects or output format.
As an example, they talk about getting a list of processes with more than 500 open handles. In unix, you could do “ps” with some flags and then scrape the output for what you’re looking for. In Monad you can simply say:
get-ps1 | where { $_.handlecount -gt 500 }
where “handlecount” is a property of a process object, discovered at runtime. Now, let’s say you want to sort the list. In unix, this means more text manipulation headaches (or, hope the ps command has sorting options). In Monad, the list itself is an object that can be trivially processed by another commandlet:
get-ps1 | where { $_.handlecount -gt 500 } | sort handlecount
Read the transcript for more. I hope this gives you a taste of what it can do. I use ‘eshell’ in emacs as my primary shell — the combination of lisp with a traditional command line made it the most innovative (yet still very practical and usable) shell I knew of until I saw Monad. bash, tcsh, and friends are left in the dust (where cmd.exe has been for a while now, admittedly).
It seems to me to be a reasonably innovative combination of ideas even if none of the ideas are actually new.
There was a debate awhile back whether a combination of un-innovative ideas could still be innovative. I reject that theory, but even if you accept it, MSH is *still* uninnovative. Let’s take a look at the key features of MSH:
1) Commands are extensions written in the same language as the rest of the OS.
2) Arbitrary piping of objects between commands.
3) Powerful scripting support using the same (or very similar) language as the rest of the OS.
You just described a Lisp machine! If you remove the first requirement, you just described eshell, IPython, scsh, etc, too!
Now, undoubtedly, as you say, “microsoft [is] doing something good.” Way-to-go MS for having the guts to make a shell that using a *real* programming language, instead of some POS special-purpose hack-job like most UNIX shells. MSH is undoubtedly a good thing, and I hope it encourages some improvements in *NIX shells.
*However*, I am sick and tired of people using “innovative” as just another word for “good” or “cool.” I find Microsoft’s marketing department to be supremely arrogant in claiming that something like MSH is something new and innovative, when it is not, and believe that their claims are an offense to those true innovators that came before them. MSH will probably make Microsoft more money than the Lisp machines ever made their creators, but at least have the decency to give them the credit they deserve!
Wow, besides the fact that after 20 years of ‘innovation’, they are going to re-invent the wheel once again. It reminds me why my startup logo is “windows nt: neaderthal technology, me make fire, invent wheel, build server”.
Anyways. After reading the M$ article a week ago about the internal power struggles inside redmond, it is becoming very very clear that the MSDN internal publishing house has teamed with the evil-marketing department big time. Every article i read nowadays is ‘long horn is going to have this feature’ – which is incompadible and you will need to buy a new computer/licence for it, or ‘new security hole threatens then takes down internet’.
2 extremes. 1 company. I guess announcing future products is the only good news for micro$ nowadays…
However, what make *nix shell superior is not just the shell features; it is the bloat load of cmdline tools that are all written with pipe/script in mind. In *nix you can assembly gadgets into a full feature tool very easily with the shell.
Windows programs are never writtened with pipe/redirection etc in mind. They are always monolithic in design and this make them hard to script with if possible at all. I hope with this new decent shell, windows devels will start making scriptable components. Otherwise with a empty shell and some unco-operative gadgets, it is not goging to bring you much farther then the current cmd.exe
For sure many software pieces have to be rewritten, but I believe MS will deliver a huge amount of new compatible tools.
Finally Microsoft Understood that the most powerful tool in and OS is the shell and not its GUI. GUI may be great for Joe and Jane, but for Advance Users it is always the Console/Shell that Stood the test of time. Introducting Piping with object will definitely edge out the rivals in this copy-cat game.
I just install Cygwin (www.cygwin.com) and have a good shell, since about NT 4…
And you can “pass around objects” using a regular UNIX shell, and probably the same way this “innovative” new shell is going to do it… marshall the object into XML, pipe it, recreate it from the XML.
– chrish
KDE has a project going… trying to create a glue like program that can easily allow construction of graphical front ends to non graphical back ends, based on DCOP.
Flexible enough that the programming language your program is written in will still interface correctly.
This killer – app is kommander.
you rule ;P
What about the security issue here? You thought the VB scripts were bad? How about some .NET command-line script kiddies? That’s just what the world needs.
Well, I ‘m actually dreaming of the day when Lisp and Smalltalk ideas will rule the software industry. All apps will be written in a language serving both for programming and scripting. Full runtime introspection of software allowing on-the-fly recompiling, tweaking, of every single piece of the code of the whole computer. All software living in a common object system suppressing the mere concept of hand writing serialisation of objects down to XML schemas to pipe them in byte flows.
As a natural falloff, monolithic apps like Word, Excel, Outlook, Powerpoint, OpenOffice suite, … would disappear … Do you really think Microsoft is going there ?
All the ‘innovations’ cited here are already around ( for example, try the free Squeak Smalltalk engine ). IMHO, they didn’t won 20 years ago because computers were not powerful enough and more hackish languages ( e.g. C++ ) were needed for half baked object systems. It’s not the case anymore. We can now get the real stuff.
Why does not Open Source developpers works toward that holy grail instead of copying Microsoft pseudo-innovations ( like .NET ) still screws me. Be reasonable, change the world ! ( Well, I’m collaborating that way, on my humble level and slow pace. )
hm,
i dont think it wood be so usefull as in linux.
win users will not use command line, they like their XP GUI, why they will learn something like *nix arcane console =]
What I meant was not ‘What’s a command line for?’ but ‘What’s binary piping for?’.
Most people see the similarities between Monad and UNIX shells. That’s pretty obvious. Most of the people on the team are long time, hard-core UNIX nerds.
I’m delighted to see that people on this thread see some of the similarities with LISP. This is less obvious and in a number of ways, more interesting. More people will see this connection in the upcoming code drop (end of July) where we use lambda’s to a much greater degree. (for instance we have a pipeline flavor of “foreach” and now WHERE takes a lambda instead of a query expression)
blah blah | foreach {$_.Name }
blah blah |where { $_.Handlecount -ge 500 }
).
Both UNIX and LISP are wonderful environments. That said, there are other wonderful environments that deserve our respect and admiration. In particular the folks that developed VMS DCL and the AS400 CL environments deserve a big salute from the industry. These guys really focused on production oriented environments. The both provided a single common parser for all commands, provided very strong naming guidelines, used consistent error messages, had features that where friendly to operators, etc.
While all of these are great environments, the core Monad concept came from my work with WMIC. WMIC is a command line tool for WMI. Because WMI provides a uniform way to get at objects, their properties and methods, it allowed us to write a common command line to to access and manipulate any object. We then transformed the object into XML and were able to do a series of XSLT transforms on the XML resulting in mind-boggling power and functionality. The problem however was WMI. WMI is great but difficult and fundamentally a management technology which limits it’s adoption. When I learned .NET and explored reflection, I realized that I could do the same thing leveraging a mainstream technology that the company was betting the future upon.
There has been a lot of discussion around the “object pipeline”. What is really going on there is that we have pipelines of “adapter objects” which allow an ecosystem of commands to be written that can act upon: .NET objects, ADO data tables, XML data, ADSI objects, WMI objects, CSV files, etc. What is really going on when you type “A | B | C” is that we are creating a dataflow engine under the covers. “A” runs and when it emits data, we look at the data requirements of “B” and the engine does whatever conversions and coercions are required to meet it’s requirements and then “B” is invoked. That topic really deserves a couple dozen pages of explaination but my real point is that we are trying to be very open and accomodating about helping you get your job done no matter what form you have your data in.
BTW – the pipeline deals with classic text-based pipelines a first class citizens. The release on http://betaplace was focused on the SDK and the APIs to develop Cmdlets so this isn’t obvious. It should be much more evident in the next release but we still have more work to do.
I would like to extend a invitation to join our beta test to anyone intersted in kicking the tires. This list clearly has some smart folks on it that are not hesitant to speak their mind. I would love to have you get educated on what we are really doing and get your opinions. I think we have a pretty good idea of what we are doing right, what I need is some smart skeptics that can tell me where we are messing up and where we can improve. We have some time to get this right for V1.0. If you are interested, please sign up at http://betaplace.com . You’ll need a passport account (groan) and then sign up as “mshPDC” (case matters). It usually takes 24-48 hours to get an account but we’ve had quite a few new requests latey so please be patient if it takes a bit longer.
Jeffrey P. Snover
Monad Architect
(And now for the traditional legal stuff…This posting is provided “AS IS”, with no warranties, and confers no rights.)