9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Install from CD fails
Date: Thu, 20 Apr 2006 02:03:05 +0100	[thread overview]
Message-ID: <b19a788af0d8c6e8060b05f4af580099@vitanuova.com> (raw)
In-Reply-To: <57b9d806f3ec06df038f56c360f60867@quanstro.net>

> yes.  there are a couple (okay, three) problems to address here.  byron and paul haahr
> addressed some of the problems with a shell called "es" years ago, even though they
> didn't have dynamic modules.

i had es in mind when i wrote the inferno shell (vita nuova's, not the original tiny shell).
i thought then that some of the es concepts were nice, but the whole complete functional language
thing was overkill and didn't get one very far (why make it possible to redefine
core shell concepts such as the pipe? - it just confuses everyone if you make use of this.)

inferno made it very easy to provide "internal" modules (which i called "builtins";
i never really thought of a satisfactory name) - the interface they get to
see is a restricted version of the interface seen by the shell itself internally.
i tried to keep this as clean as possible. (by contrast, mash, which did a similar
thing, had quite a complex interface at this level).

> es did this: anything passed to a function inside curly braces was passed verbatim.

that was the main bit of es that i stole for the inferno shell. it works well,
and combined with dynamically loaded shell modules, makes many nice things quite
easy.

for instance:
> 	; if {condition1} {body1} {condition2} {body2}

is not implemented by the core inferno shell, but by an externally loaded
module (std).

