unofficial mirror of guile-user@gnu.org 
 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 20:50:55 +0100	[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:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 16:00 guile scripting for gdb Doug Evans
2013-11-07 23:39 ` Ludovic Courtès
2013-11-09 18:40   ` Doug Evans
2013-11-09 19:50     ` Thien-Thi Nguyen [this message]
2013-11-09 20:33     ` Doug Evans
2013-11-11  0:19     ` Ludovic Courtès
2013-11-11  1:50       ` Doug Evans
2013-11-11  6:28         ` Doug Evans
2013-11-11 11:55           ` Ludovic Courtès
2013-11-11 11:47         ` Ludovic Courtès
2013-11-30  9:15   ` msematman
2013-12-02  3:49     ` Nala Ginrut
2013-12-02 12:10       ` extending guile programs thru python (or lua, or whatever ...) msematman
  -- strict thread matches above, loose matches on Subject: below --
2013-11-04 15:57 guile scripting for gdb Doug Evans

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

  List information: https://www.gnu.org/software/guile/

* 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).