Microsoft Releases A New Monad Command Shell Beta
Watercooler Warrior writes "Slashdot originally broke the news that a new Microsoft command shell was in the works when a reader noticed a suspicious job posting by Microsoft India. Today Microsoft released the first really usable version of the shell (codenamed Monad) to beta testers - and anyone who carefully reads the WinHEC slides about Monad will find how to join the beta and get a peek at it. The shell looks like a bunch of old-school Unix and Perl hackers were given free rein to do what they wanted with the .NET framework, and from what is known about the backgrounds of the Monad developers this is probably pretty close to the truth."
Google has a new command shell coming out as well; the name? Gonad.
Quidquid latine dictum sit, altum viditur
First thing I thought when I saw Monad was its definition from category theory. A Monad is a triple, containing a functor, and 2 natural homomorphisms.
Less cryptic, is its use in Haskell as way of parameterizing computations. Specifically its used to produce the I/O Monad which is parameterized by some type A in the pair IO : a -> world -> (a, world).
More in line with ur question, the word Monad comes from greek , and it means "one" "single " or "unique". So I guess they think this is a "unique" bit of work.
Basically, Monad formalizes in .NET the pipe interface between shell programs. A pipe participant is just something that implements the appropriate "commandlet" interface: it receives some input, produces some output, maybe some errors.
However, in the case of Monad the input and output can be anything, not just text. So in the example:
- get-process | where "handlecount -gt 400" | sort handlecount | out-chart processname,handlecount
The get-process command produces a sequence of processes; where filters it based on an attribute; sort sorts on an attribute, and out-chart produces a textual table of the filtered output.It's important that the input and output of these processes are structures (actually, objects, but I don't want to tickle anyone's prejudices about OOP). .NET knows at runtime about the attributes these structures can have, so you can write apps that manipulate a wide variety of object types: files, metadata-annotated documents, log entries, whatever.
Naturally input/output can be pure text, allowing all the traditional Unix commands such as grep.
Immediate benefit? If you have the right translator, there's no need to munge text output using awkward tools like tr, cut, awk and so on, just to get at the process ID column of ps or the URL column of the Apache log file.
This is better than Unix shells.