Plaster
New
List
Login
text
default
anonymous
2021.07.14 03:44:18
#! /bin/sh SCRIPT='(progn (format t "~%This is ~A ~A~%" (lisp-implementation-type) (lisp-implementation-version)) (defun one (object) (declare (optimize (safety 3))) (aref object 1)) (defun two (object) (declare (optimize (safety 3))) (setf (aref object 1) 345)) (multiple-value-bind (result error) (ignore-errors (one (make-array 1 :initial-element nil))) (format t "(one) => ~S~%~S~%Is type-error: ~S~%~A~%~%" result error (typep error (quote type-error)) error)) (multiple-value-bind (result error) (ignore-errors (two (make-array 1 :initial-element nil))) (format t "(two): ~S~%~S~%Is type-error: ~S~%~A~%" result error (typep error (quote type-error)) error)))' for l in sbcl abcl ccl ecl clisp cmucl; do docker run -i -t --rm clfoundation/$l cl "$SCRIPT" done # CL-Launch doesn't have support for Clasp, so we need to use clasp's CLI # directly. docker run -i -t --rm clfoundation/clasp --eval "$SCRIPT" --quit
Raw
Annotate
Repaste
Edit
Annotations
text
default
anonymous
2021.07.14 03:45:38
This is SBCL 2.1.6 (one) => NIL #<SB-INT:INVALID-ARRAY-INDEX-ERROR expected-type: (INTEGER 0 (1)) datum: 1> Is type-error: T Invalid index 1 for (SIMPLE-VECTOR 1), should be a non-negative integer below 1. (two): NIL #<SB-INT:INVALID-ARRAY-INDEX-ERROR expected-type: (INTEGER 0 (1)) datum: 1> Is type-error: T Invalid index 1 for (SIMPLE-VECTOR 1), should be a non-negative integer below 1. NIL VM settings: Max. Heap Size (Estimated): 7.79G Using VM: OpenJDK 64-Bit Server VM This is Armed Bear Common Lisp 1.8.0 (one) => NIL #<TYPE-ERROR {53C8E029}> Is type-error: T Invalid array index 1 for #(NIL) (should be >= 0 and < 1). (two): NIL #<TYPE-ERROR {BBA98C1}> Is type-error: T Invalid array index 1 for #(NIL) (should be >= 0 and < 1). NIL This is Clozure Common Lisp Version 1.12 LinuxX8664 (one) => NIL #<SIMPLE-ERROR #x30200085521D> Is type-error: NIL Array index 1 out of bounds for #(NIL) . (two): NIL #<SIMPLE-ERROR #x3020008418BD> Is type-error: NIL Array index 1 out of bounds for #(NIL) . NIL This is ECL 21.2.1 (one) => NIL #<a SIMPLE-TYPE-ERROR 0x558c725d8bc0> Is type-error: (#<The STANDARD-CLASS TYPE-ERROR> #<The STANDARD-CLASS ERROR> #<The STANDARD-CLASS SERIOUS-CONDITION> #<The STANDARD-CLASS CONDITION> #<The STANDARD-CLASS STANDARD-OBJECT> #<The BUILT-IN-CLASS T>) In function AREF, the index into the object #(NIL). takes a value 1 out of the range (INTEGER 0 0). (two): NIL #<a SIMPLE-TYPE-ERROR 0x558c725d8b40> Is type-error: (#<The STANDARD-CLASS TYPE-ERROR> #<The STANDARD-CLASS ERROR> #<The STANDARD-CLASS SERIOUS-CONDITION> #<The STANDARD-CLASS CONDITION> #<The STANDARD-CLASS STANDARD-OBJECT> #<The BUILT-IN-CLASS T>) In function ASET, the index into the object #(NIL). takes a value 1 out of the range (INTEGER 0 0). NIL This is CLISP 2.49.92 (2018-02-18) (built on 8b44a77f9106 [172.17.0.4]) (one) => NIL #<SIMPLE-TYPE-ERROR #x00007F60582AFBFE> Is type-error: T AREF: index 1 for #(NIL) is out of range (two): NIL #<SIMPLE-TYPE-ERROR #x00007F605818B9AE> Is type-error: T SYSTEM::STORE: index 1 for #(NIL) is out of range NIL WARNING: Couldn't re-execute CMUCL with the proper personality flags(maybe /proc isn't mounted?). Trying to continue anyway. This is CMU Common Lisp 21d (21D Unicode) (one) => NIL #<SIMPLE-ERROR {604D7CAD}> Is type-error: NIL Error in function LISP::%ARRAY-ROW-MAJOR-INDEX: Invalid index 1 in #(NIL) (two): NIL #<SIMPLE-ERROR {604E8125}> Is type-error: NIL Error in function LISP::%ARRAY-ROW-MAJOR-INDEX: Invalid index 1 in #(NIL) NIL Starting cclasp-boehm-0.4.2-3852-gb14e329f4-cst ... loading image... This is clasp cclasp-boehm-0.4.2-3852-gb14e329f4-cst (one) => NIL #<CORE:ROW-MAJOR-OUT-OF-BOUNDS> Is type-error: T Row-major array index 1 is out of bounds (INTEGER 0 (1)). (two): NIL #<CORE:ARRAY-OUT-OF-BOUNDS> Is type-error: T Array index 1 is out of bounds (INTEGER 0 (1)) on axis 0.
Raw
Repaste
Edit