From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.user Subject: Re: [EXT] GOOPS class printing Date: Wed, 23 Feb 2022 16:55:00 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10250"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Mike Gran Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Feb 23 22:56:59 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMzd4-0002T8-Fz for guile-user@m.gmane-mx.org; Wed, 23 Feb 2022 22:56:58 +0100 Original-Received: from localhost ([::1]:42462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMzd3-000138-46 for guile-user@m.gmane-mx.org; Wed, 23 Feb 2022 16:56:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMzbQ-0000B3-1v for guile-user@gnu.org; Wed, 23 Feb 2022 16:55:16 -0500 Original-Received: from [2a00:1450:4864:20::62d] (port=44922 helo=mail-ej1-x62d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMzbN-0003py-PT for guile-user@gnu.org; Wed, 23 Feb 2022 16:55:15 -0500 Original-Received: by mail-ej1-x62d.google.com with SMTP id p14so205697ejf.11 for ; Wed, 23 Feb 2022 13:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V3BcoVLB/YtLktwPf1zPHY7cRQx4gAUtFSxg3ROcZl8=; b=Tqr+MM6lrGWd3bdkREIJytq23U2FqgkpD4LyRtbLMyDWUdKx3VZgimeLUD508ZihcS +I+y2PbPIFrhQwL2FJwft+8+eSDg0o82Ss8VR7QpadiJEvYyuspB99DcaiJhpwu6CqBP 4gv7yLJye+MX/VFQupUXWkFMC8c7QRZAEFvSSpr4BnnR0sbWNEnI1LFRJfkLeWbXWc2H ymhdjP+Yukb0jcIA6AqdIAFDYDV49xCncKSQs4gXBoM6SaxrQO3ygp9nn6HniTsBgWd1 p63tulL6Ln1W/3DcgwOJDqaJmG+rP47qMYlKrWnsUKxMGf9P5XvzrZtSddt0mXml1kXi bLBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V3BcoVLB/YtLktwPf1zPHY7cRQx4gAUtFSxg3ROcZl8=; b=S2/Ql8hzOTjNlqENrwwQOXbybaEk6NRCjX1Q3ZPkZnTScEcwIb+LbOeYHi3JNJxPfa DCjm6GJXvhNeb3DTKqH7kyrkjOdjCgMbTRJj7RcZa7bHdpYdPKySVMPs15vIeaA21MTH 4fRFhZKb/VcXlIvl3gjwkABfSsf5lnQJquX41b5DFlKZvBu75Le2Q3x39hzvUarFu+cK Arz8bv4OsM8dUHg2H5M+qx9sMcox9AFVigBnoGDAw/f6no0Og8tkrswUDgTgIunhSbSr LBxU7Sj27puwFaqhw8CRfegJgXm8MuHSWpV3gIQxKOLRYs4mnFjb9Vo6AT8k+6+y07Rx qyxg== X-Gm-Message-State: AOAM533cCeFVXyoTkN79nu2v91atTDpKbqyID50VXPLm/7bvYKMLes2+ hQ7W4RmLhlOQWyLqaaWRnwcymu2RAGyF/pFyxIuSSg== X-Google-Smtp-Source: ABdhPJz7YaoBZuRW1OQk2E2320gIiE5Wtgz+2/YW930I41ciStLVFvviNqYcuHyzjWAreGgB69maBzagmfxwRMElzJE= X-Received: by 2002:a17:906:ae4a:b0:6d0:9eee:e951 with SMTP id lf10-20020a170906ae4a00b006d09eeee951mr1259272ejb.2.1645653311741; Wed, 23 Feb 2022 13:55:11 -0800 (PST) In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62d (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=dthompson2@worcester.edu; helo=mail-ej1-x62d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18139 Archived-At: Hi Mike, On Wed, Feb 23, 2022 at 4:44 PM Mike Gran wrote: > > Hello all- > > If I define a GOOPS class like so... > > (use-modules (oop goops)) > (define-class ()) > > > When it is printed, it has a long hex string in it > > $2 = #< 7fa3d9a5bc80> > > Is there a way to change how a class prints itself so that > it does not have a hex string? So that it is just > > #< > > > or something similar? GOOPS turns several procedures into methods, such as 'write'. I think I've defined special write methods in the past for this purpose. Here is a basic and silly example: scheme@(guile-user)> (define-class ()) scheme@(guile-user)> (make ) $33 = #< 55ddef3b0680> scheme@(guile-user)> (define-method (write (foo ) port) (display "hello" port)) scheme@(guile-user)> (make ) $34 = hello Hope that helps, - Dave