Skip to content

Instantly share code, notes, and snippets.

@ElectricCoffee
Created April 3, 2015 20:36
Show Gist options
  • Save ElectricCoffee/0868b83b0a141cbf9e07 to your computer and use it in GitHub Desktop.
Save ElectricCoffee/0868b83b0a141cbf9e07 to your computer and use it in GitHub Desktop.
The code in Land of Lisp is designed with the CLISP interpreter in mind; this code will work with the SBCL interpreter
(defun dot->png (fname thunk)
(with-open-file
(*standard-output*
fname
:direction :output
:if-exists :supersede)
(funcall thunk))
(sb-ext:run-program "/opt/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