From: Jeffery Zhang
Subject: format reference
Date: 
Message-ID: <e2aenc$aiv$1@ruby.cit.cornell.edu>
Where can I find a good reference for FORMAT directives? I've looked on 
google and can't find anything good. I'm trying to figure out what ~,5t 
should mean. I've tried some examples and it doesn't seem to be 
different from ~5t.

From: zergling
Subject: Re: format reference
Date: 
Message-ID: <1145628863.712030.149070@v46g2000cwv.googlegroups.com>
> Where can I find a good reference for FORMAT directives? I've looked on
> google and can't find anything good. I'm trying to figure out what ~,5t
> should mean. I've tried some examples and it doesn't seem to be
> different from ~5t.

Slightly off-topic here, but if you are going any further, and starting
to use the pretty printer format directives, be careful if you are
using clisp (of clisp.cons.org) because it's pretty printer is not
completely conformant to the standard. Specifically,
pprint-logical-block (and associated pprint-newline, pprint-indent,
etc), or its ~<...~:> format directive (including : and @ modifiers),
when used with *pprint-miser-width*, *pprint-right-margin* and a few
other "flags", seem to show patchy standards coverage. I think ~T works
fine, but there might be a few other ones that would confuse newbies
like us if they were buggy (it was a while ago now, but I think there
were weird outputs from ~i as well). I wouldn't try any formatting that
is too fancy in clisp. For fancy formatting, I use SBCL, but clisp has
otherwise been very good to me.

Took me a while to figure that out, and now I'm itching to "port"
SBCL's pprint.lisp into clisp. Might get around to that one day. Right
now, it looks like a formidable task for me. At least I learnt a bit
about the pretty printer.
From: Jeffery Zhang
Subject: Re: format reference
Date: 
Message-ID: <e2bn5k$b6k$1@ruby.cit.cornell.edu>
Thanks for the heads up. Installing SBCL as we speak on my new mac mini.

zergling wrote:
>>Where can I find a good reference for FORMAT directives? I've looked on
>>google and can't find anything good. I'm trying to figure out what ~,5t
>>should mean. I've tried some examples and it doesn't seem to be
>>different from ~5t.
> 
> 
> Slightly off-topic here, but if you are going any further, and starting
> to use the pretty printer format directives, be careful if you are
> using clisp (of clisp.cons.org) because it's pretty printer is not
> completely conformant to the standard. Specifically,
> pprint-logical-block (and associated pprint-newline, pprint-indent,
> etc), or its ~<...~:> format directive (including : and @ modifiers),
> when used with *pprint-miser-width*, *pprint-right-margin* and a few
> other "flags", seem to show patchy standards coverage. I think ~T works
> fine, but there might be a few other ones that would confuse newbies
> like us if they were buggy (it was a while ago now, but I think there
> were weird outputs from ~i as well). I wouldn't try any formatting that
> is too fancy in clisp. For fancy formatting, I use SBCL, but clisp has
> otherwise been very good to me.
> 
> Took me a while to figure that out, and now I'm itching to "port"
> SBCL's pprint.lisp into clisp. Might get around to that one day. Right
> now, it looks like a formidable task for me. At least I learnt a bit
> about the pretty printer.
> 
From: Ken Tilton
Subject: Re: format reference
Date: 
Message-ID: <Xg32g.349$rQ5.270@fe12.lga>
Jeffery Zhang wrote:
> Where can I find a good reference for FORMAT directives? 

http://www.lisp.org/HyperSpec/Body/sec_22-3.html


-- 
Cells: http://common-lisp.net/project/cells/

"Have you ever been in a relationship?"
    Attorney for Mary Winkler, confessed killer of her
    minister husband, when asked if the couple had
    marital problems.
From: Alan Manuel K. Gloria
Subject: Re: format reference
Date: 
Message-ID: <1145629799.011839.217880@t31g2000cwb.googlegroups.com>
Here's a less turgid explanation:
http://www.gigamonkeys.com/book/loop-for-black-belts.html

Here's a really nice book:
http://www.gigamonkeys.com/book/
From: Peter Seibel
Subject: Re: format reference
Date: 
Message-ID: <m27j5jc50z.fsf@gigamonkeys.com>
"Alan Manuel K. Gloria" <········@gmail.com> writes:

> Here's a less turgid explanation:
> http://www.gigamonkeys.com/book/loop-for-black-belts.html

Though if you're looking for FORMAT you might do better to look at:

  <http://www.gigamonkeys.com/book/a-few-format-recipes.html>

;-)

-Peter

