Jeffrey Snover - Monad demonstrated

Download this episode

Download Video

Description

Last week you saw Jeffrey Snover talking about Monad here on Channel 9. Here's his demo of Monad. Monad is the code-name for a new command shell for Windows.

In this video Jeffrey talks about the five concepts of Monad that you'll need to know to get started.

Tags:

Monad, PowerShell

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Maurits
      Ooh, tab-completion of long filenames!  This is one of the biggest things bash has going for it over cmd.exe.  I'm so happy it's coming to Windows.
    • User profile image
      Sven Groot
      Actually, cmd.exe in Windows XP has tab-completion.

      The only thing it's still missing compared to bash in that regard is that it won't work on files in your path, only in the current directory. I wonder if this fixes it. I can't check, because I can neither install the preview nor watch the video, as my computer is acting really really strange. I'm currently working in Knoppix, and it's gone for about 25 minutes now without crashing, which is the best it's done all day. In fact, the previous three attempts in Knoppix all crashed within 30 seconds. At least Windows consistently gives me 3 minutes before giving up.

      Looks like a hardware defect, yes, although I can't explain why it's suddenly gone away it seems. If it lasts till the half hour I'm going to boot Windows back up and try my luck with that one more time.
    • User profile image
      Maurits
      Sven Groot wrote:
      Actually, cmd.exe in Windows XP has tab-completion.


      Really?  Cool!  (Still on Windows 2000 here.)

      I see a lot of my favorite command filters (though renamed: tail -> pick-tail, for example.)  Great.
      Is there a grep (perhaps by a different name?)  Any kind of regular-expression support?
    • User profile image
      drevlan
      XP has tab-completion it even supports variables, example:

      C:\Windows> edit w*.log

      If you hit tab it will search through all the different .log files starting with W. Works great in my experience.

      --Drevlan
    • User profile image
      Horshu
      Win2K has tab-completion as well; it just isn't enabled by default.  Check out HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor in your registry.
      I'm probably being too picky, but I was hoping it would have a richer CLI UI rather than being so similar to cmd.exe (one big textbox).  It doesn't need to be a very visual GUI, but there are areas where UI controls can enhance the CLI experience.  I know purests might cringe at adding any UI elements (even menu bars), but they can be added without making them necessary to using the tool
    • User profile image
      Maurits
      Horshu wrote:
      Win2K has tab-completion as well; it just isn't enabled by default.  Check out HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor in your registry.


      WOW!

      Learn something new every day.
    • User profile image
      NOP4e71
      Yep, it was there even in NT4 (not sure which SP) though it didn't really work that well and could occasionally crash CMD.EXE. (I used to copy the cmd.exe from Win2k beta to my NT4 workstation Wink It has nice features like it expands wildcards and you can SHIFT-TAB to step backwards through the possible matches when you have been TAB-ing too much. The not so nice feature is that if you edit an existing command line and use tab somewhere in the middle of the string, it will trash all the characters between the cursor and the end of the string. (something that bash doesn't do). About GUI features: What I really hope is that it will be possible to resize the console window without clicking 123 buttons like now. It's a big plus of xterm and rxvt. Transparency would also be cool of course Wink Well, going to watch the video.
    • User profile image
      staceyw

      "I'm probably being too picky, but I was hoping it would have a richer CLI UI rather than being so similar to cmd.exe"


      Yes, many using the beta wish the same including myself.  They are focused on RC1 and have a lot of work in the nuts and bolts.  They currently view cli ui as something that can come latter.   The current UI is the same one any console APP uses.  MSH.exe is just a plain old c# app that loads DLLs.  The MSH engine is a collection of DLLs that the MSH console app hosts.  You will probably see many user attempts at MSH hosts/GUI/CUI apps.  Actually, there is a few beta users that are working on their own hosts.  Myself, I would like to see something similar to the SQL command utils.  Where you have a command window and a results window, etc.  As a c# user, I would also like to see deep integration of msh into the cmd/immediate windows and internal scripting in VS.Net.

      cmdlets are user commands (c# dlls) that msh invokes and your dll becomes part of the pipeline for inspection or injection in the pipeline.

      --
      wjs, mvp 

    • User profile image
      Horshu
      staceyw wrote:

      Actually, there is a few beta users that are working on their own hosts.  Myself, I would like to see something similar to the SQL command utils.  Where you have a command window and a results window, etc.  As a c# user, I would also like to see deep integration of msh into the cmd/immediate windows and internal scripting in VS.Net.

      cmdlets are user commands (c# dlls) that msh invokes and your dll becomes part of the pipeline for inspection or injection in the pipeline.

      --
      wjs, mvp 



      Funny you should mention that...I wrote my own CLR app (for communicating with a multi-component distributed app) that is similar (piping, including scripts, everything's an object) but has a mIRC-like interface (input textbox on the bottom and output text above, but I allow the input textbox to be switched from single line to expandable).  It's really interesting when the thing "speaks" .Net, because the power you expose is unreal.  For instance, mine really talks to a finite set of components, but because it's .Net, it could probably talk Monad, too, and vice versa.
      I really like some of the aspects of Monad, but not being a CLI person myself, I didn't "get" the format in terms of how you pass/pipe things...could be because watching Jeffrey type in commands, I couldn't really understand the format being parsed...too flexible I guess.  Mine supports ">" and "<" bi-directional parsing (fully configurable, as the pipes are just "sentence" delimiters, so I guess I could add |), <verb> <noun> <params> formatting, script support, but I defined a very restricted sentence format with all the complexity in the piping order.  Monad kinda blew my notion of a grammar out the window, so I'm still trying to wrap my head around it Smiley
    • User profile image
      staceyw
      Looks like maybe they "cut" out a part during talk on SQL like processing.  Was there a cut or a blip in my vid?

      --
      wjs, mvp
    • User profile image
      manickernel
      Wicked Cool... I am going to have to watch this a dozen times for saturation... any links to White Papers?
    • User profile image
      sn1p3t
      staceyw wrote:
      Looks like maybe they "cut" out a part during talk on SQL like processing.  Was there a cut or a blip in my vid?

      --
      wjs, mvp


      I saw that too. Must have been cut out.

      manickernel wrote:
      Wicked Cool... I am going to have to watch this a dozen times for saturation... any links to White Papers?


      http://beta.microsoft.com
      Sign in with passport
      Guest ID: mshPDC
      Fill out survey
      Get software in a day
      Documentation is there Tongue Out
    • User profile image
      scobleizer

      No cut, my battery died. Sorry about that.

    • User profile image
      Manip

      I hope they make Cut/Copy/Paste better than the current CMD tool. (CTRL-C, CRTL-V etc)

    • User profile image
      Maurits
      I sort of like the current Copy/Paste (why would you Cut?) - Highlight/Enter to Copy, right-click to paste.  Very similar to PuTTY
    • User profile image
      farquhar
      I am SO ready to use this. Please find a way to ship it NOW! I need it yesterday.
    • User profile image
      earnshaw

      This is really, really good.  Can't wait to get my hands on it.  Probably is no technical reason to delay its release until Windows 2005 Server.  Hope against hope that the user doc is really good, too.

    • User profile image
      rasx
      This rocks in ways erstwhile thought not rockable! This video is so downloaded!
    • User profile image
      nektar
      I hope that they ship it soon. I do not want to wait for 2 years plus for it to be officially released. This is usually the problem. Microsoft has good ideas but until they are shipped they are out of date. I hope that Monad will be released in a few months at least. And please keep the name Monad and do not call it MSH. Monad sounds better because it is more original than MSH.
    • User profile image
      Tom Servo
      Chances are that it might also be called "Windows Command Shell", at least that's what the preview setup file is called currently.
    • User profile image
      tigerfeat
      Great stuff, but unless I missed something you didnt talk about managing another machine on the network as opposed to just your own local machine. It would be great to have a demo of that too... The kind of thing I'm thinking of is logging out those people who have forgotten to log out or shutting down certain processes right across a network, or something even more cool that I've not yet thought of but that you will no doubt be able to demonstrate!
    • User profile image
      jsnover
      tigerfeat wrote:
      Great stuff, but unless I missed something you didnt talk about managing another machine on the network as opposed to just your own local machine. It would be great to have a demo of that too... The kind of thing I'm thinking of is logging out those people who have forgotten to log out or shutting down certain processes right across a network, or something even more cool that I've not yet thought of but that you will no doubt be able to demonstrate!


      At this point, the only way I can demo the remoting stuff is with hand puppets.  Smiley

      It's going to be great but we just don't have the code to show it right now. 

      We'll be leveraging the WS-Management protocol to do remote management. What that means is that you'll be able to use the same protocol and cmdlets to manage the Pre-OS environment of your servers (once they have a WS-Management compliant MB-Controller [which the HW guys are developing]) and your OS-Present environment.

      jps
    • User profile image
      jkhines
      No matter how much I read about msh, seeing a demo always points out something new.

      Tab completion nonwithstanding, I'm finding msh to be easier than cmd for everything, including simple string parsing: No need for findstr/cut/etc.

      Please keep these coming!
    • User profile image
      jorgen
      Wow! Looks like I can scrap cygwin/perl whenever this baby is available...
    • User profile image
      indranilb
      Its great that MS are finally going to give us some powerful command line tools. Its many years over due but Monad looks pretty cool.

      They've clearly borrowed a lot from the Unix 'every thing is a file' Model. I like the way the Registry etc. are all mapped to drives under the monad root directory.

      But how far do they go with this? Unix has something called the /proc filesystem. Under the /proc directory you'll find sub directories for each currently running process. Under each process directory  there are further directories which list open file handles for that process and cpu usage, memory usage etc. This would be welcome in Monad as well as their get-process command.

      The SQL-like querying of the output is definitely something new, with no real equivalent in Unix. This is something that would be very hard with Cygwin or bash. I wonder how all of this will tie in with WinFS? A lot of potential synergies there.

      But the biggest innovation could also be a drawback. Everything seems to be an object in the Monad world. The input and the output of all these Cmdlets are objects, which is what allows us to run fancy queries on the output of the Cmdlets.

      However this turns Monad into a closed system. Plain Unix is entirely text based, read text from STDIN write text to STDOUT or STDERR. This means that any commandline application could be used in a shell script. So I wonder how flexible Monad will really be?

      For example, could I stick an existing network packet sniffing program into an MSH script and do all this funky querying of its output to debug network problems? Or do I have to write a C# Cmdlet wrapper around the exisiting tool before I can run it from my script?

      Or could I run sql scripts against my database, and depending on the text output, send an email to the administrator saying the job had failed. Or do I need yet more C# Cmdlets?

      The pure simplicity of the text in, text out Unix model made scripting easy, extensible and flexible. For Monad to succeed it will need to be all of those things  
    • User profile image
      Adenocard
      Watched. IT ROCKED!! This is a MUST VIDEO!!  You have made a believer out of me and I just heard about Monad 2 days ago!!  This one will SO BE SHOWN to developers on what's coming down the pipe.

      Please post links to a .chm or otherwise for the magic verbs and noun -? -? -PLEASE!!

      Unix Admins. Be prepared to be -grep'ed yourselves. 

      Channel 9 Guy, DataMining, SQLServer labs + Monad ??  I'm blown away.... now I gotta get a foosball table Smiley

      PS Jeff, Besides a much needed raise is that a doll in your office???
    • User profile image
      s_jetha
      Are there man pages?
    • User profile image
      ajaxdev
      Hi there guys.

      Loved to learn about Monad from this video but I really want to
      convince you of providing higher quality vids even if they are way
      a larger download. Watched one video of Vista and it's impressive. Keep in my we niners want to read the text on the screens so it's way hard if the quality of the video is bad.

      Roger Armas
    • User profile image
      badiane
      Hmmm, well the cool thing about Linux/UNIX is that one may have many shells and actually even use some scripting languages as shells.  To be awe take a look at zsh.  Download the grml live cd and experience it. http://grml.org/zsh/.

      My 2 cents.


    • User profile image
      oyun oyna

      sagolun guzel paylasım

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.