LispWorks has a low args limit for apply. The following patch (inlined below) avoids landing on sldb when inspecting long lists. I think that its safe to #'nconc (nreverse ... but there isnt a noticeable change of speed or consing so it may be more conservative to just use reduce.
Index: swank.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank.lisp,v retrieving revision 1.272 diff -u -r1.272 swank.lisp --- swank.lisp 16 Dec 2004 21:16:50 -0000 1.272 +++ swank.lisp 22 Dec 2004 21:56:41 -0000 @@ -2631,7 +2631,7 @@ (let ((a (if (null l) a (cons (label-value-line :tail l) a)))) - (apply #'append (reverse a))))))) + (reduce #'nconc (nreverse a))))))) (values title (append '("Elements:" (:newline)) lines)))))
(cond ((not length) ; circular
Eduardo Muñoz emufer@terra.es writes:
LispWorks has a low args limit for apply. The following patch (inlined below) avoids landing on sldb when inspecting long lists. I think that its safe to #'nconc (nreverse ... but there isnt a noticeable change of speed or consing so it may be more conservative to just use reduce.
Fixed now. Thanks for the note.
Helmut.
Helmut Eller wrote:
Eduardo Muñoz emufer@terra.es writes:
LispWorks has a low args limit for apply. The following patch (inlined below) avoids landing on sldb when inspecting long lists. I think that its safe to #'nconc (nreverse ... but there isnt a noticeable change of speed or consing so it may be more conservative to just use reduce.
Fixed now. Thanks for the note.
Helmut.
It would be nice if there was some better control of the printing of arrays. *PRINT-ARRAY* allow for arrays to always be printed or never be printed. What would be useful is a variable *PRINT-ARRAY-SIZE* that says to print arrays whose number of elements is less than or equal to *PRINT-ARRAY-SIZE* and *PRINT-ARRAY* in non-NIL. (I seem to recall that the Lisp Machines had such a variable, but I cannot recall its exact name.)
Lynn Quam writes:
Helmut Eller wrote:
Eduardo Muñoz emufer@terra.es writes:
LispWorks has a low args limit for apply. The following patch (inlined below) avoids landing on sldb when inspecting long lists. I think that its safe to #'nconc (nreverse ... but there isnt a noticeable change of speed or consing so it may be more conservative to just use reduce.
Fixed now. Thanks for the note.
Helmut.
It would be nice if there was some better control of the printing of arrays. *PRINT-ARRAY* allow for arrays to always be printed or never be printed. What would be useful is a variable *PRINT-ARRAY-SIZE* that says to print arrays whose number of elements is less than or equal to *PRINT-ARRAY-SIZE* and *PRINT-ARRAY* in non-NIL. (I seem to recall that the Lisp Machines had such a variable, but I cannot recall its exact name.)
Can't *print-length* be used?
Raymond Wiker replied:
Lynn Quam writes:
...
It would be nice if there was some better control of the printing of arrays. *PRINT-ARRAY* allow for arrays to always be printed or never be printed. What would be useful is a variable *PRINT-ARRAY-SIZE* that says to print arrays whose number of elements is less than or equal to *PRINT-ARRAY-SIZE* and *PRINT-ARRAY* in non-NIL. (I seem to recall that the Lisp Machines had such a variable, but I cannot recall its exact name.)
Can't *print-length* be used?
Neither CMUCL nor Allegro use *PRINT-LENGTH* to control the number of elements printed for an array. Furthermore, the Common Lisp HyperSpec says nothing about arrays in its description of *PRINT-LENGTH*.
On Mon, 10 Jan 2005 16:12:46 -0800, Lynn Quam quam@ai.sri.com said:
Lynn> Raymond Wiker replied:
Lynn Quam writes:
Lynn> ...
It would be nice if there was some better control of the printing of arrays. *PRINT-ARRAY* allow for arrays to always be printed or never be printed. What would be useful is a variable *PRINT-ARRAY-SIZE* that says to print arrays whose number of elements is less than or equal to *PRINT-ARRAY-SIZE* and *PRINT-ARRAY* in non-NIL. (I seem to recall that the Lisp Machines had such a variable, but I cannot recall its exact name.)
Can't *print-length* be used?
Lynn> Neither CMUCL nor Allegro use *PRINT-LENGTH* to control the number of Lynn> elements printed for an array. Furthermore, the Common Lisp HyperSpec Lynn> says nothing about arrays in its description of *PRINT-LENGTH*.
I think it should, because it is covered by "list-like syntax" in the last paragraph. Also see 22.1.3.7 Printing Other Vectors: "The printing of vectors is affected by *print-level* and *print-length*."
__Martin
Martin Simmons martin@lispworks.com replied:
Lynn> Neither CMUCL nor Allegro use *PRINT-LENGTH* to control the number of Lynn> elements printed for an array. Furthermore, the Common Lisp HyperSpec Lynn> says nothing about arrays in its description of *PRINT-LENGTH*.
I think it should, because it is covered by "list-like syntax" in the last paragraph. Also see 22.1.3.7 Printing Other Vectors: "The printing of vectors is affected by *print-level* and *print-length*."
__Martin
You are right. The language of the Hyperspec does allow *PRINT-LENGTH* to affect the printing of arrays, and, in fact both CMUCL and Allegro do honor its value. Ellipses are printed for elements beyond the value of *PRINT-LENGTH*.