From: Ken Tilton
Subject: Escape From Readability, or Who's Confused, Me or Lisp?
Date: 
Message-ID: <0jKWh.19$RX2.8@newsfe12.lga>
write-to-string (and write) have two parameters, escape and readably.

escape adds escape characters where needed. so does readably. I was 
guessing escape is a subset of the handling provided by readably, then 
saw: "prin1 produces output suitable for input to read. It binds 
*print-escape* to true." Not *print-readably*?

whassup wid dat?

kxo

-- 
http://www.theoryyalgebra.com/

"Algebra is the metaphysics of arithmetic." - John Ray

"As long as algebra is taught in school,
there will be prayer in school." - Cokie Roberts

"Stand firm in your refusal to remain conscious during algebra."
    - Fran Lebowitz

"I'm an algebra liar. I figure two good lies make a positive."
    - Tim Allen

From: Kent M Pitman
Subject: Re: Escape From Readability, or Who's Confused, Me or Lisp?
Date: 
Message-ID: <u7is4xw60.fsf@nhplace.com>
Ken Tilton <···@theoryyalgebra.com> writes:

> write-to-string (and write) have two parameters, escape and readably.
> 
> escape adds escape characters where needed. so does readably. I was
> guessing escape is a subset of the handling provided by readably, then
> saw: "prin1 produces output suitable for input to read. It binds
> *print-escape* to true." Not *print-readably*?
>
> whassup wid dat?

I think Alberto Gonzales inadvertently answered this one best.  

  "I have nothing to hide, and I am committed to assuring the Congress
  and the American public that nothing improper occurred here."

  "I am sorry for my missteps that have helped to fuel the controversy."

  "In hindsight, I would have handled this differently. ... Looking back,
  it is clear to me that I should have done more personally to ensure 
  that the review process was more rigorous."

The broad applicability of these words of his is a testimony to... well,
I don't know what it's a testimony to.  But it is a testimony.
From: Kent M Pitman
Subject: Re: Escape From Readability, or Who's Confused, Me or Lisp?
Date: 
Message-ID: <u3b2sxv58.fsf@nhplace.com>
Kent M Pitman <······@nhplace.com> writes:

> Ken Tilton <···@theoryyalgebra.com> writes:
> 
> > write-to-string (and write) have two parameters, escape and readably.
> > 
> > escape adds escape characters where needed. so does readably. I was
> > guessing escape is a subset of the handling provided by readably, then
> > saw: "prin1 produces output suitable for input to read. It binds
> > *print-escape* to true." Not *print-readably*?
> >
> > whassup wid dat?
> 
> I think Alberto Gonzales inadvertently answered this one best.  
> 
>   "I have nothing to hide, and I am committed to assuring the Congress
>   and the American public that nothing improper occurred here."
> 
>   "I am sorry for my missteps that have helped to fuel the controversy."
> 
>   "In hindsight, I would have handled this differently. ... Looking back,
>   it is clear to me that I should have done more personally to ensure 
>   that the review process was more rigorous."
> 
> The broad applicability of these words of his is a testimony to... well,
> I don't know what it's a testimony to.  But it is a testimony.

Actually, while I just couldn't resist that style of reply, I think
after a slight bit more of investigation, this is probably the real
truth (reconstructed from the entry for *PRINT-READABLY*):

  Specifically, if *print-readably* is true, printing proceeds
  as if *print-escape*, *print-array*, and *print-gensym* were
  also true, and as if *print-length*, *print-level*, and 
  *print-lines* were false.

A recollection is resurfacing in my mind that

 (a) I don't like this kind of rule, because it makes it hard for the
     subroutines one calls to notice that this is what is going on.
     They have to each individually check *PRINT-READABLY* in addition
     to other values in order to be correct, and that's a pain.
     I probably complained when this went in, but I was probably overridden.
     (I was probably wrong if I did complain, though.  See analysis below.)

 (b) The problem with having to also bind *PRINT-ESCAPE* is that it's
     easy to accidentally unbind it.  And if subroutines aren't looking
     also to *PRINT-READABLY*, they will do the wrong thing.  So with the
     present design the only answer is that you have to look at both, and
     hence binding *PRINT-READABLY* is just not necessary.

Yes, there's an ugliness in there.  But the ugliness is that these variables
can be bound by users.  The problem is that you want something stronger
than LET as the only possible binding form for these, to know that they are
all bound in a consistent way.  (This is vaguely like the problem of 
coordinating a set of consistent radio buttons on a web page.)  If there had
been only a binding form that bound the variables through a system function
call, and these were not user accessible, this would be better. At the cost
that it would be more mechanism and harder to understand.

I guess I reluctantly accept the outcome as it is as a kind of
reasonable optimum in an unreasonable space.
From: Barry Margolin
Subject: Re: Escape From Readability, or Who's Confused, Me or Lisp?
Date: 
Message-ID: <barmar-C7B773.14225222042007@comcast.dca.giganews.com>
In article <··············@newsfe12.lga>,
 Ken Tilton <···@theoryyalgebra.com> wrote:

> write-to-string (and write) have two parameters, escape and readably.
> 
> escape adds escape characters where needed. so does readably. I was 
> guessing escape is a subset of the handling provided by readably, then 
> saw: "prin1 produces output suitable for input to read. It binds 
> *print-escape* to true." Not *print-readably*?
> 
> whassup wid dat?
> 
> kxo

*PRINT-ESCAPE* affects types that have two output formats, one that's 
readable and another that isn't.  For instance, strings get printed with 
or without surrounding quotes, special characters in symbols get escaped 
or not, etc.

*PRINT-READABLY* is for catching when you're trying to print something 
that doesn't have a readable printed representation at all -- typically 
they print using #<...> syntax.  It causes an error to be signalled in 
this case.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***