<commit_before>; quicklisp - a little wrapper to make Quicklisp more usable from the
; command line

#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init) (load quicklisp-init)))

(defmacro with-commands (&rest clist)
  `(defun main ()
     (let* ((args (cdr *posix-argv*)) (method (pop args)))
       (cond
         ,@(loop for pair in clist collect
             `((string-equal method ,(first pair)) ,@(rest pair)))
         (t (format *error-output*
                    "quicklisp: unknown argument ~s~&~{  ~a~&~}"
                    method
                    (quote ,(mapcar #'first clist)))
            (exit :code 1))))))

(sb-ext:save-lisp-and-die "quicklisp" :executable t :toplevel
  (with-commands
    ("install" (loop for arg in args do (ql:quickload arg)))
    ("search"
     (loop for arg in args do
       (format t "~{~a~&~}" (ql:system-apropos arg))))
    ("update" (ql:update-client) (ql:update-dist "quicklisp"))))
<commit_msg>be more merciful of limited terminal real estate<commit_after>; quicklisp - a little wrapper to make Quicklisp more usable from the
; command line

#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init) (load quicklisp-init)))

(defmacro with-commands (&rest clist)
  `(defun main ()
     (let* ((args (cdr *posix-argv*)) (method (pop args)))
       (cond
         ,@(loop for pair in clist collect
             `((string-equal method ,(first pair)) ,@(rest pair)))
         (t (format *error-output*
                    "quicklisp: unknown argument ~s~&  ~{~<~%  ~1:;~a~>~^ ~}~&"
                    method
                    (quote ,(mapcar #'first clist)))
            (exit :code 1))))))

(sb-ext:save-lisp-and-die "quicklisp" :executable t :toplevel
  (with-commands
    ("install" (loop for arg in args do (ql:quickload arg)))
    ("search"
     (loop for arg in args do
       (format t "~{~a~&~}" (ql:system-apropos arg))))
    ("update" (ql:update-client) (ql:update-dist "quicklisp"))))

{'fraction_non_alphanumeric': 0.15950639853747714, 'fraction_numerical': 0.0013711151736745886, 'mean_word_length': 2.447244094488189, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5131464', 'n_tokens_mistral': 733, 'n_tokens_neox': 714, 'n_words': 203}