#!/usr/local/bin/clisp -ansi -q -E utf-8
;;;; -*- mode:lisp; coding:utf-8 -*-
(setf *random-state* (make-random-state t))
(defun random-elt (list)
  (elt list (random (length list))))
(cond ((null ext:*args*)
       (prin1 (random #x100000000)))
      ((and (null (rest ext:*args*))
            (ignore-errors (realp (let ((*read-eval* nil))
                                    (read-from-string (first ext:*args*))))))
       (prin1 (random (let ((*read-eval* nil))
                        (read-from-string (first ext:*args*))))))
      (t
       (princ (random-elt ext:*args*))))
(terpri)
(finish-output)
(ext:exit 0)
ViewGit