Skip to content

Instantly share code, notes, and snippets.

@linse
Created June 22, 2012 21:16
Show Gist options
  • Save linse/2975252 to your computer and use it in GitHub Desktop.
Save linse/2975252 to your computer and use it in GitHub Desktop.
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)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment