From: John Klein <jk271828@ya...> - 2003-12-21 06:35:16
Is there any way to do *print-readably* on specialised arrays?
This was an extension in CMUCL that doesn't seem to
be present in SBCL, unless there is some variable to toggle it
on and off.
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
On Sat, Dec 20, 2003 at 10:35:15PM -0800, John Klein wrote:
> Is there any way to do *print-readably* on specialised arrays?
> This was an extension in CMUCL that doesn't seem to
> be present in SBCL, unless there is some variable to toggle it
> on and off.
As far as I can tell SBCL doesn't support it out of the box,
but it's fairly easy to write a PRINT-READABLE-ARRAY function
that prints arrays readably using #.(MAKE-ARRAY ...) syntax.
Loading the attached file into a fresh SBCL patches such behaviour in
place, if you really need the printer to do this. Beware: the code
hasn't really been tested -- but it "seems" to work.
Alternatively, you could hande PRINT-NOT-READABLE error, and call
PRINT-READABLE-FOO on PRINT-NOT-READABLE-OBJECT. That would be
be more portable, but admittedly not very helpful if you eg. want to
print with FORMAT.