since then, shell modules have been implemented for all kinds of things (e.g. graphics,
s-expression parsing, mash-like make).
externally implemented programs are still preferable (smaller interface,
the shell doesn't break if the program does), for interfaces which
need to maintain state across calls or wish to call back into the shell,
a shell module can work well. it also makes it easy (and efficient)
for a function in such a module to return a list of values (the fundamental
type).

the main problem is that a shell of this style
has no concept of storage of any item but a string (ok, a list of strings), so it is not
possible to manipulate other data items directly. also, the interface makes
it quite natural to pass code fragments to external programs to execute,
e.g.
	listen 'tcp!*!6666' {export /&}
but the external programs don't have access to the original shell's
environment (e.g. loaded shell modules).

i don't think it's possible to address these problems without
breaking the simplicity of the whole thing; the moment you
introduce lexical binding, differently typed variables, etc,
a whole raft of other issues starts to drift into view.
another kind of language might begin to help, but that's another
story.

just having shell blocks as values is a big win, in my book.
i don't think it would be hard to do this in rc.

> a trivial grep module could make
>	; grep {^fn} *.[ch]
> acceptable syntax.

i'm sorry, i don't see why this is preferable to the original.
it has the same number of characters.


  reply	other threads:[~2006-04-20  1:03 UTC|newest]

Thread overview: 127+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-19  2:35 erik quanstrom
2006-04-19  3:53 ` Russ Cox
2006-04-19  4:25   ` [9fans] dynamic module loading and versioning Michael Baldwin
2006-04-19  9:37     ` Bruce Ellis
2006-04-19  9:40       ` Lyndon Nerenberg
2006-04-19  9:54         ` Bruce Ellis
2006-04-19 14:12           ` Artem Letko
2006-04-19 17:49             ` Bruce Ellis
2006-04-19 19:34 ` [9fans] Install from CD fails Roman Shaposhnick
2006-04-19 19:42   ` Bruce Ellis
2006-04-20  1:07     ` Roman Shaposhnick
2006-04-20  2:02       ` Jack Johnson
2006-04-19 19:45   ` Charles Forsyth
2006-04-19 21:16   ` Brantley Coile
2006-04-19 21:46   ` quanstro
2006-04-20  1:03     ` rog [this message]
2006-04-20  6:08       ` Charles Forsyth
2006-04-20 15:59         ` rog
2006-04-20  4:02     ` Roman Shaposhnick
  -- strict thread matches above, loose matches on Subject: below --
2006-04-25  2:16 erik quanstrom
2006-04-21 15:49 erik quanstrom
2006-04-20 10:36 erik quanstrom
2006-04-20 10:30 erik quanstrom
2006-04-20 13:50 ` David Leimbach
2006-04-20 17:55 ` Skip Tavakkolian
2006-04-25  2:02 ` Roman Shaposhnick
2006-04-20  9:57 erik quanstrom
2006-04-20 11:00 ` R
2006-04-20  1:45 erik quanstrom
2006-04-20  3:03 ` Michael Baldwin
2006-04-20  5:58   ` Charles Forsyth
2006-04-21 11:34   ` Bruce Ellis
2006-04-21 15:46     ` Skip Tavakkolian
2006-04-21 15:47     ` Jack Johnson
2006-04-20  1:41 erik quanstrom
2006-04-20  6:17 ` Charles Forsyth
2006-04-19  8:19 YAMANASHI Takeshi
2006-04-19  3:27 Mike Haertel
2006-04-19  3:04 erik quanstrom
2006-04-19  2:47 erik quanstrom
2006-04-17 22:07 Bakul Shah
2006-04-18  0:01 ` Russ Cox
2006-04-18 14:36   ` Gorka guardiola
2006-04-18 15:47     ` Russ Cox
2006-04-18 14:45       ` Ronald G Minnich
2006-04-18 16:12         ` Charles Forsyth
2006-04-18 16:42           ` andrey mirtchovski
2006-04-18 16:46           ` Bruce Ellis
2006-04-18 16:47             ` Charles Forsyth
2006-04-18 17:41               ` Brantley Coile
2006-04-18 17:46               ` David Leimbach
2006-04-18 17:55                 ` Bruce Ellis
2006-04-18 18:06                   ` Francisco J Ballesteros
2006-04-18 22:37                     ` Skip Tavakkolian
2006-04-18 18:54                   ` Charles Forsyth
2006-04-18 19:22                     ` David Leimbach
2006-04-18 20:14                       ` lucio
2006-04-18 20:34                       ` Russ Cox
2006-04-18 19:52                         ` David Leimbach
2006-04-20 21:16                         ` Latchesar Ionkov
2006-04-18 20:45                       ` Ronald G Minnich
2006-04-18 21:08                         ` David Leimbach
2006-04-18 21:39                       ` Roman Shaposhnick
2006-04-18 21:54                         ` David Leimbach
2006-04-18 23:19                           ` Brantley Coile
2006-04-19  1:05                             ` Roman Shaposhnick
2006-04-19 14:17                             ` David Leimbach
2006-04-19 14:31                               ` Charles Forsyth
2006-04-19 15:32                               ` Chad Dougherty
2006-04-19 15:45                                 ` David Leimbach
2006-04-19 15:57                                   ` Federico G. Benavento
2006-04-19 17:45                                     ` David Leimbach
2006-04-19 23:56                                       ` geoff
2006-04-19 16:49                                   ` Russ Cox
2006-04-19 17:50                                     ` David Leimbach
2006-04-19 17:55                                       ` Federico G. Benavento
2006-04-19 18:45                                       ` Charles Forsyth
2006-04-19 18:55                                         ` David Leimbach
2006-04-18 23:27                           ` Roman Shaposhnick
2006-04-18 23:29                           ` Federico G. Benavento
2006-04-18 23:48                             ` Lyndon Nerenberg
2006-04-19 14:25                             ` David Leimbach
2006-04-19 14:31                               ` Ronald G Minnich
2006-04-19 15:51                                 ` Tim Wiess
2006-04-19 19:53                                 ` Wes Kussmaul
2006-04-20 14:39                                   ` Ronald G Minnich
2006-04-20 15:50                                     ` Jack Johnson
2006-04-20 21:20                                       ` Ronald G Minnich
2006-04-20 21:42                                         ` Dan Cross
2006-04-20 22:06                                           ` Brantley Coile
2006-04-21  3:43                                           ` Ronald G Minnich
2006-04-21  4:37                                             ` Dan Cross
2006-04-21 16:08                                               ` Ronald G Minnich
2006-04-20 22:09                                         ` Wes Kussmaul
2006-04-20 23:09                                           ` Charles Forsyth
2006-04-21  3:45                                           ` Ronald G Minnich
2006-04-21  4:31                                             ` Dan Cross
2006-04-21 13:36                                               ` Christoph Lohmann
2006-04-21  4:46                                             ` lucio
2006-04-18 19:34                     ` jmk
2006-04-18 19:52                       ` David Leimbach
2006-04-18 20:34                     ` Roman Shaposhnick
2006-04-18 21:04                     ` Dan Cross
2006-04-18 21:11                       ` Charles Forsyth
2006-04-18 21:16                         ` Dan Cross
2006-04-18 21:21                         ` David Leimbach
2006-04-18 21:24                       ` David Leimbach
2006-04-19  2:53                         ` geoff
2006-04-19  3:16                           ` Dan Cross
2006-04-19  3:28                             ` geoff
2006-04-20 22:35                           ` Roman Shaposhnick
2006-04-19  3:02                         ` Dan Cross
2006-04-18 20:44                 ` Ronald G Minnich
2006-04-20  3:10                   ` LiteStar numnums
2006-04-18 16:48             ` Charles Forsyth
2006-04-18 16:58               ` Bruce Ellis
2006-04-18 17:02             ` uriel
2006-04-18 17:30               ` Bruce Ellis
2006-04-18 20:21           ` Richard Miller
2006-04-18 21:10             ` Charles Forsyth
2006-04-19  1:14             ` geoff
2006-04-19 12:49               ` Richard Miller
2006-04-19 13:21                 ` Charles Forsyth
2006-04-18 16:17       ` Dave Eckhardt
2006-04-18 19:17         ` Lyndon Nerenberg
2006-04-19  0:28   ` Bakul Shah
2006-04-19  1:45     ` Russ Cox

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=b19a788af0d8c6e8060b05f4af580099@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /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).