rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Alan Watson <alan@oldp.astro.wisc.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: forking builtins
Date: Fri, 24 Sep 1993 12:40:58 -0400	[thread overview]
Message-ID: <9309241640.AA14894@oldp.astro.wisc.edu> (raw)

Of the suggestions I have seen so far, Malte's `line is clearly the
suggestion most in line with the rc philosophy.  However, it isn't
going to satisfy the performance demands (needs?) of many people.

At first glance a builtin read will be no faster than line because of
the way rc handles the redirection of builtins.  However, all one needs
to do is the following:

	exec <file
	while (read LINE) {

The same trick can be used with whatis -s.

The only impediment is choice of a fd on which to save stdin/stdout.
Anyone for adding $newfd to rc?

I can support the following course of action:

(a) add Malte's builtin line and rewrite UNIX so that fork is fast.

(b) add builtin read and rewrite rc's redirection on builtins.

(c) add builtin read and add $newfd to allow stdin/stdout to be safely moved.

(d) doing nothing rather than doing a half-baked job.

I favour (c), as it seems the most return for the least effort, but I
appreciate the attraction of (d).  rc is about as perfect as one could
hope, and meddling with near perfection is dangerous.

And, yes, a hypothetical read MUST do IFS splitting but should only
take one argument -- we have lists, let's use them.  The only question
is whether it should also allow one to specify the character which
terminates a record (IRT -- internal record terminator?).  I will even
promise to write a version which does this before the end of October.

And now, back to work.


             reply	other threads:[~1993-09-24 16:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-24 16:40 Alan Watson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-09-24 21:19 Tom Culliton x2278
1993-09-24  0:03 Tom Culliton x2278
1993-09-23 22:02 Paul Haahr
1993-09-23 18:57 Arnold Robbins

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:

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

  git send-email \
    --in-reply-to=9309241640.AA14894@oldp.astro.wisc.edu \
    --to=alan@oldp.astro.wisc.edu \
    --cc=rc@hawkwind.utcs.toronto.edu \


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