rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: John (I don't want no teenage queen / I just want my M-fourteen) Mackin <john@ civil.su.oz.au>
To: The rc Mailing List <rc@hawkwind.utcs.toronto.edu>
Subject: An interesting (maybe) point
Date: Sun, 13 Dec 1992 20:58:29 -0500	[thread overview]
Message-ID: <199212141258.4391.rc.bafeg@civil.su.oz.au> (raw)

After the discussions of some months back regarding "what is a function",
and "what is a return value", I pricked up my ears (as it were) when I
saw the following arrive on the ZMailer mailing list.  For those who
aren't familiar with it, ZMailer is a mail delivery system.  Part of
it is a shell, called "zsh", which is not to be confused with the
PD interactive shell of the same name.  ZMailer's zsh is intended to
be Bourne-with-extensions, and is used for writing ZMailer's configuration
scripts.  It has lists, and its lists nest, unlike rc.  That (IMHO)
makes it much harder to program in -- rc's flat lists are a much more
natural model for a shell.  Anyway, here is a cautionary tale that
demonstrates what happens when you don't keep the overall guiding principle
of what you are doing carefully in mind.

OK,
John.

--- begin message from ZMailer list
From: Felix Lee <flee@guardian.cs.psu.edu>
Date: Tue, 8 Dec 1992 03:13:30 +1100
To: zmailer@cs.toronto.edu
Subject: zmailer, zsh makes numbers disappear.
Message-Id: <92Dec7.110320est.87558@guardian.cs.psu.edu>

If you send mail to "123456", zmailer bounces it back correctly, but
the error says "no such user -" instead of "no such user 123456".

The number disappears because crossbar calls (uucproute "123456"), and
uucproute does a (return "$address"), where address=123456.

The problem is 'return' behaves entirely differently when it's given a
number.  This is a strange problem with zsh.  It looks like this will
also cause other subtle router problems that rarely occur in normal
operation, but will get exposed by the right combination of errors.

Workaround: replace all occurrences of (return $string) with
(echo $string; return), which a little less efficient, but does the
correct thing.
- --
--- end message from ZMailer list


                 reply	other threads:[~1992-12-14  2:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=199212141258.4391.rc.bafeg@civil.su.oz.au \
    --to=john@civil.su.oz.au \
    --cc=rc@hawkwind.utcs.toronto.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).