shithub: sl

Download patch

ref: 0a2150a1b68907c22fd93074f2417b687dcd2c39
parent: 6990fde0694af3d4343ce177e63632f391059493
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Apr 23 20:52:51 EDT 2025

bounds-error: do not print the entire sequence if it's too long - limit to 128 elements max

--- a/boot/sl.boot
+++ b/boot/sl.boot
@@ -402,13 +402,13 @@
 ue
                                                                               #fn(write)
                                                                               #fn(io-write)
-o-close)) 12)
+o-close)) 12)
           #fn("n207001521i2~:" #(div) mod 8) mod0 #fn("n2001k1i2~:" #() mod0 7) negative?
             #fn("n10EL2:" #() negative? 6) nestlist #fn("n3E82L2;3B041700015182K~53P:" #(nestlist) nestlist 10)
-         newline #fn("\x8700001000W0000J7070?04210725247360:" #(*io-out* #fn(io-write)
-                                                                   *linefeed* void) newline 7)
-            nreconc #fn("n2701062:" #(reverse!-) nreconc 7) odd?
-            #fn("n170051S:" #(even?) odd? 6) partition #fn("n2I2021?65148601qe1qe164:" #(#0#
+0000J7070?04210725247360:" #(*io-out* #fn(io-write)
+                                                                   *linefeed* void) newline 7)
+            nreconc #fn("n2701062:" #(reverse!-) nreconc 7) odd?
+            #fn("n170051S:" #(even?) odd? 6) partition #fn("n2I2021?65148601qe1qe164:" #(#0#
 83PI1B3Z0401<513?0821<qPN=?2@<0831<qPN=?341=?1@\x05/47088<=88==62:" #(values) partition- 8)) partition 10)
             positive? #fn("n1E0L2:" #() positive? 6) princ
             #fn("z070qw042185>1220>12386>1{86504:" #(*print-readably* #fn("n0Aw0:" #(*print-readably*) 4)
--- a/src/system.sl
+++ b/src/system.sl
@@ -1519,7 +1519,9 @@
 
           ((eq? k 'bounds-error)
            (princ "index " (cadr a) " out of bounds for ")
-           (print (car a)))
+           (if (length> (car a) 128)
+               (princ (type-of (car a)) " of length " (length (car a)))
+               (print (car a))))
 
           ((eq? k 'unbound-error)
            (princ "eval: variable " (car a) " has no value"))