9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Install from CD fails
@ 2006-04-20  1:41 erik quanstrom
  2006-04-20  6:17 ` Charles Forsyth
  0 siblings, 1 reply; 12+ messages in thread
From: erik quanstrom @ 2006-04-20  1:41 UTC (permalink / raw)
  To: 9fans

On Wed Apr 19 20:05:43 CDT 2006, rog@vitanuova.com wrote:
> i had es in mind when i wrote the inferno shell (vita nuova's, not the original tiny shell).

the inferno shell is quite nice.  good job.

> 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.)

for starters, it makes a nice paper.  ;-)   also it was used for the es debugger.  i never found it confusing
(due to lexical bindings) but never made use of it, either.

> for instance:
> > 	; if {condition1} {body1} {condition2} {body2}
>
> is not implemented by the core inferno shell, but by an externally loaded
> module (std).
>

pretty nice!

>
> 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. [...]
>
> 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.

i think you're right.  i wrote a shell in college that was similar to rc, but
lists were allowed to contain lists.  even this proved to be unworkable, as
"for(i in *.c *.h) echo $i" would print
	a.c b.c
	x.h y.h z.h
and not what was expected.

>
> 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.

i don't think it would be hard, but it would break td's basic design of compiling
everything at input time.  one way to thinking of es' rewriting is that it is
like rc's bytecode exposed.  i don't think it really hangs together though.  is this
	a | b
or this
	%pipe {a} 0 1 {b}
es code?

also, what does a traditional rc function do with a shell block?

>
> > 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.

it doesn't!  i didn't intend to imply that it did.  it was a trivial example.

- erik



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-04-21 14:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20  1:41 [9fans] Install from CD fails erik quanstrom
2006-04-20  6:17 ` Charles Forsyth
2006-04-20  6:35   ` [9fans] [OT] URI Charles Forsyth
2006-04-20  6:53     ` geoff
2006-04-20 15:01       ` Brantley Coile
2006-04-20 15:32         ` Paul Lalonde
2006-04-20 15:49           ` Brantley Coile
2006-04-20 16:04             ` Paul Lalonde
2006-04-20 16:47               ` Jack Johnson
2006-04-21  9:22                 ` Moritz Kiese
2006-04-21 14:47                   ` Brantley Coile
2006-04-21  4:54             ` quanstro

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).