Re: [Chicken-users] Printing recursive objects

2014-09-26 Thread Richard
On Wed, 24 Sep 2014 16:00:29 -0700 Evan Hanson ev...@foldling.org wrote: Hi Richard, On 2014-09-24 21:34, Richard wrote: If I have an object that references itself, like for example... (define v (vector 0)) (vector-set! v 0 v) and I print it, chicken goes -understandably- into

[Chicken-users] Printing recursive objects

2014-09-24 Thread Richard
Hello Chickens, If I have an object that references itself, like for example... (define v (vector 0)) (vector-set! v 0 v) and I print it, chicken goes -understandably- into an infinite loop. Is there a way to prevent this, or is there something like define-record-printer for non-record

Re: [Chicken-users] Printing recursive objects

2014-09-24 Thread Jason Felice
guile knows how to handle this: scheme@(guile-user) (define v (vector 0)) scheme@(guile-user) (vector-set! v 0 v) scheme@(guile-user) v $2 = #(#0#) It can even read the self-referencing syntax, IIRC. I know there's discussion of using Tortoise and Hare to break cycles in this situation, but

Re: [Chicken-users] Printing recursive objects

2014-09-24 Thread Evan Hanson
Hi Richard, On 2014-09-24 21:34, Richard wrote: If I have an object that references itself, like for example... (define v (vector 0)) (vector-set! v 0 v) and I print it, chicken goes -understandably- into an infinite loop. Is there a way to prevent this, or is there something like