From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: bound identifiers Date: Mon, 16 Jan 2012 22:56:44 +0100 Message-ID: References: <87d3ajibga.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015174c3d145284f804b6ac4a2e X-Trace: dough.gmane.org 1326751013 13758 80.91.229.12 (16 Jan 2012 21:56:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2012 21:56:53 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 16 22:56:49 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RmuXp-0005NG-3E for guile-devel@m.gmane.org; Mon, 16 Jan 2012 22:56:49 +0100 Original-Received: from localhost ([::1]:35864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmuXo-00018w-Mm for guile-devel@m.gmane.org; Mon, 16 Jan 2012 16:56:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmuXm-00018o-W1 for guile-devel@gnu.org; Mon, 16 Jan 2012 16:56:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmuXl-0000Sm-JZ for guile-devel@gnu.org; Mon, 16 Jan 2012 16:56:46 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:58862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmuXl-0000Sg-92 for guile-devel@gnu.org; Mon, 16 Jan 2012 16:56:45 -0500 Original-Received: by eaan1 with SMTP id n1so1192366eaa.0 for ; Mon, 16 Jan 2012 13:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=l8F6mVBp3YOY4431W+qiqRzXLeYGDHPrk4WbJ7EVxwM=; b=vu+K4yeXT/DFoY6a0IygWxhZRev1hEWwGCoCYlB2ZIjPN4B51+Tkt0ncs8C3eju+Sl XsejUVDep4gWIRPW+SMBQkHpTUNMi44FsVU4aGiiFfxhWV+jl8gczNP3xVB1uAzIoP3e gufIfX2TlvKlNDCmkPkpylsPfzwEaybg1xvRE= Original-Received: by 10.213.12.194 with SMTP id y2mr3953120eby.136.1326751004394; Mon, 16 Jan 2012 13:56:44 -0800 (PST) Original-Received: by 10.213.33.77 with HTTP; Mon, 16 Jan 2012 13:56:44 -0800 (PST) In-Reply-To: <87d3ajibga.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13548 Archived-At: --0015174c3d145284f804b6ac4a2e Content-Type: text/plain; charset=ISO-8859-1 In syntax parse the racket code stores syntax values inside structs and then transport them down the macro chain as argument to macros. Then when unpacking the struct they are compared with arguments of syntax values. I think that this is the reason. I tried to experiment with psyntax macro expander to poke inside structs and that solved this issue. But on the other hand even worse problem appeared. What I did now was to manually clean the syntax values e.g. remove #f and shift from the syntax value and this gave the best result. As you see, it's just wild west to get the racket code working. Mayby just writing a version from scratch would be better. /Stefan On Mon, Jan 16, 2012 at 10:28 PM, Andy Wingo wrote: > On Mon 16 Jan 2012 20:46, Stefan Israelsson Tampe > writes: > > > why are these two not equal in the sense of bound-identifier=? > > > > #(syntax-object x ((top) #(ribcage () () ()) #(ribcage () () ()) > #(ribcage #(x) #((m1104 top)) #("i1105"))) (hygiene guile-user)) > > #(syntax-object x ((#f top) shift #(ribcage () () ()) #(ribcage #(x) > #((m1104 top)) #("i1105"))) (hygiene guile-user))) > > One has been anti-marked and the other has not? Meaning that one was > made up by your syntax expander, and the other and the other came in as > part of the form. > > But that's not the right question or answer. Can you should where these > identifiers come from? > > Andy > -- > http://wingolog.org/ > --0015174c3d145284f804b6ac4a2e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable In syntax parse the racket code stores syntax values inside structs and the= n transport them
down the macro chain as argument to macros. Then when u= npacking the struct they are compared
with arguments of syntax values. I= think that this is the reason. I tried to experiment with
psyntax macro expander to poke inside structs and that solved this issue. B= ut on the other hand
even worse problem appeared.

What I did now = was to manually clean the syntax values e.g. remove #f and shift from the <= br> syntax value and this gave the best result.

As you see, it's jus= t wild west to get the racket code working.

Mayby just writing a ver= sion from scratch would be better.

/Stefan

On Mon, Jan 16, 2012 at 10:28 PM, Andy Wingo <wingo@pobox.com> wrote:
On Mon 16 Jan 2012 20:46, Stefan Is= raelsson Tampe <stefan.itampe= @gmail.com> writes:

> why are these two not equal in the sense of bound-identifier=3D?
>
> #(syntax-object x ((top) #(ribcage () () ()) #(ribcage () () ()) #(rib= cage #(x) #((m1104 top)) #("i1105"))) (hygiene guile-user))
> #(syntax-object x ((#f top) shift #(ribcage () () ()) #(ribcage #(x) #= ((m1104 top)) #("i1105"))) (hygiene guile-user)))

One has been anti-marked and the other has not? =A0Meaning that= one was
made up by your syntax expander, and the other and the other came in as
part of the form.

But that's not the right question or answer. =A0Can you should where th= ese
identifiers come from?

Andy
--
http://wingolog.org/=

--0015174c3d145284f804b6ac4a2e--