unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@giblet.glug.org>
Cc: guile-devel@gnu.org
Subject: Re: snarfer guard macro name decision: SCM_MAGIC_SNARFER
Date: Thu, 14 Mar 2002 14:43:25 -0800	[thread overview]
Message-ID: <E16ldwT-0007Yb-00@giblet> (raw)
In-Reply-To: <87vgbzx8y7.fsf@zagadka.ping.de> (message from Marius Vollmer on 14 Mar 2002 20:09:36 +0100)

   From: Marius Vollmer <mvo@zagadka.ping.de>
   Date: 14 Mar 2002 20:09:36 +0100

   > this is not guaranteed to work; when invoked w/ "foo > out.x", the shell
   > does indeed create out.x first, satisfying most CPPs' requirements for
   > out.x existing to be #included.

   Sorry, I was confused.  I still am, for that matter.  How can it
   happen that during

       guile-snarf foo.c >foo.x

   the file foo.x does not exist?  It should get created by the shell
   before guile-snarf is executed.

wrt when foo.x is created, we're saying the same thing.  (the "this is
not guaranteed to work" applies to the whole design -- where we need to
regard mere file availability as insufficient.)

   This is a specific problem on AIX, and the workaround need only work
   on AIX, so we only need to worry about this when AIX does in fact
   buffer echoes.  I would be surprised if it does...

the AIX problem is not that its shell buffers echo, but that its cpp
(reportedly) doesn't like to #include an empty .x file.  shells (of any
platform) buffering subprocess output could be regarded as a problem,
but is generally accepted (and desirable for obvious reasons), so we
need to re-examine our usage.

here's a simple program that tests the relevant behavior:

 #!/bin/sh
 echo hi
 cat zz

save to file z, chmod +x z, and invoke it like "z > zz".
what do you see?  on my system i see:

 cat: zz: input file is output file

and the program exits w/ non-zero status value.  substitute cat w/ some
other program that eventually needs to read zz, and it is no surprise if
that program fails.  thus, i conclude that in general this kind of usage
is the wrong way to go about things, not because cat failed, but because
this style forces us to know the intracacies of each program (e.g.,
"test -f" works, "test -s" works sometimes, etc), which is a PITA to
determine and maintain.  big lose.

we can special-case for AIX but that way lies madness.  the approach
i've taken is to look at the AIX problem as an additional constraint
that when satisfied should not burden other platforms.

   Yes, but it is still easier not to change existing code that makes use
   of the old behavior of guile-snarf.

here, the code that needs changing is primarily in makefiles, which are
not as big a pain to update as C source, there being fewer makefiles
than source files typically.

(if someone installs a new guile (and new guile-snarf), they need to
modify the makefile to enable some compatibility anyway.  in the process
if they don't take advantage of the less-crufty new usage and demand
"support" for making them do more work, rather than question their
dubious judgement (and unslackful ethics) i suppose my response would be
to say that guile-snarf was never documented in the first place, and be
done w/ it.)

on the other hand, i am eager to resolve the SCM_VCELL removal issue in
favor of allowing minimal changes to C source.

thi

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-03-14 22:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13  7:51 snarfer guard macro name decision: SCM_MAGIC_SNARFER Thien-Thi Nguyen
2002-03-13  9:26 ` Thien-Thi Nguyen
2002-03-13 19:15   ` Marius Vollmer
2002-03-13 21:28     ` Thien-Thi Nguyen
2002-03-13 22:00       ` Rob Browning
2002-03-13 22:58         ` Thien-Thi Nguyen
2002-03-14  0:12           ` Thien-Thi Nguyen
2002-03-14  5:44             ` Rob Browning
2002-03-14 18:48             ` Marius Vollmer
2002-03-14 20:44               ` Thien-Thi Nguyen
2002-03-14 23:35                 ` Marius Vollmer
2002-03-15  4:26                   ` Thien-Thi Nguyen
2002-03-15 15:56                     ` Thien-Thi Nguyen
2002-03-15 21:19                       ` Marius Vollmer
2002-03-14  5:56           ` Thien-Thi Nguyen
2002-03-14  6:58             ` Rob Browning
2002-03-14  7:17               ` Rob Browning
2002-03-14  9:32                 ` Thien-Thi Nguyen
2002-03-14 23:40             ` Marius Vollmer
2002-03-14 19:09       ` Marius Vollmer
2002-03-14 22:43         ` Thien-Thi Nguyen [this message]
2002-03-14 23:31           ` Rob Browning
2002-03-15 21:12           ` Marius Vollmer
2002-03-15 21:33             ` Rob Browning
2002-03-15 21:58               ` Marius Vollmer
2002-03-17 17:07                 ` Rob Browning
2002-03-18  0:07                   ` Marius Vollmer
2002-03-18  2:52                     ` Rob Browning
2002-03-20 21:11                       ` Marius Vollmer
2002-03-21 16:23                         ` Rob Browning
2002-04-24 20:07                           ` Marius Vollmer
2002-04-24 20:42                             ` Rob Browning

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=E16ldwT-0007Yb-00@giblet \
    --to=ttn@giblet.glug.org \
    --cc=guile-devel@gnu.org \
    --cc=ttn@glug.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).