   ;; see https://imagemagick.org/script/compare.php
   (let [{:keys [err]} (sh/sh "compare" "-metric" "mae" expected actual difference)
         result        (second (re-find #"\((.*)\)" err))]
-    (edn/read-string result)))
+    (Double/parseDouble result)))
 
 (defn- replace-suffix [file-name suffix]
   (string/replace file-name #"(\w+)\.(\w+)$" (str suffix ".$2")))

(ns quil.snippet
  (:require [quil.core :as q]
            [quil.snippets.all-snippets :as as]
            [clojure.edn :as edn]
            [clojure.java.io :as io]
            [clojure.test :as t]
            [clojure.java.shell :as sh]

             (try
               (q/background 255)
               (body)
               (if (imagemagick-installed?)
                 (assert-unchanged-snippet-output name)
                 (println "Imagemagick not detected. Please install it for automated image comparison to work."))
               (catch Exception e
                 (println "Error" e)
                 (.printStackTrace e)
