| 1 |
(in-package :cl-user) |
| 2 |
|
| 3 |
(defun sysinfo (&optional (out *standard-output*)) |
| 4 |
"Print the current environment to a stream." |
| 5 |
(declare (stream out)) |
| 6 |
(format out "~&~%~75~~%~75,,,'-:@<<{[ The current environment ]}>~>~%~ |
| 7 |
Implementation:~20t~a~%~7tversion:~20t~a~%Machine: type:~20t~a |
| 8 |
~7tversion:~20t~a~%~6tinstance:~20t~a~%Opeating System:~19t" |
| 9 |
(lisp-implementation-type) (lisp-implementation-version) |
| 10 |
(machine-type) (machine-version) (machine-instance)) |
| 11 |
#+darwin (princ " Darwin") |
| 12 |
#+unix (princ " Unix") |
| 13 |
(format out "~%Software: type:~20t~a~%~7tversion:~20t~a~%Site:~20t~a (~a) |
| 14 |
User home:~20t~a~%Default pathname:~20t~a~%" |
| 15 |
(software-type) (software-version) (long-site-name) |
| 16 |
(short-site-name) (user-homedir-pathname) |
| 17 |
*default-pathname-defaults*) |
| 18 |
(format out "Features: ~s. |
| 19 |
Modules:~s.~% |
| 20 |
Current package:~s~%" |
| 21 |
*features* *modules* *package*) |
| 22 |
(flet ((exdi (fl) (integer-length (nth-value 1 (decode-float fl))))) |
| 23 |
(format out "Fixnum length:~25t~3d bits |
| 24 |
Short Floats:~25t~3d bits exponent, ~3d bits significand (mantissa) |
| 25 |
Single Floats:~25t~3d bits exponent, ~3d bits significand (mantissa) |
| 26 |
Double Floats:~25t~3d bits exponent, ~3d bits significand (mantissa) |
| 27 |
Long Floats:~25t~3d bits exponent, ~3d bits significand (mantissa)~%" |
| 28 |
(integer-length most-positive-fixnum) |
| 29 |
(exdi most-positive-short-float) |
| 30 |
(float-digits most-positive-short-float) |
| 31 |
(exdi most-positive-single-float) |
| 32 |
(float-digits most-positive-single-float) |
| 33 |
(exdi most-positive-double-float) |
| 34 |
(float-digits most-positive-double-float) |
| 35 |
(exdi most-positive-long-float) |
| 36 |
(float-digits most-positive-long-float))) |
| 37 |
(dolist (sy '(array-total-size-limit array-rank-limit array-dimension-limit |
| 38 |
lambda-parameters-limit call-arguments-limit |
| 39 |
multiple-values-limit char-code-limit)) |
| 40 |
(format out " ~a:~30t~15:d~%" sy (symbol-value sy))) |
| 41 |
(format out "lambda-list-keywords:~s~%" |
| 42 |
lambda-list-keywords) |
| 43 |
(format out "Internal time unit:~25t~f sec~%*gensym-counter*:~25t~:d |
| 44 |
Current time:~25t" (/ internal-time-units-per-second) *gensym-counter*) |
| 45 |
(format out "~a" (get-universal-time)) |
| 46 |
(format out "~%~75~~%") (room) (values)) |
| 47 |
|
| 48 |
(sysinfo) |
| 49 |
|
| 50 |
|
| 51 |
;; Quicklisp |
| 52 |
|
| 53 |
(defun get-quicklisp () |
| 54 |
(format t "Loading the quicklisp subsystem~%") |
| 55 |
(require '#:ecl-quicklisp) |
| 56 |
(require '#:deflate) |
| 57 |
(require '#:ql-minitar) |
| 58 |
;; Replace the interpreted function with the precompiled equivalent |
| 59 |
;; from DEFLATE |
| 60 |
(eval (read-from-string |
| 61 |
"(setf (symbol-function 'ql-gunzipper:gunzip) #'deflate:gunzip))"))) |
| 62 |
|
| 63 |
#+(or)(get-quicklisp) |
| 64 |
|
| 65 |
|