MSH (shell)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bearophileHUGS@lycos.com

    #1

    MSH (shell)

    This can be of little interest of some people here, but I think it can
    be interesting enough to justify a post.

    An article on the Microsoft Command Shell:
    Also known by its code name Monad, the new Microsoft Command Shell hopes to …

    (Its syntax is rather Python-like, but Py syntax seems better to me,
    even taking into account that their purposes are a little different).

    Other info:
    http://en.wikipedia.org/wiki/MSH_(shell)

    Something vaguely similar made with Python:


    Bye,
    bearophile

  • Michael

    #2
    Re: MSH (shell)

    bearophileHUGS@ lycos.com wrote:
    [color=blue]
    > This can be of little interest of some people here, but I think it can
    > be interesting enough to justify a post.
    >
    > An article on the Microsoft Command Shell:
    > http://arstechnica.com/guides/other/msh.ars
    > (Its syntax is rather Python-like, but Py syntax seems better to me,
    > even taking into account that their purposes are a little different).
    >
    > Other info:
    > http://en.wikipedia.org/wiki/MSH_(shell)
    >
    > Something vaguely similar made with Python:
    > http://geophile.com/osh/index.html[/color]

    Kamaelia's Axon Shell[*] is also very similar. An Axon scheduler runs as a
    background thread to an IPython interpretor, allowing you to "launch"
    Kamaelia components interactively, including both pipelines and Graphlines
    of components.
    [*] http://kamaelia.sourceforge.net/AxonShell.html

    But then Kamaelia IS designed as a pipeline/graphline (1d,2d,n-d) system
    from the ground up, so having a shell for it was a logical step :-) ...

    I suppose the difference between python and MSH is you don't need a separate
    language, maybe a module or three, but you don't need to modify the
    language :)



    Michael.

    Comment

    • Paddy

      #3
      Re: MSH (shell)

      Thanks, I'm enjoying reading the article.
      So far I noticed how their select functionality is similar to our
      comprehensions, but can also take a statement block. ( no wars please
      ;-).

      I liked the tabular output format for lists of similar items, with the
      automatic headings being displayed, e.g:
      msh> get-childitem | select name, extension, {
      if ($_.LastWriteTi me.year -lt 2004) { "old file" }
      else { "new file" }
      }

      Name Extension if
      ($_.LastWriteTi me.year...
      ---- ---------
      -------------------------
      examples.txt .txt new file
      output1.html .html old file
      output2.html .html old file
      somefile.doc .doc new file


      I tend to avoid xml but their xml example below was succinct and
      relatively painless. Do python libraries allow a similarly readable
      version of their:

      msh> $x = [xml]"<zoo><anim al
      kind='monkey'>< name>Albert</name></animal></zoo>"
      msh> $x.zoo.animal

      kind name
      ---- ----
      monkey Albert

      Their "Extract the title and author elements from every item in the
      rss.channel tag" example is also impressive.

      Looks like an innovative new shell.

      - Paddy.

      Comment

      Working...