From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: tomas@fabula.de Newsgroups: gmane.lisp.guile.user Subject: Re: Req for help on objects and environments Date: Mon, 6 Sep 2004 08:17:53 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20040906061753.GA21509@www> References: <1094027329.4057.78.camel@kuzgun> <1094237209.3785.48.camel@lark> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1094451503 18213 80.91.224.253 (6 Sep 2004 06:18:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Sep 2004 06:18:23 +0000 (UTC) Cc: Guile Users Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 06 08:18:16 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C4CpU-0008RG-00 for ; Mon, 06 Sep 2004 08:18:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4Cue-0004qb-4o for guile-user@m.gmane.org; Mon, 06 Sep 2004 02:23:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C4Cub-0004qU-8Y for guile-user@gnu.org; Mon, 06 Sep 2004 02:23:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C4CuZ-0004qI-M6 for guile-user@gnu.org; Mon, 06 Sep 2004 02:23:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4CuZ-0004qF-Jy for guile-user@gnu.org; Mon, 06 Sep 2004 02:23:31 -0400 Original-Received: from [217.22.192.104] (helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C4CpB-0006hR-18 for guile-user@gnu.org; Mon, 06 Sep 2004 02:17:57 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5002) id 3525E144DC; Mon, 6 Sep 2004 08:17:53 +0200 (CEST) Original-To: Andy Wingo Content-Disposition: inline In-Reply-To: <1094237209.3785.48.camel@lark> User-Agent: Mutt/1.5.3i X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3434 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3434 On Fri, Sep 03, 2004 at 07:46:49PM +0100, Andy Wingo wrote: > Hi Alp, >=20 [...] > Lexical environments are a different beast. You cannot access them with > r5rs, I don't think. However, with guile you can, although it's > definitely not documented. I tried to be less hacky with the following > macro, but define-macro's memoizing behaviour caused guile 1.6 to > segfault, so I had to use low-level macros: >=20 > (define make-environment > (procedure->syntax > (lambda (exp env) > (local-eval `(let* ,(let lp ((in (cdr exp)) (out '())) > (if (null? in) > (reverse out) > (lp (cddr in) (cons > (list (car in) (cadr in))= =20 > out)))) > (the-environment)) > env)))) Thanks for your insightful post. As a (mostly) lurker and (currently) non= - schemer (shame!) I appreciate this. Suggestion: Maybe call your macro make-local-environment -- that might he= lp newbies to keep apart those two beasts better. Regards -- tom=E1s _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user