From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Atticus Newsgroups: gmane.lisp.guile.bugs Subject: bug#21855: eq? Date: Mon, 09 Nov 2015 08:57:59 +0100 Message-ID: <87si4fvc3c.fsf@posteo.org> References: <87r3k2ezjr.fsf@posteo.org> <20151108102323.GA5299@tuxteam.de> <87pozkoby5.fsf@posteo.org> <20151108133835.GA11324@tuxteam.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447055960 10406 80.91.229.3 (9 Nov 2015 07:59:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Nov 2015 07:59:20 +0000 (UTC) Cc: 21855@debbugs.gnu.org To: tomas@tuxteam.de Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Nov 09 08:59:11 2015 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZvhM6-0002Ww-Cq for guile-bugs@m.gmane.org; Mon, 09 Nov 2015 08:59:10 +0100 Original-Received: from localhost ([::1]:50709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvhM5-00081V-Oi for guile-bugs@m.gmane.org; Mon, 09 Nov 2015 02:59:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvhM2-00081Q-Dt for bug-guile@gnu.org; Mon, 09 Nov 2015 02:59:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvhLy-0001Fo-B0 for bug-guile@gnu.org; Mon, 09 Nov 2015 02:59:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvhLy-0001Fi-7S for bug-guile@gnu.org; Mon, 09 Nov 2015 02:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZvhLx-0004Mo-Qq for bug-guile@gnu.org; Mon, 09 Nov 2015 02:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Atticus Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 09 Nov 2015 07:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21855 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 21855-submit@debbugs.gnu.org id=B21855.144705589516735 (code B ref 21855); Mon, 09 Nov 2015 07:59:01 +0000 Original-Received: (at 21855) by debbugs.gnu.org; 9 Nov 2015 07:58:15 +0000 Original-Received: from localhost ([127.0.0.1]:58151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvhLD-0004Lr-7O for submit@debbugs.gnu.org; Mon, 09 Nov 2015 02:58:15 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:40762) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvhL9-0004Lg-NS for 21855@debbugs.gnu.org; Mon, 09 Nov 2015 02:58:13 -0500 Original-Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 73C99209F3 for <21855@debbugs.gnu.org>; Mon, 9 Nov 2015 08:58:09 +0100 (CET) Original-Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3nvPnm1RPVz5vND; Mon, 9 Nov 2015 08:58:03 +0100 (CET) In-Reply-To: <20151108133835.GA11324@tuxteam.de> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7886 Archived-At: tomas@tuxteam.de writes: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sun, Nov 08, 2015 at 02:30:42PM +0100, Atticus wrote: > > [...] > >> Yes you are right that the implementation may treat it as non #f if both >> arguments refer to the same object. In r5rs (and also r6rs) (eq? '(a) >> '(a)) is unspecified (r5rs, page 19) and thus implementation dependant >> but I don't think the behaviour of eq? is consistent in guile. > > My hunch is that it *can't* be consistent (see below) > >> As I said >> (eq? '(a b) '(a b)) on its own returns #f and imho there is no reason why eq? >> inside a procedure (in this example in 'multirember') should behave >> different, since the '(a b) in the second argument does not refer to the >> '(a b) of the first argument. > > Modulo vagaries of the optimizer :-) :-) >> Since it's not clear if this is a "real" bug, perhaps a further >> discussion at guile-user@gnu.org would be better. What is the >> recommended proceeding in such a case? A reply with the pseudo-header >> "X-Debbugs-CC: guile-user@gnu.org"? Or is that not necessary and a >> simple mail to guile-user to discuss this topic is sufficient? > > Note that I'm not authoritative in this questions, so you'll have to > wait on someone with more knowledge than me for a more definiteve answer. Ok. > But as far as I can gather, those things can get caught in a common > subexpression elimination[1] step, and the results will depend on the > current optimization strategies. That's why r5rs is vague about that. > They (rightfully) don't want to shut off those (in some cases vital) > optimizations. > > The take away (for me, at least) is "use eq? just for symbols", at > least unless you know what you are doing. > > [1] Thanks for the link; an interesting read.