<commit_before>;;;; Eval-bot loader

(flet ((probe-load (path &optional (default (user-homedir-pathname)))
         (let ((path (merge-pathnames path default)))
           (when (probe-file path) (load path))))
       (funcallstr (string &rest args)
         (apply (read-from-string string) args)))
  (or (probe-load #p"quicklisp/setup.lisp")
      (probe-load #p".quicklisp/setup.lisp")
      (let ((url "http://beta.quicklisp.org/quicklisp.lisp")
            (init (nth-value 1 (progn
                                 (require :sb-posix)
                                 (funcallstr "sb-posix:mkstemp"
                                             "/tmp/quicklisp-XXXXXX")))))
        (unwind-protect
             (progn
               (sb-ext:run-program "wget" (list "-O" init "--" url)
                                   :search t :output t)
               (when (probe-load init)
                 (funcallstr "quicklisp-quickstart:install")))
          (delete-file init)))))

(pushnew (make-pathname :directory (pathname-directory *load-pathname*))
         asdf:*central-registry*)

(ql:quickload '("swank" "eval-bot"))

(in-package #:eval-bot)

(defparameter *freenode*
  (make-client :server "irc.freenode.net"
               :nickname "clbot"
               :username "clbot"
               :realname "Common Lisp bot"
               :listen-targets nil
               :auto-join nil))

(loop :for port :from 50000 :upto 50050
      :do (handler-case
              (return (swank:create-server :port port :dont-close t))
            (sb-bsd-sockets:address-in-use-error () nil)))<commit_msg>Use ql:*local-project-directories* instead of asdf:*central-registry*<commit_after>;;;; Eval-bot loader

(flet ((probe-load (path &optional (default (user-homedir-pathname)))
         (let ((path (merge-pathnames path default)))
           (when (probe-file path) (load path))))
       (funcallstr (string &rest args)
         (apply (read-from-string string) args)))
  (or (probe-load #p"quicklisp/setup.lisp")
      (probe-load #p".quicklisp/setup.lisp")
      (let ((url "http://beta.quicklisp.org/quicklisp.lisp")
            (init (nth-value 1 (progn
                                 (require :sb-posix)
                                 (funcallstr "sb-posix:mkstemp"
                                             "/tmp/quicklisp-XXXXXX")))))
        (unwind-protect
             (progn
               (sb-ext:run-program "wget" (list "-O" init "--" url)
                                   :search t :output t)
               (when (probe-load init)
                 (funcallstr "quicklisp-quickstart:install")))
          (delete-file init)))))

(pushnew (make-pathname :directory (pathname-directory *load-pathname*))
         ql:*local-project-directories* :test #'equal)

(ql:quickload '("swank" "eval-bot"))

(in-package #:eval-bot)

(defparameter *freenode*
  (make-client :server "irc.freenode.net"
               :nickname "clbot"
               :username "clbot"
               :realname "Common Lisp bot"
               :listen-targets nil
               :auto-join nil))

(loop :for port :from 50000 :upto 50050
      :do (handler-case
              (return (swank:create-server :port port :dont-close t))
            (sb-bsd-sockets:address-in-use-error () nil)))
{'fraction_non_alphanumeric': 0.1441633648277964, 'fraction_numerical': 0.006705272782688205, 'mean_word_length': 1.82687338501292, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7082548', 'n_tokens_mistral': 1032, 'n_tokens_neox': 999, 'n_words': 221}