-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/
From: Alan Manuel K. Gloria
Subject: Re: format reference
Date: 
Message-ID: <1145634485.903346.84380@i39g2000cwa.googlegroups.com>
Oops!  Pasted the wrong link, LOL.  Thanks Peter!  I guess I was
thinking of my girlfriend again.  Hehe.
From: Ari Johnson
Subject: Re: format reference
Date: 
Message-ID: <m2odyuwzzw.fsf@hermes.theari.com>
"Alan Manuel K. Gloria" <········@gmail.com> writes:

> Oops!  Pasted the wrong link, LOL.  Thanks Peter!  I guess I was
> thinking of my girlfriend again.  Hehe.

Just so we're clear on this ... thinking of your girlfriend makes you
fixate on the LOOP macro? :P
From: Jeffery Zhang
Subject: Re: format reference
Date: 
Message-ID: <e2c852$dsj$1@ruby.cit.cornell.edu>
Your book (I own a copy) was the first place I looked. I also look on 
gigamonkeys since it's searchable. I still couldn't find an explanation 
of ~,5t which was used on the second to last page in the spam filter 
chapter to format analyze-results.

-Jeff

On 2006-04-21 11:38:52 -0400, Peter Seibel <·····@gigamonkeys.com> said:

> "Alan Manuel K. Gloria" <········@gmail.com> writes:
> 
>> Here's a less turgid explanation:
>> http://www.gigamonkeys.com/book/loop-for-black-belts.html
> 
> Though if you're looking for FORMAT you might do better to look at:
> 
>   <http://www.gigamonkeys.com/book/a-few-format-recipes.html>
> 
> ;-)
> 
> -Peter
From: Bill Atkins
Subject: Re: format reference
Date: 
Message-ID: <877j5ie0m8.fsf@rpi.edu>
Jeffery Zhang <····@cornell.edu> writes:

> Your book (I own a copy) was the first place I looked. I also look on
> gigamonkeys since it's searchable. I still couldn't find an
> explanation of ~,5t which was used on the second to last page in the
> spam filter chapter to format analyze-results.
>
> -Jeff
>
> On 2006-04-21 11:38:52 -0400, Peter Seibel <·····@gigamonkeys.com> said:
>
>> "Alan Manuel K. Gloria" <········@gmail.com> writes:
>> 
>>> Here's a less turgid explanation:
>>> http://www.gigamonkeys.com/book/loop-for-black-belts.html
>> Though if you're looking for FORMAT you might do better to look at:
>>   <http://www.gigamonkeys.com/book/a-few-format-recipes.html>
>> ;-)
>> -Peter
>
>

In this case, the actual directive is ~T, the ,5 is a parameter to
that directive.  There's information about it at
http://www.lisp.org/HyperSpec/Body/sec_22-3-6-1.html .

The best way I've come up with for looking up format directives is
just clicking through each of the subsections at the bottom of
http://www.lisp.org/HyperSpec/Body/sec_22-3.html until I find what I'm
looking for.

Bill

-- 

"...and when, another time, I discovered that he considered not
unworthy of reflection in one of those mirrors of absolute truth which
were his writings a remark similar to one which I had had occasion to
make about our friend M. Legrandin, ...then it was suddenly revealed
to me that my own humble existence and the realms of the true were
less widely separated than I had supposed, that at certain points they
actually collided, and in my newfound confidence and joy, I had wept
upon his printed page as in the arms of a long-lost father."
From: Peter Seibel
Subject: Re: format reference
Date: 
Message-ID: <m2k69ib7ci.fsf@gigamonkeys.com>
Jeffery Zhang <····@cornell.edu> writes:

> Your book (I own a copy) was the first place I looked. I also look on
> gigamonkeys since it's searchable. I still couldn't find an
> explanation of ~,5t which was used on the second to last page in the
> spam filter chapter to format analyze-results.

Yeah, I guess I decided to punt on the tabular output directives.
Well, there's always the Hyperspec. Basically ~T means "tab", but the
parameters affect it in slightly complex ways that I'll leave to the
Hyperspec to explain.

-Peter

-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/
From: Tayssir John Gabbour
Subject: Re: format reference
Date: 
Message-ID: <1145685918.616893.134200@i39g2000cwa.googlegroups.com>
Jeffery Zhang wrote:
> Where can I find a good reference for FORMAT directives? I've looked on
> google and can't find anything good. I'm trying to figure out what ~,5t
> should mean. I've tried some examples and it doesn't seem to be
> different from ~5t.

Graham's _ANSI CL_ has a good quickref in the back, for basic
summaries. ~t is a bit more complex than the ref can explain, but at
least it says basically what it is.

You might search under "tilde t" at http://lispdoc.com/ .

CLtL2's page is a bit easy to search, but you shouldn't seriously trust
it when it comes to details...
http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node200.html


Tayssir