2005-06-19 · in Ideas · 250 words

There are obvious similarities between Unix pipelines and CSP process networks. An obvious enhancement to Unix pipelines would be to support typed communication channels (rather than just streams of bytes), and to improve support for non-linear process topologies. The problem is finding a nice way of describing process networks -- you can only go so far with nested brackets and pipes, but you could use labelled "connection points" or even allow the user to draw a diagram of the network they want.

It should also be possible to specify the sort of channel you want. For a few applications you probably want CSP synchronising semantics, but the majority of channels should be buffered -- and for typical usage, with much larger buffers than a Unix pipe usually provides.

Since it's often useful to apply a generic operation to a more complex data type, some sort of hierachy of types would be useful -- RSS is RDF is XML is UTF-8 text is a stream of bytes. MIME types may be easiest to use, particularly since many tools already manipulate them. A future Unix-like system could provide system calls to set or match the MIME type of a file descriptor's data.

To play with this in an existing Unix system, you could use an LD_PRELOAD wrapper -- it might be interesting to experiment with fake pipes that provide CSP semantics. And while I'm dreaming about future shells, it'd be nice to have a standard option system that the shell could query for expansions and help...