unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: John Cowan <cowan@ccil.org>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: Srfi-159/166 - monadic formatting for guile
Date: Sun, 16 Jun 2019 12:20:55 -0400	[thread overview]
Message-ID: <CAD2gp_SkZ1eG0xwkg8=9ZOnYgsjS7LSJRsLaWeL4UVS+JzgfMQ@mail.gmail.com> (raw)
In-Reply-To: <87wohm2g1k.fsf@netris.org>

On Sun, Jun 16, 2019 at 2:47 AM Mark H Weaver <mhw@netris.org> wrote:


> 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 data
> type printed using a custom printer?  For example, what if you print a
> list that includes an object whose custom printer will print output that
> includes the same list that you started with?
>

Of course it can't cope with that.  But consider an object whose custom
printer outputs its instance variables where one of those instance variables
has been assigned to the object itself.  No procedure other than the object
printer itself is going to be able to break *that* loop.


John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
Yes, chili in the eye is bad, but so is your ear.  However, I would
suggest you wash your hands thoroughly before going to the toilet.
        --gadicath


  reply	other threads:[~2019-06-16 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02 13:38 Srfi-159/166 - monadic formatting for guile Linus Björnstam
2019-06-02 20:31 ` Arne Babenhauserheide
2019-06-02 20:41 ` Ludovic Courtès
2019-06-03  5:34   ` Linus Björnstam
2019-06-03 13:07     ` Ludovic Courtès
2019-06-11 22:01 ` Mark H Weaver
2019-06-14  9:38   ` Linus Björnstam
2019-06-16  6:35     ` Mark H Weaver
2019-06-16 16:20       ` John Cowan [this message]
2019-06-16 19:30         ` Mark H Weaver
2019-06-18 10:39           ` Linus Björnstam
2019-06-16 20:30       ` Linus Björnstam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD2gp_SkZ1eG0xwkg8=9ZOnYgsjS7LSJRsLaWeL4UVS+JzgfMQ@mail.gmail.com' \
    --to=cowan@ccil.org \
    --cc=guile-user@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).