From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Justin Veilleux Newsgroups: gmane.lisp.guile.user Subject: #:printer filed in language specification. Date: Fri, 17 Sep 2021 18:50:17 -0400 Message-ID: <66ede8b9-6e56-cb7a-28d2-825dc93ef8cd@cock.li> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17302"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.13.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Sep 18 00:50:56 2021 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 1mRMh5-0004Ix-Vm for guile-user@m.gmane-mx.org; Sat, 18 Sep 2021 00:50:56 +0200 Original-Received: from localhost ([::1]:41496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRMh4-0001od-Ih for guile-user@m.gmane-mx.org; Fri, 17 Sep 2021 18:50:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRMgp-0001oV-DC for guile-user@gnu.org; Fri, 17 Sep 2021 18:50:40 -0400 Original-Received: from mail.cock.li ([37.120.193.124]:41340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRMgk-0001uK-VZ for guile-user@gnu.org; Fri, 17 Sep 2021 18:50:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1631919019; bh=rSFxGtvGipEcz9zzToO0Wd2DM6mvsfh01SR+KrPoKgY=; h=To:From:Subject:Date:From; b=sLNJnptlNiuZT8bjL3FvcNlX4w60UxqbMQJbCWhYQUPzBqnuspT7aHMFv7BKbOY9Y rQ60PUHZdNHmQJjIhRSCVJQI2YPm99yL5lv1zyrhYU2aWZRZlukJb9zYikx9Wo5N1A j2Y8cNocs0pbE5u8otYI1WRXxrR0cb+m1u53GuXZAiPnkjN4g/neTgcis/N3ezDoSe YEuK8GJsKnqLxOm2FcjpDMqPwpQ4N9StF2o9ugeZSPWt2fVQGgtHIDj3DQIz6oSpzm NgG2SzN0RDgEDWy50V/1Feg9p9C06dePHaKNZemqyOMfvSgPGRtUDokSo5BlD4Y4gK 8itJkNQwVHInQ== Content-Language: en-US Received-SPF: pass client-ip=37.120.193.124; envelope-from=terramorpha@cock.li; helo=mail.cock.li X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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:17743 Archived-At: Hello, everyone. To familiarize myself with guile's compiler tower, I implemented a=20 lambda calculus interpreter using guile. It works relatively well. However, I also wanted it to print a human=20 readable version of the procedures created. (It is hard to tell whether=20 # is a correct church encoding of the number 3)=20 With a lot of fiddling, I managed to write a function that turns a=20 procedure into an S-expression. However, when I tell guile to use it as a pretty printer using the=20 #:printer keyword, the repl doesn't actually use it. What can I do to=20 fix this ?