Hi Bill and list, I've been playing with the pretty-print function in
write.scm in further attempts to make a nice "back to code" serializer for
my sequencers. I have the back to text part working at a basic level using
the below, but it comes out as one long line.

(define (save-seq seq-obj filename)
  (let ((data (object->string (seq-1 'get '_) :readable)))
    (call-with-output-file filename
      (lambda (port) (write data port)))))

It would be great to be able to use pretty-print to have it formatted with
nice indendtation, but (pp obj) doesn't print entire vectors, they end with
the ... stuff. Is there a way to use pretty-print with object->string to
get a pretty printed dump that has everything one needs to reload via
eval-string? Or some other approach that I haven't thought of? Figured I'd
ask before I start mucking with regex's.

thanks!
iain
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to