Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Windows Operating Systems Software

Microsoft's new CLI 688

An anonymous reader writes "Months ago a story ran regarding a job advert at Microsoft for a developer role to lead the work on a new generation of command line interface. It has now been disclosed at the PDC and its name is MSH (Microsoft SHell), codenamed MONAD. Here is the best description so far."
This discussion has been archived. No new comments can be posted.

Microsoft's new CLI

Comments Filter:
  • 3 months... (Score:5, Interesting)

    by heironymouscoward ( 683461 ) <heironymouscowar ... .com minus punct> on Friday October 31, 2003 @10:38AM (#7357621) Journal
    ...that's the time before we get the first MSH viruses.

    Am I being cynical when I think this just looks like VB for Consoles?
  • by Alranor ( 472986 ) on Friday October 31, 2003 @10:41AM (#7357657)
    From the comments after the linked article :-

    Finally a real Next Gen command shell... And one that looks to put the others to shame.

    Nice leep frog MS...


    Can anyone who knows more about these things than I explain exactly how this puts the various Unix shells to shame?
  • by Gago ( 720274 ) on Friday October 31, 2003 @10:41AM (#7357659)
    Yet another feature ....
    The only thing that I would find revelant is that MS is definitly thinking in terms of "they have neat shells in Linux, how can we have something that stands the comparison ?". After Apple including KHTML and GNU parts in its operating system, it seems that Free Software are really getting the lead in software industry.
  • by thoolihan ( 611712 ) on Friday October 31, 2003 @10:41AM (#7357662) Homepage
    It's interesting how the story changes. Ballmer would refer to GNU/Linux(especially elements like the use of the shell) as 1980's technology. Now there are making their own.

    Maybe users will be able to help themself a little bit...
    killall DRM && killall clippy && killall klez
    -t
  • by Verteiron ( 224042 ) * on Friday October 31, 2003 @10:42AM (#7357665) Homepage
    From the article:

    One last thing: anything can be mapped to a drive, and drives don't just have to be letters. (Ok, I lied - that was 2) The example I was shown was that the registry was mapped to a drive, and you could navigate it like any other drive, with the results being returned from the commandlet as .NET objects!

    The user has been able to map a filesystem to a folder rather than a drive letter since at least Windows 2000, and I think it was possible even under NT4. Nothing new there.

    The registry (along with many other things) can be mapped as part of the filesystem fairly easily, as demonstrated by this 264kB DLL file [regxplor.com].

    And as for returning search results as .NET objects? This seems rather like using a baseball bat to swat a fly...
  • Perl (Score:3, Interesting)

    by martin ( 1336 ) <<maxsec> <at> <gmail.com>> on Friday October 31, 2003 @10:46AM (#7357716) Journal
    Most M$ admins I know (and they started out as *nix admins) use perl for their scripting on both O/S's.

    Will be interesting to see how the GUI generation get on with a proper scritping language.
  • by stratjakt ( 596332 ) on Friday October 31, 2003 @10:47AM (#7357733) Journal
    You can do WinFS filtering through the "|" symbol. MONAD can also export natively to: HTML, XML, Excel, or plain command text in either a Table or List format.

    Sure beats the hell out of using obscure grep commands to parse a blob of ascii.

    And....the commandlets are developer friendly. You can make a commandlet by inheriting from the commandlet base class, and adding attribute tags to the public properties to make them parameters to the commandlet. .NET handles whether the user types "-?" or "/?", so you don't have to care anymore!

    Sounds pretty easy for a developer to extend.

    This is a good thing for MS to do. The slashbots are always whining about how MS takes standards and breaks them for it's own gain. Rather than taint your precious bash or perl, they started from scratch.
  • MONAD (Score:1, Interesting)

    by OneSmartFellow ( 716217 ) on Friday October 31, 2003 @10:47AM (#7357740)
    is already a computing term

    http://www.abercrombiegroup.co.uk/~noel/research/m onads.html

    Is already a mathematical term

    http://mathworld.wolfram.com/Monad.html

    and who knows what else, surprised MS didn't choose another word they could Copyright, and TradeMark

  • by Raedwald ( 567500 ) on Friday October 31, 2003 @10:47AM (#7357741)

    'Monads' are part of Leibnitz's philosophy [www.ucd.ie], which Voltaire [lucidcafe.com] famously satirised in Candide [literature.org] with the figure of Dr. Pangloss, who resolutely maintained that we live in 'this, the best of all possible worlds' despite a succession of disasters that would convince any sane man that he was wrong.

    How very suitable for a Microsoft product.

  • by obfuscated ( 258084 ) on Friday October 31, 2003 @10:48AM (#7357742) Homepage
    It's only a matter of time until some thoughtful person writes enough scripts to make MSH operate like Bash.
  • by mcbunny29 ( 583989 ) on Friday October 31, 2003 @10:49AM (#7357761)

    Why not simply use bash under Cygwin to get all the functionality of a decent shell?

    Who need's another shell?

    Or maybe MS could natively support unix bash under Windows.

  • by Qzukk ( 229616 ) on Friday October 31, 2003 @10:51AM (#7357773) Journal
    For a long time, the windows command line was a joke. It was basically DOS-in-a-box, capable of running programs, and that was about it. Sure, you had net.exe and a few tools borrowed from the unix world.

    Recently, Microsoft has actually begun to produce command line tools for system operations, controlling your services, networks, policies, and registry from the command prompt. But they still have a long way to go, these features are poorly documented (the policy editor's help lists a subset of all the policies you can edit with it. The KB article on it basically is a copy-paste of the help message, with explanations of the policynames provided), typically cryptic, and still don't provide the full set of features.

    They may have come a long way, but they have a long way to go. And remember, this is just playing catchup.
  • by ezavada ( 91752 ) on Friday October 31, 2003 @10:51AM (#7357775)
    Microsoft is the only major OS that doesn't have a standard *nix style shell. The popularity of cygwin for Windows developers shows that there's significant demand for it. Imagine how much nicer it would be if instead of trying to "leep frog"[sic] the Unix shell they just adopted cygwin.
  • Re:Very Nice (Score:2, Interesting)

    by ElectronicElf ( 710528 ) on Friday October 31, 2003 @10:55AM (#7357814)
    The part that scared me is:

    The example I was shown was that the registry was mapped to a drive, and you could navigate it like any other drive, with the results being returned from the commandlet as .NET objects!

    Just what is needed, an easier way to corrupt the registry.
  • by Ars-Fartsica ( 166957 ) on Friday October 31, 2003 @11:08AM (#7357938)
    ...if people would be willing to drop sh/bash etc and adopt a more compelling, orthogonal approach like psh (perl shell) or something entirely new.

    I don't know why more people don't actively pursue a modern language for the shell interface. sh script syntax is tortorous. So much easier and maintainable to write perl scripts. So why not use perl from the command line??

    psh never really seemed to take off but it let you basically enter a perl debugging session but execute shell commands also. This would basically trump anything msh could muster and also provide the entire universe of CPAN to the shell.

    sh is right up there with Makefiles for unix utilities that basically suck but are too entrenched to replace.

  • by scrytch ( 9198 ) <chuck@myrealbox.com> on Friday October 31, 2003 @11:10AM (#7357957)
    Monads are also a branch of category theory that are adopted by languages like Haskell [haskell.org] (the prime developer of which works for Microsoft Research). By obeying a certain set of basic principles, programs structured with monads achieve high degrees of interoperability and consistency, while safely encapsulating data and keeping it from being destroyed by unwanted side effects.

    Sure that's an apropos name for a Microsoft product?
  • Re:The difference: (Score:2, Interesting)

    by AndyS ( 655 ) on Friday October 31, 2003 @11:11AM (#7357970)
    What about something like the Java Beanshell?

    I've never used it, but I understood it was meant to be a Java interpreter which could be used like this.

    If you wrote a nice series of base classes then you could probably duplicate this functionality I would have thought
  • Re:Very Nice (Score:3, Interesting)

    by Rogerborg ( 306625 ) on Friday October 31, 2003 @11:12AM (#7357985) Homepage

    > just as they're "stealing" "our" ideas that WORK.

    Open Source ideas like bash-a-like shells?

    If you can name three original ideas that were generated by an open source / free software project rather than being appropriated from Unix, Windows, or MacOS, I'll eat my hat without salt.

  • Re:The difference: (Score:2, Interesting)

    by Waffle Iron ( 339739 ) on Friday October 31, 2003 @11:18AM (#7358039)
    Read down the article for details on how they can now do things like mount the registry as a drive and walk it like a filesystem. Yegads!

    ...

    I think people don't give MS enough credit for where they stand even today, frankly.

    Way ahead of them there. Five years ago when I got sick of the insanely overengineered registry API, I wrote my own C++ wrapper that did essentially the same thing. I'm sure thousands of others have done this as well. Glad to see that they're catching up with the rest of us.

    The thing that I can't fathom is WTF didn't they make the registry look like a file system in the first place? Now when they finally get around to doing it, people think that it's some kind of rocket science. It only seems high tech because the original API was so unuseable.

  • Two problems (Score:1, Interesting)

    by Anonymous Coward on Friday October 31, 2003 @11:25AM (#7358160)
    I went to the PDC and talked with the group doing this feature. There are two caveats:

    1) The Longhorn Command Shell does not yet support console applications. In other words, launching a console .exe will not spit its output out in the CLI, but will open a DOS window instead. Engineers indicated that there aren't firm plans to support this yet.

    2) The CLI has no acceptable means of text editing within the CLI itself. So, no VI, Emacs, or even EDIT.EXE. Editing must be done via external editor.

  • by TomorrowPlusX ( 571956 ) on Friday October 31, 2003 @11:27AM (#7358183)
    I don't mean to be snarky here but you can open several terminal windows and hit f10 to show them all at once. Open the prefs and get throbbing aqua buttons, or turn on antialiasing in "Window Settings..."

    If you want tabs, download... [drummroll] iTerm.
  • We owe it to Linux (Score:2, Interesting)

    by nsxdavid ( 254126 ) * <dw&play,net> on Friday October 31, 2003 @11:37AM (#7358325) Homepage
    I'll admit it. I have been a long term supporter of Microsoft products. In particular, I insist on using Windows XP for a lot of things my developers would rather use Linux. Some of this can't be helped, since we produce consumer products for Windows. But on the datacetner side, it's a judgement call.

    But don't get me wrong, our big money maker stuff runs on Linux. And always will, I imagine. The power of Linux on the server side is so clear. And the new Kernel, when it's ready, looks like it'll solve the last of the bottleneck issues we've suffered under for so long.

    I've adopted the idea that you pick the right tool for the right job. And I've always felt that Linux was awful at being approachable without being a dedicated Linux hacker (in the early days). Then as time went by it becamse more and more accessable. Heck, we even have Lindows now.

    What Microsoft didn't expect is that this would ever really happen. But with Linux becoming more and more friendly, it's inherent power is undeinable.

    So they are reacting. This new command line is simply a way of building up the server potential of... well... their servers. The whole .NET thing is actually built around a core of very good ideas that, when fully realized, make development for Windows quite a different experience than anything else that has come before. This is a logical extension of that.

    The fact is, competition works. Linux is driving Microsoft to actually innovate again! And I imagine that if Windows has a command line that Linux users will be envious of, they will respond in kind.

    Patents, of course, will still be the horrible sticky point in all this. :(
  • by Ridgelift ( 228977 ) on Friday October 31, 2003 @11:56AM (#7358564)
    From the article:
    One last thing: anything can be mapped to a drive, and drives don't just have to be letters. (Ok, I lied - that was 2) The example I was shown was that the registry was mapped to a drive, and you could navigate it like any other drive, with the results being returned from the commandlet as .NET objects!

    From ESR's "Art of Unix Programming"
    Quote #1
    Unix has a couple of unifying ideas or metaphors that shape its APIs and the development style that proceeds from them. The most important of these are probably the "everything is a file" model and the pipe metaphor[20] built on top of it.

    Quote #2
    NT has grown by accretion, and lacks a unifying metaphor corresponding to Unix's "everything is a file" or the MacOS desktop

    Oooo! So does this mean Windows is finally going to have a unifying idea, something like "everything is almost like a file"?
  • Re:Very Nice (Score:2, Interesting)

    by skandalfo ( 623756 ) on Friday October 31, 2003 @12:01PM (#7358625)
    What if Longhorn does indeed provide more security, not only in default settings, but more inherently in the OpenSource?

    Before the Internet appeared and before personal computers were so cheap, UNIX ran on big machines that a lot of people had to share. Since its origin it was a multiuser environment where many users could work and "live" at the same time. It was like lots of people living in a small city.

    So it had to provide means to reduce to the minumum the probability for a bad user to enslave others or to take an unfair amount of resources that would leave the others without thir fair share. Thus UNIX has file and execute permissions, quota support, superuser account, and other restrictions buit in since the beginning.

    The provided mechanisms may not be perfect, but they have been refined during 20 years (as Microsoft says, GNU/Linux is 80's technolohy; but someone invented the wheel even before that and we keep using it shamelessly) and their usage has got embedded into UNIX users' culture.

    GNU/Linux inherits these UNIX security traditions.

    By contrast, Microsoft operating systems started to get popular when cheap personal computers became available. Before the Internet boom, when these computers remained unconnected, only the ligitimate user would touch the machines, and so the operating systems could be single-user (even single-process, remember) entities that didn't have to care about security.

    Now that with the Internet everything begins to be interconnected, you find that the user no longer operates in his/her own computer only. Now he/she has to live in the big big city formed by all the Internet-connected computers.

    Microsoft added connectivity to their single-user OS's, but not the mechanisms to avoid bad-behaved Internet citizens from harming the legitimate user. They're trying to catch up. They added users and groups to Windows NT and have recently incorporated firewalls and things alike into their OSs.

    But this is not a technical issue only. The Microsoft user and developer culture has still to catch up, and it can be a long time until it does, moreover when Microsoft is scaring people from upgrading to better versions with their insane prices.

    As an example of the lack of security culture, take the example of Administrators, Advanced Users and Normal Users in Windows XP. It's supposed that Advanced Users could install programs, but I know of several cases in which the programs would refuse to install (or even run) if not using an Administrator account.

    I think that it will take more than Longhorn's scheduled time to change users' and developers' minds...

  • by master_p ( 608214 ) on Friday October 31, 2003 @12:03PM (#7358663)
    They should have used the .NET platform for scripting. It would offer numerous advantages:

    1) full programmability from the shell; the script programmer can use linked lists, for example, if she wishes.

    2) access to GUI functionality; some times it is desirable

    3) an already existing interpreter that can do optimizations on the fly: the .NET virtual machine.

    4) the .NET security model.

    5) .NET aware programmers would be able to right scripts without looking for some scripting language manual.

    6) network adminstrators could transfer their scripting skills to development; I know plenty of guys that want to jump from administration to development.

    7) documentation for .NET already exists; there are numerous web resources.

    8) .NET is fully object oriented; scripts can be written as classes placed inside compiled code or run from the shell.

    9) less cost since they would have to maintain one less piece of code.

    10) long scripts that run frequently could be compiled to .exe for faster execution.

    11) as .NET is upgraded, the script capabilities automatically get upgraded.

    12) ability to talk to programs through the .NET's advanced COM technology; interoperability with major .NET enabled applications.

    13) direct use of XML and databases from the script.

    14) easy networking, using sockets with one line of code.

    To my mind, a script is just like a console application, although in source format and not in binary. There is no conceptual difference: a script is a program that someone writes that is not compiled; it runs interpreted. It would be a waste of resources to use anything other than .NET for scripting. In Linux, scripting languages have evolved to fully programmable libraries...

  • by twitter ( 104583 ) on Friday October 31, 2003 @12:32PM (#7359072) Homepage Journal
    Well, errr, you can't really tell where they are going at all. They have derided scripting with their idiotic GUI bet [usatoday.com] which they claim is incompatible with scripting. Well it was on their platform because they spagetti coded everything into the GUI. A brief look back shows where they have been with CLI. It also shows that Microsft really can't compete and those who stick with them are in for a bad ride.

    Bill Gates, on the launch of XP [wired.com]:

    Gates said the release of XP "marked the end of an era, the end of DOS [trexion.com] and also the end of Windows 95." ... Gates informing the crowd that he agreed with Apple's Jobs that Windows 3.1 was a "crummy operating system," and assuring the crowd that he'd soon say that about Windows 95.

    Of course, we remember they used the phrase "end of dos" for the launch of windows 95. Funny how they are now saying the same things about XP they said about 3.1, 95, 98 and ME. That's consistency!

    Now, do they have consistancy in shells? They have derided their primary shell, DOS. But what of their other scripting efforts? Remember their "Unix Killer" "New Technology (NT)" and their ksh? Korn does!

    I knew that Microsoft had licensed a number of tools from MKS so I came to the microphone to tell the speaker that this was not the "real" Korn Shell and that MKS was not even compatible with ksh88. I had no intention of embarrassing him and thought that he would explain the compromises that Microsoft had to make in choosing MKS Korn Shell. Instead, he insisted that I was wrong and that Microsoft had indeed chosen a "real" Korn Shell. [slashdot.org]

    Ah yes, so portable it was. While NT is dead, csh and ksh trive themselves and in their free counterparts. No new training is required for bash or pdksh.

    For an instant, Bill liked Java [microsoft.com]:

    Java is our latest programming tool, and we've got a Java compiler with the highest benchmark feeds, great debugging. Java's -as you know, is a wonderful language, and everybody should have that in their portfolio. (1996)

    He tried to make the crowd laugh at Sun in the same speach because he wanted to kill Unix with NT. Where is M$ "java" today?

    C# .NET and all look to me like a combination of all the second rate junk they've thrown together in their attempt to emulate and eradicate first rate competitors. "Linux is a Cancer", they say, use our shared source instead. Yeah right.

    Oh wait, I see the patterns. EEE, Embrace, Extend, Extinguish followed by "that sucks, buy the new one." You have to be blind to miss it. If you follow the M$ way, you will be constantly sucked for money and time learning their new tweaks.

    It's only going to get worse because free software is impossible for them to eat up or beat. Their efforts to stick to their previous marketing plans are wrecked by actually having to compete on merrits and price. This is making them less and less stable. The closed source model can not compete with the free software development model.

  • by freality ( 324306 ) on Friday October 31, 2003 @12:32PM (#7359073) Homepage Journal
    I'm all for trying new things in new ways, but it's also good to take stock of old ways. Here's 2 examples that come to mind:

    1) I've recently talked to a friend about a problem he was trying to solve. He's on OSX and perl hacker. He wanted a utility to find all the duplicate files on his machine, and was considering writing it in perl or maybe java. We talked about it a bit, and I said I'd approach it by writing the shell script first as a prototype. I wrote it into our IM conversation off the top of my head:

    find / -type f -exec md5sum \{\} \; | gawk '{print $2" "$1}' | sort -k 2 | uniq -D -f 1

    We looked around and found lots of programs on OSX to do this.. some even for $. But I don't think he even went ahead with coding it... this was good enough.

    2) Once I talked to Brewster Kahle, director of the Internet Archive, about their choice of OS/tools (Linux/ext2 and GNU, respectively). Mr. Kahle said GNU tools in bash were the only technology they had found that could process the data at the IA, i.e 300TB+ rolling snapshot of the internet. They'd found some problems in sort I think, but sumitted patches.

    So sure, you can do this all again, but somebody is going to have to find that bug in MSH's sort, and they probably won't be able to submit a patch because MS is a proprietary shop.

    The UNIX shell is a great inheritance. It's cryptic when you first get into it, but basically, it's that way for terseness.. you can find out how to do almost anything by reading the f'ing manual, or searching the web.
  • by Dalroth ( 85450 ) * on Friday October 31, 2003 @12:34PM (#7359104) Homepage Journal
    I don't want a Perl shell (at least not until Perl 6 comes out and only if it blows me away). I would LOVE a Python based shell though that let me do pretty much everything I do in bash as easily.

    Bryan
  • Re:passing objects (Score:3, Interesting)

    by Wylfing ( 144940 ) <brian@NOsPAm.wylfing.net> on Friday October 31, 2003 @12:44PM (#7359255) Homepage Journal
    The shell could be smart enough to do smart things with the data

    Ah, that's the part where MS always falls down, isn't it? Their "smart" choices about what to do with a bit of data are always quite wrong, but they will not be able to resist the urge to make 'grep -n' return Excel data and auto-launch Excel to display the results.

  • by archen ( 447353 ) on Friday October 31, 2003 @01:17PM (#7359705)
    I think most people don't use modern language for the shell, because the shell is mainly meant for people to use. If I want to use a shell, I'll use bash which works quite well for crusing around the system. If I need to script anything complex I'll use Perl, or Ruby (or python or whatever).

    In any event I think Microsoft will miss the power of scripting because of their mentality. Unix is a collection of small applications glued together by the shell. Microsoft will probably make a huge programming language that is accessable right from the command line. Then we can await lots of fun problems like what version we have and backwords compatibility nightmare. These are the sorts of problems we have with _programming_languages_ , we don't need them on the shell too! Unix is very fine tuned area as far as the CLI goes, and MS will either learn from it, or re-implement it badly. How is this all going to work with their new signed code junk anyway? I mean if anyone can slap together a shell script virus, it would seem that all the DRM protection went down the toilet.

    Other things MS will probably need to re-invent:

    * man pages
    * /dev/null
    * mail (or similar) system to get output when automated

  • think for a moment (Score:5, Interesting)

    by penguin7of9 ( 697383 ) on Friday October 31, 2003 @01:26PM (#7359825)
    I don't know why more people don't actively pursue a modern language for the shell interface. sh script syntax is tortorous. So much easier and maintainable to write perl scripts. So why not use perl from the command line??

    Yes, you don't know. But think for a moment: people have had Perl-like languages since the 1960's. Do you really think you or Microsoft are the first to think that using an object-oriented scripting language is a good idea?

    The reason why people use sh syntax is because it is enormously effective. Try expressing something like:
    find . -type f | xargs grep -il foo
    in Perl or some other scripting language.

    Of course, many people who complain about sh syntax really just don't know how to use it.

    For interactive use by skilled users and many scripting tasks, bash/ksh is unbeatable. And for the kinds of scripts where Perl makes sense--you can simply use Perl.

    This would basically trump anything msh could muster and also provide the entire universe of CPAN to the shell.

    Yes, psh is a better version of what msh is trying to achieve. But, you know, even that's nowhere near good enough to dethrone bash/ksh.
  • by Alex Belits ( 437 ) * on Saturday November 01, 2003 @05:13AM (#7365805) Homepage
    So basically Microsoft, in their fine tradition of creating an confusion in terms, made a "shell" that can't run programs but instead runs "managed code" (aka shared libraries in dotnet environment) and maintains all objects inside itself, but has a syntax that is confusingly similar to Unix shell pipes. The concept is obviously flawed -- Unix shell uses Unix-specific unified file descriptor model, that Windows lacks, so while in Unix shell is often used to process easily-parseable text using pipelines of programs (some remote) and any overcomplication of data passed between programs is frowned upon, in Windows the most convoluted ever format is being used to exchange things between "programs" that are sitting in the belly of that "shell". They could just as well make the whole interface an UML editor.

    If anything, it can prevent some people who learned that shit from switching to Unix -- they will until the end of their miserable lives associate pipelines with shitloads of DLLs instead of streams of text.

"When the going gets tough, the tough get empirical." -- Jon Carroll

Working...