On Thu, 02 Apr 2009 20:28:57 BST roger peppe <rogpe...@gmail.com> wrote: > 2009/4/2 <fge...@gmail.com>: > 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.