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:05:24 -0200 Message-ID: <20150128010524.762e14a2@capac> References: <20141219174633.6efb845e@capac> <8761btfcni.fsf@pobox.com> <20150126230044.2d1e71de@capac> <87sieweie4.fsf@pobox.com> <20150127171115.6172ccea@capac> <87zj94c5rv.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/jKNJEWRWtqlwYY80h2UGpvO"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1422414369 31793 80.91.229.3 (28 Jan 2015 03:06:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 03:06:09 +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:06:09 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 1YGIxC-0003NF-Ux for guile-devel@m.gmane.org; Wed, 28 Jan 2015 04:06:07 +0100 Original-Received: from localhost ([::1]:51038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGIxB-00061C-V4 for guile-devel@m.gmane.org; Tue, 27 Jan 2015 22:06:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGIx8-000615-5K for guile-devel@gnu.org; Tue, 27 Jan 2015 22:06:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGIx3-0001hE-4F for guile-devel@gnu.org; Tue, 27 Jan 2015 22:06:02 -0500 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:41693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGIx2-0001ed-Qb for guile-devel@gnu.org; Tue, 27 Jan 2015 22:05:57 -0500 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 8AAE4A04C247; Wed, 28 Jan 2015 04:05:35 +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 C6myOVoJvIho; Wed, 28 Jan 2015 04:05:28 +0100 (CET) Original-Received: from capac (unknown [179.210.38.75]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id CCB0EA04C243; Wed, 28 Jan 2015 04:05:27 +0100 (CET) In-Reply-To: <87zj94c5rv.fsf@pobox.com> 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:17643 Archived-At: --Sig_/jKNJEWRWtqlwYY80h2UGpvO Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello Andy, we should change the subject or start a new thread, maybe > Are you certain? What git revision are you using? I don't think the > test should "work" with the current stable-2.0 or master, or 1.8 for > that matter. Oh no, it's not working as it should, too bad: this time I cleared my cache I did not take care of that carefully enough I guess... anyway, the good ne= ws is that: I think we still are not talking about _exactly_ the same think here and hope that when we do, you will agree; 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 (that was a trick to circumvent till now); If that line does not exist, then using the setter on a instance must 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 :) So, here is the code, without the setter being redefined...: ;; module a.scm starts here (define-module (a) #:use-module (oop goops) #:export ( !width)) (define-class () (width #:accessor !width #:init-keyword #:width #:init-value 0)) (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 ;; module b.scm starts here (define-module (b) #:use-module (oop goops) #:use-module (a) #:export () #:re-export (!width)) (define-class ()) ;; module ends here And here is what I get, which is not correct: since I did not redefine any= thing at level, the slot and 'associated functionality', the setter in this c= ase, must be 'fully' inherited: it is the setter I define on that must be called = when being used on any instances, all and instances [ this time I left the guile version as well), please double check david@capac:~/alto/projects/guile-tests/goops 15 $ guile 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/next-method-not-called/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/next-method-not-called/a.scm.go ;;; compiling ./a.scm ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects= /guile-tests/goops/next-method-not-called/a.scm.go ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects= /guile-tests/goops/next-method-not-called/b.scm.go scheme@(guile-user)> (make ) $1 =3D #< 1ffcb80> scheme@(guile-user)> (!width $1) $2 =3D 0 scheme@(guile-user)> (set! (!width $1) 20) $3 =3D 20 scheme@(guile-user)>=20 Cheers, David --Sig_/jKNJEWRWtqlwYY80h2UGpvO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJUyFH0AAoJEPN0/ZOjBXrX26cH/0IjgnVAD90AuUjhUeBs7Fv+ HUqOhG83RlFT89RqKpqwcBw186203fxLGUMGVZteTchFn21SPkT5tFAs2l+/qRod tuvOL0UKG8ERjUx4yyVHHhQn4oizP9yD4nO6bUvZqv4DOOW9iNLn84lUWNoT+3EC qISqjlWE5Ia4eXos9xzuxqB/xTGA7FJgYh5ZZ4u+gQzo3qXJpq3z+MUYLdOFG29a k/BsilVd4vHWsKpyyqVPhW8DELBRqQIEO64l3zpj/r9lDaNY3VV/ttIi19tEFnUS ng85weiQiQeMA4PpNQeKC0XBHjTFoPSH2t6LF60NyqRmnqXvrfhvkqBOiHl6YZw= =QG1n -----END PGP SIGNATURE----- --Sig_/jKNJEWRWtqlwYY80h2UGpvO--