Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnu.org>
To: Doug Evans <dje@sebabeach.org>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	guile-user@gnu.org, gdb-patches@sourceware.org
Subject: Re: guile scripting for gdb
Date: Sat, 09 Nov 2013 19:48:00 -0000	[thread overview]
Message-ID: <87bo1t73s0.fsf@zigzag.favinet> (raw)
In-Reply-To: <CAA8o+=Qhwj720CtfhUF=JuLs-GJ455uZ7gsRRripc=4vZDFWng@mail.gmail.com>	(Doug Evans's message of "Sat, 9 Nov 2013 10:40:18 -0800")

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

() Doug Evans <dje@sebabeach.org>
() 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-‘eq?’-ness of smobs prevent them from retaining 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=p

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 == 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.

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2013-11-09 19:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 16:04 Doug Evans
     [not found] ` <87ob5vlr2s.fsf@gnu.org>
2013-11-09 19:47   ` Doug Evans
2013-11-09 19:48     ` Thien-Thi Nguyen [this message]
2013-11-10  6:26     ` Doug Evans
2013-11-11  1:50     ` Ludovic Courtès
2013-11-11  6:28       ` Doug Evans
2013-11-11  6:37         ` Doug Evans
2013-11-11 13:16           ` Ludovic Courtès
2013-11-11 11:55         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bo1t73s0.fsf@zigzag.favinet \
    --to=ttn@gnu.org \
    --cc=dje@sebabeach.org \
    --cc=gdb-patches@sourceware.org \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox