unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludovic.courtes@laas.fr (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Getting source location information
Date: Wed, 30 Nov 2005 15:44:40 +0100	[thread overview]
Message-ID: <878xv62o13.fsf_-_@laas.fr> (raw)
In-Reply-To: <200511300600.54799.bruce.korb@gmail.com> (Bruce Korb's message of "Wed, 30 Nov 2005 06:00:54 -0800")

Bruce Korb <bruce.korb@gmail.com> writes:

> Because the file is mostly *NOT* scheme.

I did say that you could use "Scheme constructs", "be it from Scheme
o[r] C code".  In other words, you can either write `(read)' in a piece
of Scheme code, or call `scm_read ()' from your C code: both are
strictly equivalent (well, almost).

The point is: do not rewrite what already exists because *this* is hard
to maintain.

Actually, what you want is `primitive-load' + `read' (which handles
piggy-backing of source location information as I said).  It is true,
however, that `primitive-load' (or, rather, `open-input-file') is not
guaranteed to use `mmap ()' the way you do it currently[*].  So if you
do want to make sure that the input file is `mmap'd the way you like,
then you may want to write your own variant of `primitive-load' (see
`libguile/load.c').

In any case, I can hardly imagine how Guile itself could be more helpful
than this.  ;-)

Thanks,
Ludovic.


[*] Actually, Guile currently does not use `mmap ()' at all.  Perhaps
    file ports should be revised to take advantage of this where
    available.


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


  reply	other threads:[~2005-11-30 14:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-28  4:25 I don't want to maintain this Bruce Korb
2005-11-29  8:16 ` Ludovic Courtès
2005-11-29 20:14   ` Bruce Korb
2005-11-30  8:39     ` Ludovic Courtès
2005-11-30 12:30       ` Bruce Korb
2005-11-30 13:46         ` Ludovic Courtès
2005-11-30 14:00           ` Bruce Korb
2005-11-30 14:44             ` Ludovic Courtès [this message]
2005-11-30 15:30               ` Getting source location information Bruce Korb
2005-11-30 16:04                 ` Ludovic Courtès
2005-11-30 16:58                   ` Bruce Korb
2005-11-30 17:39                     ` Ludovic Courtès
2005-12-01 12:19                       ` Ludovic Courtès
2005-11-30 19:00                   ` Rob Browning
2005-11-30 20:53                     ` Bruce Korb
2005-11-30 22:35                       ` Rob Browning
2005-11-30 23:30                         ` Bruce Korb
2005-12-14 21:54                           ` Kevin Ryde
2005-11-30 23:45                 ` Han-Wen Nienhuys
2005-12-01  0:30 ` I don't want to maintain this Kevin Ryde
2005-12-01  0:38 ` Kevin Ryde
2005-12-07  0:36   ` Marius Vollmer

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=878xv62o13.fsf_-_@laas.fr \
    --to=ludovic.courtes@laas.fr \
    --cc=guile-devel@gnu.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).