9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: roger peppe <rogpeppe@gmail.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: Thu,  2 Apr 2009 20:28:57 +0100	[thread overview]
Message-ID: <df49a7370904021228s4fb4409an71f7ecb8dfc07863@mail.gmail.com> (raw)
In-Reply-To: <bb1951070904021148v346684eav27ee58405707e0e1@mail.gmail.com>

2009/4/2  <fgergo@gmail.com>:
> On Thu, Apr 2, 2009 at 8:41 PM, John Stalker <stalker@maths.tcd.ie> wrote:
>> What I most often miss in shell programming is a proper type system.
> You should have a look at alphabet. It is cool.
> http://www.vitanuova.com/inferno/man/1/sh-alphabet.html

i certainly enjoyed creating it. unfortunately it's
unfinished - i ran into unwarranted-complexity problems
trying to simulate polymorphism with processes and channels...
limbo's not a great language for writing interpreters in
when you don't know all your types in advance.

for those thinking of ideas for new shells,
i still think there's mileage in some of alphebet's ideas,
principally the way it lives in a half-way house between almost
no types (sh) and unrestricted types (most other languages).
that idea came from the thought that part of what makes
sh so powerful is the fact that so many commands
use the same types (string, stream of bytes + exit status).

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.

a pipeline is an amazingly powerful thing considering
that it's not a turing-complete abstraction.

alphabet was actually a generalisation of the fs command
(see http://www.vitanuova.com/inferno/man/1/fs.html),
that i'd found really useful (and more powerful than other
filesystem traversal tools i've seen, for minimal code).

some time i'll finish it!



  reply	other threads:[~2009-04-02 19:28 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 [this message]
2009-04-02 20:27   ` tlaronde
2009-04-06  3:55   ` Bakul Shah
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=df49a7370904021228s4fb4409an71f7ecb8dfc07863@mail.gmail.com \
    --to=rogpeppe@gmail.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).