From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10309 invoked by alias); 9 Nov 2013 19:47:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10293 invoked by uid 89); 9 Nov 2013 19:47:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE,SPF_SOFTFAIL,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: smtp208.alice.it Received: from Unknown (HELO smtp208.alice.it) (82.57.200.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 09 Nov 2013 19:47:46 +0000 Received: from zigzag.favinet (95.245.72.85) by smtp208.alice.it (8.6.060.28) id 52443B820B4C0019; Sat, 9 Nov 2013 20:47:28 +0100 Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1VfEYk-0000rj-Pa; Sat, 09 Nov 2013 20:51:06 +0100 From: Thien-Thi Nguyen To: Doug Evans Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-user@gnu.org, gdb-patches@sourceware.org Subject: Re: guile scripting for gdb References: <87ob5vlr2s.fsf@gnu.org> Date: Sat, 09 Nov 2013 19:48:00 -0000 In-Reply-To: (Doug Evans's message of "Sat, 9 Nov 2013 10:40:18 -0800") Message-ID: <87bo1t73s0.fsf@zigzag.favinet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2013-11/txt/msg00258.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1446 () Doug Evans () Sat, 9 Nov 2013 10:40:18 -0800 Would it be ok to punt on eq?-ness until there's a compelling reason to make it work? Does the non-=E2=80=98eq?=E2=80=99-ness of smobs prevent them from retainin= g object properties, here? This is the long-standing bug that GNU Serveez is addressing (in the next release): http://git.savannah.gnu.org/cgit/serveez.git?h=3Dp by keeping a hash of all smobs, keyed on the underlying C object address, and requiring the C layer to inform the Guile glue code when the C object is about to be freed (a degenerate "observer pattern"). We are able to do this only because two of the types are in the glue code (no special hooks needed) and the one hook necessary for the type "internally" managed by libserveez is easy to add because we control the libserveez API. Anyway, however one chooses to do it (i am open to suggestions on how to do it better, btw!), the benefit to the user is that: (define prop (make-object-property)) (set! (prop OBJ) VALUE) works "normally, as expected" for OBJ =3D=3D smob wrapping the "same C object", as well as any other. (One less thing to worry about.) For GNU Serveez, at least, this is compelling enough. --=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature Content-length: 197 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlJ+kiMACgkQZwMiJEyAdQLYHgCg4s9EUBCmK86J0G06FXH0fLMa 3LgAnRgoc5nJZjas9YYW8HG7Oof519et =cbCe -----END PGP SIGNATURE----- --=-=-=--