From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Thu, 02 Apr 2009 20:28:57 BST." References: From: Bakul Shah Date: Sun, 5 Apr 2009 20:55:29 -0700 Message-Id: <20090406035529.C9F5A5B21@mail.bitblocks.com> Subject: Re: [9fans] typed sh (was: what features would you like in a shell?) Topicbox-Message-UUID: d2ead6ac-ead4-11e9-9d60-3106f5b1d025 On Thu, 02 Apr 2009 20:28:57 BST roger peppe wrote: > 2009/4/2 : > i wanted to go a little beyond sh while stopping > short of the type profligacy of most other languages, > hoping to create a situation where many commands > used exactly the same types, and hence were > viable to pipeline together. Nitpick: the output type of one command and the input type of the next command in the pipeline has to match, not every command. > a pipeline is an amazingly powerful thing considering > that it's not a turing-complete abstraction. "f | g" is basically function composition, where f and g are stream functions. Of course, this simple analogy breaks down the moment we add more input/output channels -- may be that is why anything beyond a simple pipeline seems to get people in trouble (see the rc output redirection thread). To go beyond simple char streams, one can for example build a s-expr pipeline: a stream of self identifying objects of a few types (chars, numbers, symbols, lists, vectors). In Q (from kx.com) over an IPC connection you can send strings, vectors, dictionaries, tables, or arbitray Q expressions. But there the model is more of a client/server.