lisprc @ dd879591c545

Hack together a little weather CLI
author Steve Losh <steve@stevelosh.com>
date Sun, 30 Aug 2020 21:13:42 -0400
parents 1d7d7c65d893
children 80f0db7bdfd0
;;;; Quicklisp ----------------------------------------------------------------
#-quicklisp
(let ((quicklisp-init (merge-pathnames ".quicklisp/setup.lisp" (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

;;;; Configuration ------------------------------------------------------------
(setf *print-pretty* t
      *print-escape* t
      *print-right-margin* 100
      *print-miser-width* nil
      *print-length* 50
      *print-level* 50)

;;;; REPL Utilities -----------------------------------------------------------
(defun :ls (package)
  (do-external-symbols (s package)
    (print s)))

(defmacro := (var val)
  `(progn
     (defglobal ,var nil)
     (setf ,var ,val)))


;;;; Scratch Marker -----------------------------------------------------------
(defun sharp-semicolon-reader (stream sub-char numarg)
  (declare (ignore sub-char numarg))
  (loop :while (read-line stream nil nil))
  (values))

(defun shebang-reader (stream sub-char numarg)
  (declare (ignore sub-char numarg))
  (read-line stream)
  (values))

(set-dispatch-macro-character #\# #\; #'sharp-semicolon-reader)
;; (set-dispatch-macro-character #\# #\! #'shebang-reader)