Friday, June 22, 2012

Land of Lisp using SBCL instead of CLISP

The CLISP specialty is used when producing a png from the dot file in Chapter 7.

brew install graphviz

which dot -> /usr/local/bin/dot

(defun dot->png (fname thunk)
  (with-open-file (*standard-output*
           fname
           :direction :output
           :if-exists :supersede)
    (funcall thunk))
  (sb-ext:run-program "/usr/local/bin/dot" (list "-Tpng" "-O" fname)))
view raw LoL_sbcl.md hosted with ❤ by GitHub