9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul+plan9@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] typed sh (was: what features would you like in a shell?)
Date: Sun,  5 Apr 2009 20:55:29 -0700	[thread overview]
Message-ID: <20090406035529.C9F5A5B21@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Thu, 02 Apr 2009 20:28:57 BST." <df49a7370904021228s4fb4409an71f7ecb8dfc07863@mail.gmail.com>

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



  parent reply	other threads:[~2009-04-06  3:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 18:48 fgergo
2009-04-02 19:28 ` roger peppe
2009-04-02 20:27   ` tlaronde
2009-04-06  3:55   ` Bakul Shah [this message]
2009-04-06 11:09     ` erik quanstrom
2009-04-06 15:40       ` Bakul Shah
2009-04-06 16:02         ` erik quanstrom
2009-04-06 16:22           ` [9fans] typed sh maht
2009-04-06 16:56             ` erik quanstrom
2009-04-06 16:50           ` [9fans] typed sh (was: what features would you like in a shell?) Bakul Shah
2009-04-06 21:18           ` John Stalker
2009-04-16 17:24     ` roger peppe
2009-04-16 18:52       ` Bakul Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090406035529.C9F5A5B21@mail.bitblocks.com \
    --to=bakul+plan9@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).