From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.user Subject: Re: Srfi-159/166 - monadic formatting for guile Date: Sun, 16 Jun 2019 22:30:06 +0200 Message-ID: <1ede9515-bbd0-4233-8bfa-2f3d02d74a19@www.fastmail.com> References: <87pnnj7pd9.fsf@netris.org> <87wohm2g1k.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="186623"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Cyrus-JMAP/3.1.6-663-gf46ad30-fmstable-20190607v1 Cc: guile-user@gnu.org To: "Mark H Weaver" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 16 22:30:48 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hcbna-000mOo-MJ for guile-user@m.gmane.org; Sun, 16 Jun 2019 22:30:47 +0200 Original-Received: from localhost ([::1]:42742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcbnX-0006lN-Fe for guile-user@m.gmane.org; Sun, 16 Jun 2019 16:30:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55109) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcbn2-0006is-6G for guile-user@gnu.org; Sun, 16 Jun 2019 16:30:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcbn1-00038q-89 for guile-user@gnu.org; Sun, 16 Jun 2019 16:30:12 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:44365) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hcbn0-00034F-Je for guile-user@gnu.org; Sun, 16 Jun 2019 16:30:10 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D29BB571; Sun, 16 Jun 2019 16:30:07 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute1.internal (MEProxy); Sun, 16 Jun 2019 16:30:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.se; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type:content-transfer-encoding; s=fm3; bh=PJz1B fvl0gFQvod2noIXuxrn8ZliIeWKfDw++8g9I38=; b=KkiOqJ59uP1Pu1OBqb9ni Qq09QemBBXOM/u6OzffzmpGLAmO/yHQobNKjvOAkKtawVt7Y4uKzIKbeIWnsSBCQ NRgij1QfelTIMJpPQzapt4hyfnyi71qNvACpo3OgLS9Joweyt8FKYAaiyuKZRsmr ty0fckI04udGKMLKVNkfJybfpxkh9SQ25ekyF6fW452pK0iTfXAL+Y+eIEU3Kbna 9XROnuW7AgKKLqbi5hjwI8SebCL/8JgfcZSQU9cHyudugGkh0cpWv1+Sf8tpsL57 9tsug+2GQSVzn6NF9ei7lgNWH0cMWFmHe5mYeag0NxrFC4l8JiYFDdPSUBJUBHz9 A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=PJz1Bfvl0gFQvod2noIXuxrn8ZliIeWKfDw++8g9I 38=; b=VSXU4whGec8cgpd4wxvG9orSooJcZDvYO1GXPLfH7Q9ZKe3oNXbOErz3E Q/vb1TZZFVXS9GHQ3XyknYQWiovdC8FRWvHxXT96Q3YZnI/2EPWJ2yVWOxTEesNg PgtpX8H+9IncB55ly1KafkBXumu9n3ucRGyvnb0dxAejTyNx939wz0BaAsbqXiqA YRRrJfpFf3gt5ISonbsJjVes0AxNoPNOOfbV8W1PLkFd/FKVtgOQopXdTR9yUgab SoGf3dNnVTxAy2nQoTmoYXQqJngcABS5+K8+aBvP2tFNEz0+XpQIB2sGZaqKc8YF EDXX5j5YsfwqFuEU5vphvhT3QYGJA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeihedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgse htqhertderreejnecuhfhrohhmpefnihhnuhhspgeujhpnrhhnshhtrghmuceolhhinhhu shdrihhnthgvrhhnvghtsehfrghsthhmrghilhdrshgvqeenucfrrghrrghmpehmrghilh hfrhhomheplhhinhhushdrihhnthgvrhhnvghtsehfrghsthhmrghilhdrshgvnecuvehl uhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 341B7C200A4; Sun, 16 Jun 2019 16:30:07 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87wohm2g1k.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.147.123.20 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.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15570 Archived-At: Well, in the written-shared/pretty-shared case, Alex Shinn (I just porte= d his reference implementation) relies on display/write for everything e= xcept lists and vectors, and those are, from what I can tell, exhaustive= ly checked for cycles.=20 trimmed/lazy I have to have a read through in some other way than black-= on-white text on my 3.5" phone.=20 Best regards Linus --=20 Linus Bj=C3=B6rnstam On Sun, 16 Jun 2019, at 08:37, Mark H Weaver wrote: > Hi Linus, >=20 > Linus Bj=C3=B6rnstam writes: >=20 > > I am not sure I understand what you mean, but i suspect it is alread= y > > solved, since for simple cases show will use display/write. So unles= s > > you try to do advanced formatting of circular lists it will do > > whatever display or write does. The same thing goes for custom > > printers. >=20 > How do you implement 'written-shared', 'pretty-shared', and > 'trimmed/lazy'? In particular, how do you avoid non-termination when > asked to print cyclic data, when the cycle includes a non-standard dat= a > type printed using a custom printer? For example, what if you print a= > list that includes an object whose custom printer will print output th= at > includes the same list that you started with? >=20 > Regards, > Mark >