unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: vm branch now uses vm repl by default
Date: Wed, 10 Sep 2008 21:05:10 +0200	[thread overview]
Message-ID: <m34p4n7rfd.fsf@pobox.com> (raw)
In-Reply-To: <87bpyx9gor.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 09 Sep 2008 23:01:56 +0200")

Howdy,

On Tue 09 Sep 2008 23:01, ludo@gnu.org (Ludovic Courtès) writes:

>> On Tue 09 Sep 2008 10:41, ludo@gnu.org (Ludovic Courtès) writes:
>
>>> 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...).
>
> A use case is the following:
>
>   (define-module (foo))
>
>   (fluid-set! current-reader %my-favorite-reader)
>
>   ;; use non-standard syntax extensions from now on

This doesn't map very well to the current semantics of "guile-vm" -- I
was going to say "the compiler", but the compiler's fine with whatever,
it's more "the expected model of compilation" or something.

Currently when compiling an entire file, the entire file is read in and
compiled to bytecode as if it were all wrapped in a `begin'. The whole
file is compiled at once, because it was all read in at once. But that
means we have no semantic meaning to extract from the code at read-time.
What to do?

I would suggest going down a common-lispy route, and introducing read
macros. This is pretty firmly extension land anyway. Or, you could write
a custom compiler for skribilo -- probably four hours' work or so.

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

Ew. You are a bad person ;)

Cheers,

Andy
-- 
http://wingolog.org/




  reply	other threads:[~2008-09-10 19:05 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
2008-09-10 19:05       ` Andy Wingo [this message]
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=m34p4n7rfd.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@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).