From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.devel Subject: Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a subclass Date: Wed, 28 Jan 2015 01:36:05 -0200 Message-ID: <20150128013605.5341bfae@capac> References: <20141219174633.6efb845e@capac> <8761btfcni.fsf@pobox.com> <20150126230044.2d1e71de@capac> <87sieweie4.fsf@pobox.com> <20150127171115.6172ccea@capac> <87zj94c5rv.fsf@pobox.com> <20150128010524.762e14a2@capac> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/ZHlYOU_FKVtkXGKpHOyR9Uc"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1422416193 29616 80.91.229.3 (28 Jan 2015 03:36:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 03:36:33 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 28 04:36:32 2015 Return-path: Envelope-to: guile-devel@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 1YGJQc-0007kT-OL for guile-devel@m.gmane.org; Wed, 28 Jan 2015 04:36:31 +0100 Original-Received: from localhost ([::1]:51135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGJQc-0004bg-5A for guile-devel@m.gmane.org; Tue, 27 Jan 2015 22:36:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGJQX-0004bZ-Tu for guile-devel@gnu.org; Tue, 27 Jan 2015 22:36:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGJQU-0003Jh-Oh for guile-devel@gnu.org; Tue, 27 Jan 2015 22:36:25 -0500 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:42401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGJQU-0003JQ-HF for guile-devel@gnu.org; Tue, 27 Jan 2015 22:36:22 -0500 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 47CC2A04C24B; Wed, 28 Jan 2015 04:36:21 +0100 (CET) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id 7Wr3Km7auUaH; Wed, 28 Jan 2015 04:36:12 +0100 (CET) Original-Received: from capac (unknown [179.210.38.75]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id BFD37A04C23A; Wed, 28 Jan 2015 04:36:07 +0100 (CET) In-Reply-To: <20150128010524.762e14a2@capac> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 79.99.200.102 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:17644 Archived-At: --Sig_/ZHlYOU_FKVtkXGKpHOyR9Uc Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi again, and, to be very very precise, I even renamed my directory now [which appear= s in the compilation trace] because its previous name was terrible (and terribly wro= ng)! so, the appropriate directory name is: .../setter-inheritance-bug [ the new trace is here below, 'in place' [ the rest of the text is unchanged [ and I still pretend it is a bug Cheers, David > ... > Oh no, it's not working as it should, too bad: this time I cleared my ca= che > I did not take care of that carefully enough I guess... anyway, the good = news is > that: >=20 > I think we still are not talking about _exactly_ the same think here and > hope that when we do, you will agree; >=20 > Indeed please note that in the code of my previous message, the define > setter on the class _is_ commented: i am sorry if it induced you in > some sort of misunderstanding, but that line should _not_ even exist (th= at > was a trick to circumvent till now); >=20 > If that line does not exist, then using the setter on a instance mu= st > call/execute the code of the setter defined at superclass level, in = our > case. by no mean, it should internally/hiddenly redefine my beautiful > setter :), in my back, not without talking to me first anyway :) >=20 > So, here is the code, without the setter being redefined...: >=20 > ;; module a.scm starts here > (define-module (a) > #:use-module (oop goops) > #:export ( > !width)) >=20 > (define-class () > (width #:accessor !width #:init-keyword #:width #:init-value 0)) >=20 > (define-method ((setter !width) (self ) width) > ;; here comes complex code, computing earth orbit and calling lower > ;; level clutter internals, such as the layout... > (pk "this is !width setter method, hello!") > (slot-set! self 'width width)) > ;; module ends here >=20 > ;; module b.scm starts here > (define-module (b) > #:use-module (oop goops) > #:use-module (a) > #:export () >=20 > #:re-export (!width)) >=20 > (define-class ()) > ;; module ends here >=20 > And here is what I get, which is not correct: since I did not redefine a= nything > at level, the slot and 'associated functionality', the setter in this= case, > must be 'fully' inherited: it is the setter I define on that must be = called > when being used on any instances, all and instances >=20 > [ this time I left the guile version as well), please double check david@capac:~/alto/projects/guile-tests/goops/setter-inheritance-bug 21 $ g= uile GNU Guile 2.0.11.113-583a Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> ,use (oop goops) scheme@(guile-user)> ,use (b) ;;; note: source file ./b.scm ;;; newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/= usr/alto/projects/guile-tests/goops/setter-inheritance-bug/b.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling ./b.scm ;;; note: source file ./a.scm ;;; newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/= usr/alto/projects/guile-tests/goops/setter-inheritance-bug/a.scm.go ;;; compiling ./a.scm ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects= /guile-tests/goops/setter-inheritance-bug/a.scm.go ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects= /guile-tests/goops/setter-inheritance-bug/b.scm.go scheme@(guile-user)> (make ) =20 $1 =3D #< 21b39a0> scheme@(guile-user)> (!width $1) $2 =3D 0 scheme@(guile-user)> (set! (!width $1) 20) $3 =3D 20 scheme@(guile-user)>=20 --Sig_/ZHlYOU_FKVtkXGKpHOyR9Uc Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJUyFklAAoJEPN0/ZOjBXrXHKsH/2aa8gA+2+uU+oSb+urHJcht 1MObeiJxCooWuo3CF75URwBVdjNLzmjskzI4GZE7gmz3O7xi5Uz8fhHdTk5/w/Bt n1zmbhAim6302ZoZ/RcHCQQNUZrY5mptAAACY9iOGHFU3Vdl2HA8rgxcS2G0sDfg O+Th5Zz/6pYykShq7/4ZKUfwjActw0K/Enl3sFTA0M6M5OS0jpx1WJVOFLiDAS3o kEVbBG+frX+GZAyo5pAKX6S0e08cukb5lvi7+iI8z4TcTo05KGofBlK6zoqAITy8 nwfY2PuBT1JILwFqKn16SXVBTNlF9oF8xaj0Oo8L9fLTX0RjUAdt4p0eQo7Wkhs= =wn3a -----END PGP SIGNATURE----- --Sig_/ZHlYOU_FKVtkXGKpHOyR9Uc--