From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: Persisting GOOPS objects Date: Tue, 22 Jan 2013 10:47:24 +0100 Message-ID: <87obghy2fn.fsf@pobox.com> References: <87bocja9vr.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358848063 30457 80.91.229.3 (22 Jan 2013 09:47:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2013 09:47:43 +0000 (UTC) Cc: guile-user@gnu.org To: Andrew Gaylard Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jan 22 10:48:02 2013 Return-path: Envelope-to: guile-user@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 1TxaSY-0001TI-Fj for guile-user@m.gmane.org; Tue, 22 Jan 2013 10:48:02 +0100 Original-Received: from localhost ([::1]:51968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxaSH-0002n3-64 for guile-user@m.gmane.org; Tue, 22 Jan 2013 04:47:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxaS3-0002Ve-CS for guile-user@gnu.org; Tue, 22 Jan 2013 04:47:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxaS1-00038u-V9 for guile-user@gnu.org; Tue, 22 Jan 2013 04:47:31 -0500 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:35883 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxaS1-00038h-PY for guile-user@gnu.org; Tue, 22 Jan 2013 04:47:29 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 8E8CFA0B0; Tue, 22 Jan 2013 04:47:27 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=sBEuaQ9FqSg65/es8DQvFmGMhgs=; b=FirARK f9wbrUq/cUeQl43oe7Vf0UUbyr0a8AXSLG5R2KR0OUENnQmDpr3V2hp1vasuzR6W 8jlslvDqwlVL1HvGwIMZgZi2Vy3dupLySbt/cgDQ+oCGKOww+Xb3ast0eulRfAN7 NKGIjuIntvDAnpQ19OSXVkAZmkLuHTAOpogRw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=WRs79l5y1MXRn3XZxDc/PCA4N0g9i3Jw iutpaYBLlGfRefscQ+Saj/Y900TjxPC2/tRC5tOphem1DN78VXvZ0cnFD1LGno+/ lUBGaRz2nvd5lHfBJoSFNDTVlB9obVxqC/PSesOIprK4eVj0YWrIsRBDg5l9Bap/ Z4NMnS5dm40= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 87764A0AF; Tue, 22 Jan 2013 04:47:27 -0500 (EST) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 119CBA0AE; Tue, 22 Jan 2013 04:47:26 -0500 (EST) In-Reply-To: (Andrew Gaylard's message of "Mon, 21 Jan 2013 14:48:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: BB138720-6478-11E2-9422-0A4F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9901 Archived-At: On Mon 21 Jan 2013 13:48, Andrew Gaylard writes: > ;; make a new class, make an instance of it, and show it > (define-class () r i) I did a ,trace (save-objects a (current-output-port)), and it shows: (enumerate-component! #< 16b9a20> #< 1d51770>) | (# #< 16b9a20>) | (cache-dispatch #< immediate? (7)> (#< 16b9a20>)) | [...] | (# #< 16b9a20>) | #t Which means that (immediate? c) ended up dispatching to the procedure on line 92 of save.scm, which is: (define-method (immediate? (o )) #t) Which returns true because your is a . So there seems to be an assumption somewhere that numbers are readable and writable as-is. It might suffice to define an (immediate? (o )) method. Dunno, I've never worked with this code before... Test cases and documentation are welcome :) Andy -- http://wingolog.org/