From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: vm branch now uses vm repl by default Date: Wed, 10 Sep 2008 21:05:10 +0200 Message-ID: References: <87y721btiy.fsf@gnu.org> <87bpyx9gor.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1221074537 818 80.91.229.12 (10 Sep 2008 19:22:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2008 19:22:17 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 10 21:23:13 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KdVHQ-0004Ho-4r for guile-devel@m.gmane.org; Wed, 10 Sep 2008 21:23:08 +0200 Original-Received: from localhost ([127.0.0.1]:37398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdVGP-0002G8-Pf for guile-devel@m.gmane.org; Wed, 10 Sep 2008 15:22:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdVGJ-0002CH-8J for guile-devel@gnu.org; Wed, 10 Sep 2008 15:21:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdVGI-0002Ai-Dg for guile-devel@gnu.org; Wed, 10 Sep 2008 15:21:58 -0400 Original-Received: from [199.232.76.173] (port=43801 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdVGI-0002AO-6Q for guile-devel@gnu.org; Wed, 10 Sep 2008 15:21:58 -0400 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:40432 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KdVG6-0007sW-Sr; Wed, 10 Sep 2008 15:21:47 -0400 Original-Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 258F87B5F9; Wed, 10 Sep 2008 15:21:17 -0400 (EDT) Original-Received: from unquote (251.Red-83-32-65.dynamicIP.rima-tde.net [83.32.65.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id DBBB97B5F5; Wed, 10 Sep 2008 15:21:14 -0400 (EDT) In-Reply-To: <87bpyx9gor.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 09 Sep 2008 23:01:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Pobox-Relay-ID: A40CAF88-7F6D-11DD-9F35-3113EBD4C077-02397024!a-sasl-quonix.pobox.com X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7662 Archived-At: Howdy, On Tue 09 Sep 2008 23:01, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >> On Tue 09 Sep 2008 10:41, ludo@gnu.org (Ludovic Court=C3=A8s) 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 --=20 http://wingolog.org/