> rejected such system-imposing structure on files in Unix-y type
> environments since 1969.
[...]
> other threads of execution.  Could we do something similar with pipes?
>  I don't know that anyone wants typed file descriptors; that would
> open a whole new can of worms.

i don't see that the os can really help here.  lib9p has no problem
turning an undelimited byte stream → 9p messages.  there's no reason
any other format couldn't get the same treatment.

said another way, we already have typed streams, but they're not
enforced by the operating system.

one can also use the thread library technique, using shared memory.

> Consider a simple reduction in Lisp; say, summing up a list of numbers
> or something like that.  In Common Lisp, we may write this as:
> 
>     (reduce #'+ '(1 2 3 4 5))
> 
> In clojure, the same thing would be written as:
> 
>     (reduce + [1 2 3 4 5])
> 

this reminds me of a bit of /bin/man.  it seemed that the case statement
to generate a pipeline of formatting commands was awkward—verbose
and yet limited.

        fn pipeline{
                if(~ $#* 0)
                        troff $Nflag $Lflag -$MAN | $postproc
                if not{
                        p = $1; shift
                        $p | pipeline $*
                }
        }

        fn roff {
                ...
                fontdoc $2 | pipeline $preproc
        }

> http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
> 
> Your example of running multiple 'grep's in parallel sort of reminded
> me of this, though it occurs to me that this can probably be done with
> a command: a sort of 'parallel apply' thing that can run a command
> multiple times concurrently, each invocation on a range of the
> arguments.  But making it simple and elegant is likely to be tricky.

actually, unless i misread (i need more coffee), the blog sounds just like
xargs.

- erik

Reply via email to