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: Does anyone have an applicable struct example Date: Tue, 29 Jun 2010 11:56:49 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277805378 9076 80.91.229.12 (29 Jun 2010 09:56:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2010 09:56:18 +0000 (UTC) Cc: guile-user@gnu.org To: Tristan Colgate Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 29 11:56:15 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OTXY5-0001Xk-B1 for guile-user@m.gmane.org; Tue, 29 Jun 2010 11:56:13 +0200 Original-Received: from localhost ([127.0.0.1]:53559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTXY4-0000vB-N0 for guile-user@m.gmane.org; Tue, 29 Jun 2010 05:56:12 -0400 Original-Received: from [140.186.70.92] (port=50434 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTXWI-0000Kx-Am for guile-user@gnu.org; Tue, 29 Jun 2010 05:54:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTXWH-0005x8-0d for guile-user@gnu.org; Tue, 29 Jun 2010 05:54:22 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:56926 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTXWG-0005x1-UX for guile-user@gnu.org; Tue, 29 Jun 2010 05:54:20 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 19280C0C25; Tue, 29 Jun 2010 05:54:20 -0400 (EDT) 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=TJ0lt1xJUcZMs/gyN55a+DrKd/s=; b=LAO1xQ 9BX+2QxOBAI2DY/vfCl5tzqshc06cvXdpve+ZjVLR9SI67i4Chs67XlOIQ0V62Z9 LVClad0c/FyW4QGPGtDGE+SGjZ7/Z3MWoYG1snb94NmUpmk6oq3SSGStSvDpqHN3 vfL9OzwfUTZINbC9NSopBQkdBY0edSF2pF33I= 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=nnKMreYg3XORGiLleh5hC/HunOVNbPwB H+gLwvAw/0ZqWO5KqGSHAG5Vh5qH3jIbps9vSFugcrZCqZuc5JELgPW+re1GbK3j zsq36dE87XETT3j6OVQjqK4IH9nqkcRsCt2Ce55bULomfMZi7iY9YTNYlo6AoJsI tn2+A9RSOug= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 78856C0C24; Tue, 29 Jun 2010 05:54:18 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [83.202.24.141]) (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 0433DC0C22; Tue, 29 Jun 2010 05:54:16 -0400 (EDT) In-Reply-To: (Tristan Colgate's message of "Fri, 25 Jun 2010 10:14:06 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 48BC52A8-8364-11DF-A5FB-9056EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7934 Archived-At: Hi Tristan, On Fri 25 Jun 2010 11:14, Tristan Colgate writes: > I'd like to make use of the applicable structs feature but am > running into problems. Apologies for the lack of docs; it's on my list, but I haven't gotten to it yet. > From what I can gather from the release note that mentions it, the > following should work, > instead, I get a segfault. > > scheme@(guile-user)> (define (make-struct > 0)) > scheme@(guile-user)> (define mything (make-struct 0 > (lambda()(display "some code")(newline)))) > Segmentation fault (core dumped) Ew, will fix. > Looking around goops.scm I can see some classes for applicable structs > that look a bit nicer, but these seem > to use set-object-procedure! which isn't exported (and I can't find a > definition).... I have applied your fix to this one. > What am I doing wrong? You are doing everything right, it's just that you found a couple bugs in a recently-rewritten part of Guile. Apologies again! Happy hacking, Andy -- http://wingolog.org/