From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Per-module reader, take #2 Date: Thu, 20 Oct 2005 09:59:44 +0200 Organization: LAAS-CNRS Message-ID: <87d5m0ty8f.fsf@laas.fr> References: <87u0gp9lm3.fsf@laas.fr> <877jd3lkdq.fsf@ossau.uklinux.net> <87hdc62a6c.fsf@laas.fr> <87irw49twc.fsf@laas.fr> <87irw3prgp.fsf@ossau.uklinux.net> <8764rw7b9q.fsf_-_@laas.fr> <871x2j98qb.fsf@ossau.uklinux.net> <87u0ffnudk.fsf@laas.fr> <87sluxb0xt.fsf@ossau.uklinux.net> <87sluxugm1.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129801456 2491 80.91.229.2 (20 Oct 2005 09:44:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2005 09:44:16 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 20 11:44:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ESWxZ-0007UQ-Lr for guile-devel@m.gmane.org; Thu, 20 Oct 2005 11:43:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESWxX-0003Nc-U2 for guile-devel@m.gmane.org; Thu, 20 Oct 2005 05:43:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ESVTS-0006bg-IB for guile-devel@gnu.org; Thu, 20 Oct 2005 04:08:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ESVQI-0006HO-Sd for guile-devel@gnu.org; Thu, 20 Oct 2005 04:05:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESVOa-00065g-HU for guile-devel@gnu.org; Thu, 20 Oct 2005 04:03:29 -0400 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1ESVOZ-0007YI-Oa for guile-devel@gnu.org; Thu, 20 Oct 2005 04:03:28 -0400 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id j9K83P54014198; Thu, 20 Oct 2005 10:03:26 +0200 (CEST) Original-To: Neil Jerram X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 29 =?iso-8859-1?Q?Vend=E9miaire?= an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Neil Jerram , guile-devel@gnu.org In-Reply-To: <87sluxugm1.fsf@zip.com.au> (Kevin Ryde's message of "Thu, 20 Oct 2005 11:22:46 +1000") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0.496 () MAILTO_TO_SPAM_ADDR X-Scanned-By: MIMEDefang at CNRS-LAAS 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:5327 Archived-At: Hi, Kevin Ryde writes: > I think that may be possible already using current-load-port. > Something like > > (define-module (foo bar) > ...) > (my-zany-reader) > > where `my-zany-reader' reads and parses from current-load-port and > does whatever with the results, like make new defines presumably. > > This could be used for the entire rest of the file, or stop at some > point like a "here-document" perhaps. This looks quite hackish, indeed. And what exactly would happen to `primitive-load' (which is the one that triggered the call to `my-zany-reader') when `my-zany-reader' returns? If everything works fine, then the file offset of `current-load-port' will now point to where `my-zany-reader' finished its job. That's relying too much on side-effects. > Wouldn't be compiler-friendly, but I wouldn't worry about that until > there's an actual compiler to be friendly with :-). Well, keep in mind that Keishude's Guile-VM is not that far from usable. So far, I only ported it to 1.7 and started using it and documenting it. There are certainly still bugs but it's worth putting some efforts in it. I hope I'll be able to release something in the foreseeable future. > `load' is pretty simple, isn't it? One can make a new open/read/eval > without too much trouble. I guess there's bits like path searching > and current module saving. Maybe they only need to be better > documented though. Yes, they probably do need to be better documented. ;-) Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel