(defun str (&rest strings)
(apply 'concatenate 'string
(loop for x in strings
collecting (format nil "~a" x))))
You can use it like this: (shell (str "dot -Tpng -O " fname))
You might also find that WITH-OPEN-FILE arguments can get a little unwieldy to type in the repl, specially if you want to overwrite files, so you can use this WITH-TEXT-FILE macro. For binary files you will just need to add (:element-type '(unsigned-byte 8)) (defmacro with-text-file ((stream path) &body body)
`(with-open-file (,stream ,path
:direction :io
:if-exists :supersede
:if-does-not-exist :create)
,@body)) (defun str (&rest strings)
(format nil "~{~A~}" strings))FWIW, my first Lisp programs where board-games and I learned quite a bit about recursion trying to format ASCII art in curses. If I knew FORMAT had control, I wouldn't have learned much lisp so quickly, since quirky little DSLs are fascinating.
(defmacro str (string &rest strings)
`(concatenate 'string ,string ,@strings))
Of course, you're more than welcome to shoot me an email if you ever get stuck.
Here is a far more forgiving reference to Common Lisp than the Hyperspec, though don't let the fancy TeX typesetting intimidate you.
http://clqr.berlios.de/clqr-a4-consec.pdf
In addition to that, I think you should dump yourself a nice image with ASDF and QL builtin, so you don't have to load them every time.
I shall investigate creating that image. I found ASDF to be a bit problematic when I tried it on it's own (which is probably down to my inexperience), but QL worked first time.