unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: "Chris K. Jester-Young" <cky944@gmail.com>
Cc: bug-guile@gnu.org
Subject: Re: SRFI 9's default printer doesn't handle cyclic data structures
Date: Wed, 17 Aug 2011 10:49:21 +0200	[thread overview]
Message-ID: <87obzoifse.fsf@pobox.com> (raw)
In-Reply-To: <20110724050458.GA12508@yarrow.destinee.acro.gen.nz> (Chris K. Jester-Young's message of "Sun, 24 Jul 2011 01:06:18 -0400")

Hi Chris,

On Sun 24 Jul 2011 07:06, "Chris K. Jester-Young" <cky944@gmail.com> writes:

> I've been playing around with Guile's implementation of SRFI 45 (which
> uses SRFI 9), and have noticed something interesting: if you run the
> following code in the REPL, printing out the value of the promise will
> cause a stack overflow:
>
>     (use-modules (srfi srfi-45))
>     (define promise (delay promise))
>     (force promise)
>
>     #<promise val: module/ice-9/format.scm:38:0: In procedure format:
>     module/ice-9/format.scm:38:0: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'.
>
> However, if I change the SRFI 45 code to use Guile's native records,
> it prints correctly:
>
>     #<promise val: #<value tag: eager proc: #-1#>>

Thanks for the report.  I was going to fix the printer, but instead I
just changed SRFI-9 records to be implemented in terms of boot-9
records.

There's still a bug here somewhere but I am going to ignore it for now
:)

Andy
-- 
http://wingolog.org/



      reply	other threads:[~2011-08-17  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24  5:06 SRFI 9's default printer doesn't handle cyclic data structures Chris K. Jester-Young
2011-08-17  8:49 ` Andy Wingo [this message]

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=87obzoifse.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=cky944@gmail.com \
    /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).