Re: Peculiar number formatting?

"Christopher Stacy (as cstacy at dtpq dot com)" <[email protected]> Tue, 19 May 2026 08:41:03 -0400
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
I lost the thread here so I am not sure if you're talking about 
formatted output from FORMAT, but Lisp did not have any kind formatted 
output (or even a STRING type) until after the Lisp Machine came along. 
I don't remember exactly, but formatted output might not have been 
invented for Lisp until almost 1980.

Lisp was WAY behind every other language, including it's original 
contemporary FORTRAN for about two decades. There were no ordinary 
applications of Lisp during all that time. Just a few AI programs in 
ivory towers. Nothing that would require any kind of formatted output or 
string manipulation or anything mundane like that. Even BASIC was 
infinitely more powerful than Lisp in those departments (having actual 
strings in 1965 and PRINT USING in 1968).

MACLISP never did have strings nor formatted output.  The only control 
you had was over numbers: PRINT obeyed the two variables BASE (default 
8) and NOPOINT (don't print a trailing decimal point). if you read the 
manual, you might be misled into thinking we had strings, but we didn't, 
really. And characters were really just fixnums. There were no string 
functions -- you could not mutate, search, concatenate, index or subseq, 
etc. these so-called strings. What you did instead, if you needed that 
kind of functionality in your program, was to "explode" symbols into 
lists of constituent characters and them "implode" those back to create 
a new symbol, (perhaps a very long symbol name, because it's standing in 
as an entire ersatz string), and of course you can PRINT a symbol. These 
unspeakable and very expensive operations were not popular. This was not 
important since most programs were just about abstract AI and user 
interaction was extremely primitive. Until around 1980 it was all like:
(PRINT "What do you want to do?")  ;; immutable and opaque "string", the 
only kind
(READ)   ;; user types. (QUOTE PICK UP THE BIG RED BLOCK)

FORMAT was the Lisp Machine, and the influences for FORMAT were every 
other language, all of which had a formatted output, all of which were 
based on FORTRAN. FORMAT is infinitely more powerful than any of those.

COBOL did not have formatted output because COBOL does not have "output" 
in that sense.  The main thing you do in COBOL (not just about IO) is 
"move" data records from one "picture" to another. The pictures are 
field descriptions that are a kind of formatting/editing string like 
"$,$$9.99" (where "9" means numeric digit).

And aside from code like the libraries contributed on this mailing list 
recently, Lisp never moved beyond its great leap of FORMAT.

Remember that Common Lisp was NEVER intended to be (a) the best Lisp we 
coud come up with nor (b) the end of the development of Lisp. It was a 
compromise standard that was demanded by the US military (the largest 
consumer of Lisp programs) as a specially exempted exception to writing 
in ADA. It's charter was to specifically NOT innovate or improve 
anything. Just to get some measure of compatibility (ease of porting) 
from MACLISP / Symbolics and Xerox INTERLISP. This is why the invention 
and inclusion of CLOS was extraordinarily controversial in the standard 
(but we had to have something, and it was decided that overall, Xerox 
LOOPS was better than MIT Flavors).

But then came AI Winter, and that was the end of the story of Lisp.
And here we are 40 years later.





_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html