From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: vm branch now uses vm repl by default
Date: Tue, 09 Sep 2008 23:01:56 +0200 [thread overview]
Message-ID: <87bpyx9gor.fsf@gnu.org> (raw)
In-Reply-To: m3ljy16vc7.fsf@pobox.com
Hello!
Andy Wingo <wingo@pobox.com> writes:
> On Tue 09 Sep 2008 10:41, ludo@gnu.org (Ludovic Courtès) writes:
>
>> So, previously, there was `variable-ref':
>
> There still is. It is used when a variable is bound immediately, when it
> is pushed on the stack by a link-now instruction.
OK, I see.
>> Now, there's also a vector associated with each closure to store
>> references to global variables, right? Looks better!
>
> That's always been the case IIRC, only before it used to push and pop a
> bit more -- instead of
>
> (late-variable-ref 0)
>
> it would be
>
> (object-ref 0)
> (variable-ref)
Oh, right.
>> It'd be nice if we could find a way to "do something" with the
>> `current-reader' fluid at compilation time, like detecting top-level
>> `(fluid-set! current-reader ...)' statements and use that to switch the
>> compiler's reader (hacky...).
>
> Perhaps, there is already a repl-reader fluid for readline's benefit.
> Note also that languages have readers as well, so that e.g. elisp can
> read differently from scheme.
Right, but `current-reader' is a dynamic thing, which complicates the
situation.
A use case is the following:
(define-module (foo))
(fluid-set! current-reader %my-favorite-reader)
;; use non-standard syntax extensions from now on
I use it this way in Skribilo, but I may well be the only user, who
knows. ;-)
Anyway, if we are to handle this at all, we're probably going to have to
pattern-match this in `translate.scm' and switch readers when we
encounter it.
Thanks,
Ludo'.
next prev parent reply other threads:[~2008-09-09 21:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 6:48 vm branch now uses vm repl by default Andy Wingo
2008-09-09 8:27 ` Neil Jerram
2008-09-09 17:59 ` Andy Wingo
2008-09-09 22:27 ` Neil Jerram
2008-09-09 8:41 ` Ludovic Courtès
2008-09-09 18:13 ` Andy Wingo
2008-09-09 21:01 ` Ludovic Courtès [this message]
2008-09-10 19:05 ` Andy Wingo
2008-09-09 22:43 ` Neil Jerram
2008-09-10 18:51 ` Andy Wingo
2008-09-10 21:24 ` Neil Jerram
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=87bpyx9gor.fsf@gnu.org \
--to=ludo@gnu.org \
--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).