From: Ken Tilton
Subject: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <z4Ygi.138$GW4.18@newsfe12.lga>
Jeez, all I want to do is output data tab-delimited, can I use \t in a 
string? no. Does ~t emit a tab? No. Does anything? No. I have to:

(format clean "~&~{~a~^~c~}" (loop for f in fields
                                 nconc (list f #\tab)))

Retarded language!

kzo

From: Richard M Kreuter
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <87r6nvr3e2.fsf@tan-ru.localdomain>
Ken Tilton <···········@optonline.net> writes:

> Jeez, all I want to do is output data tab-delimited, can I use \t in a
> string? no. Does ~t emit a tab? No. Does anything? No. I have to:
>
> (format clean "~&~{~a~^~c~}" (loop for f in fields
>                                 nconc (list f #\tab)))
>
> Retarded language!

You can put the tab into the format string, "~&~{~A	~}", or if you
want the tab to be visible, perhaps,

(format t #.(concatenate 'string "~&~{~A~^" (string #\Tab) "~}") '(a b c))

--
RmK
From: Frank Buss
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <3csqolv9od8j.13g1i3fwnkr7.dlg@40tude.net>
Ken Tilton wrote:

> Jeez, all I want to do is output data tab-delimited, can I use \t in a 
> string? no. Does ~t emit a tab? No. Does anything? No. I have to:
> 
> (format clean "~&~{~a~^~c~}" (loop for f in fields
>                                  nconc (list f #\tab)))

Your editor sucks! If I didn't overlooked something in the CLHS, there is
no limitation for the characters you can include in strings, e.g. newlines
or tabs:

CL-USER > (format t "~{~A~^
~}" '(lisp rules !))
LISP
RULES
!

CL-USER > (format t "~{~A~^ ~}" '(lisp rules !))
LISP    RULES   !

(note: for this usenet posting I have converted tabs to spaces and the
space in the format string between ^ and ~ should be a tab)

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Ken Tilton
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <0d_gi.151$GW4.94@newsfe12.lga>
Frank Buss wrote:
> Ken Tilton wrote:
> 
> 
>>Jeez, all I want to do is output data tab-delimited, can I use \t in a 
>>string? no. Does ~t emit a tab? No. Does anything? No. I have to:
>>
>>(format clean "~&~{~a~^~c~}" (loop for f in fields
>>                                 nconc (list f #\tab)))
> 
> 
> Your editor sucks!

Ah, just had to use a special command to insert the tab.

thx,kt
From: Rob Warnock
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <qpqdnf3q2c5HeBnbnZ2dnUVZWhednZ2d@speakeasy.net>
Frank Buss  <··@frank-buss.de> wrote:
+---------------
| Ken Tilton wrote:
| > Jeez, all I want to do is output data tab-delimited, can I use \t in a 
| > string? no. Does ~t emit a tab? No. Does anything? No. I have to:
| > (format clean "~&~{~a~^~c~}" (loop for f in fields
| >                                  nconc (list f #\tab)))
+---------------

[Minor trivia: "COLLECT F COLLECT #\Tab" probably conses less
than "NCONC (LIST F #\Tab)".]

+---------------
| Your editor sucks! If I didn't overlooked something in the CLHS,
| there is no limitation for the characters you can include in
| strings, e.g. newlines or tabs:
| 
| CL-USER > (format t "~{~A~^
| ~}" '(lisp rules !))
| LISP
| RULES
| !
| 
| CL-USER > (format t "~{~A~^ ~}" '(lisp rules !))
| LISP    RULES   !
| 
| (note: for this usenet posting I have converted tabs to spaces and the
| space in the format string between ^ and ~ should be a tab)
+---------------

I sometimes use recursive FORMATs for this sort of thing:

    > (format t
	      (format nil "~a~c~a" "~{~a~^" #\tab "~}")
	      '(lisp rules !))
    LISP    RULES   !
    NIL
    > 

And, yes, I know it could have been done in the following way,
but IMHO that would be even uglier and less maintainable:

    > (format t
	      (format nil "~~{~~a~~^~c~~}" #\tab)
	      '(lisp rules !))
    LISP    RULES   !
    NIL
    > 


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Slobodan Blazeski
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <1183116841.677614.256900@c77g2000hse.googlegroups.com>
On Jun 29, 2:09 am, Ken Tilton <···········@optonline.net> wrote:
> Jeez, all I want to do is output data tab-delimited, can I use \t in a
> string? no. Does ~t emit a tab? No. Does anything? No. I have to:
>
> (format clean "~&~{~a~^~c~}" (loop for f in fields
>                                  nconc (list f #\tab)))
>
> Retarded language!
>
> kzo

>
>                             ___________________________
>                    /|  /|  |                          |
>                    ||__||  |       Please don't       |
>                   /   O O\__           feed           |
>                  /          \       the trolls        |
>                 /      \     \                        |
>                /   _    \     \ ----------------------
>               /    |\____\     \     ||
>              /     | | | |\____/     ||
>             /       \|_|_|/   |    __||
>            /  /  \            |____| ||
>           /   |   | /|        |      --|
>           |   |   |//         |____  --|
>    * _    |  |_|_|_|          |     \-/
> *-- _--\ _ \     //           |
>   /  _     \\ _ //   |        /
> *  /   \_ /- | -     |       |
>   *      ___ c_c_c_C/ \C_c_c_c____________
>
> :)
From: Stefan Scholl
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <0T475mklI256Nv8%stesch@parsec.no-spoon.de>
Ken Tilton <···········@optonline.net> wrote:
> Jeez, all I want to do is output data tab-delimited, can I use \t in a 
> string? no. Does ~t emit a tab? No. Does anything? No. I have to:
> 
> (format clean "~&~{~a~^~c~}" (loop for f in fields
>                                 nconc (list f #\tab)))

CL-INTERPOL <http://weitz.de/cl-interpol/> could help.


> Retarded language!

More a demented language. :-)



-- 
Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/
From: Szymon 'tichy'
Subject: Re: Lisp Sucks! I bet F# could do this...
Date: 
Message-ID: <f6lmom$cve$1@atlantis.news.tpi.pl>
Ken Tilton wrote:
> Jeez, all I want to do is output data tab-delimited, can I use \t in a 
> string? no. Does ~t emit a tab? No. Does anything? No. I have to:
> 
> (format clean "~&~{~a~^~c~}" (loop for f in fields
>                                 nconc (list f #\tab)))

The hairier the better... ;)

(format clean "~&~{~A~^~C~}" (mapcan #'list fields '#1=(#\Tab . #1#)))

without FORMAT:

(let ((s1 (catenate #Z(0) (series 1)))
       (s2 (#M princ-to-string (scan fields))))
   (collect-append 'string (spread s1 s2 '(#\Tab))))

Just wasting electrons...