Skip to content

Instantly share code, notes, and snippets.

@dfuenzalida
Created May 28, 2017 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfuenzalida/4b3e31da373cda4583f7651ea4299ac4 to your computer and use it in GitHub Desktop.
Save dfuenzalida/4b3e31da373cda4583f7651ea4299ac4 to your computer and use it in GitHub Desktop.
xchart session.repl
;; Linux 4.4.0-77-generic on Ubuntu 16.04.2 LTS
;; Cloned the git repo from https://github.com/stuarthalloway/clj-xchart
(require '[clojure.edn :as edn])
(require '[com.hypirion.clj-xchart :as xchart])
(def args (edn/read-string (slurp "examples/problem1.edn")))
(xchart/view (apply xchart/bubble-chart* args))
;; Running the above on
;; Java HotSpot(TM) 64-Bit Server VM 1.8.0_131-b11
;; Clojure 1.9.0-alpha16
;; -- opens a new empty JFrame (no contents on the window, though)
;; Downloaded JDK 1.8.0_77 from Oracle, for Linux x64:
;; $ java -version
;; java version "1.8.0_77"
;; Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
;; Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
;; The last line didn't open a window, fails with Subprocess failed {:exit-code 139}
user=> (xchart/view (apply xchart/bubble-chart* args))
#object[javax.swing.JFrame 0x3634bba8 "javax.swing.JFrame[frame0,49,24,0x0,invalid,hidden,layout=java.awt.BorderLayout,title=XChart,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,0x0,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]"]
Exception in thread "Thread-4" clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 139}
at clojure.core$ex_info.invokeStatic(core.clj:4617)
at clojure.core$ex_info.invoke(core.clj:4617)
at leiningen.core.eval$fn__5732.invokeStatic(eval.clj:264)
at leiningen.core.eval$fn__5732.invoke(eval.clj:260)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at leiningen.core.eval$eval_in_project.invokeStatic(eval.clj:366)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:356)
at leiningen.repl$server$fn__11838.invoke(repl.clj:243)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:646)
at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1881)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1881)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invokeStatic(core.clj:650)
at clojure.core$bound_fn_STAR_$fn__4671.doInvoke(core.clj:1911)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.run(AFn.java:22)
at java.lang.Thread.run(Thread.java:745)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment