diff --git a/counthost.lisp b/counthost.lisp new file mode 100644 index 0000000..edebc45 --- /dev/null +++ b/counthost.lisp @@ -0,0 +1,19 @@ +;; TODO: make this unnecessary for `sbcl --script` invocations +(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" + (user-homedir-pathname)))) + (when (probe-file quicklisp-init) + (load quicklisp-init))) + +(load "utils.lisp") + +(defun account-exists? (n) + (begin + (= (values _ _ status) + (uiop:run-program + (format nil "curl --head --fail https://cohost.org/~r" n) + :ignore-error-status t)) + (zerop status))) + +(loop for i below 100 + do (format t "~a @~r~%" (if (account-exists? i) "∃" "∄") i) + do (sleep 0.1)) diff --git a/utils.lisp b/utils.lisp index 6f099d1..a410761 100644 --- a/utils.lisp +++ b/utils.lisp @@ -742,5 +742,3 @@ ,@(when (member '$@ money) '(&rest $@))) ,@body))) - -(begin (=f x2 (n) (+ n n)) (fpromote x2) (mapcar x2 '(1 2 3)))