Monday, May 30, 2011

Running ClojureBox and Penumbra 0.6.0 Snapshot

ClojureBox isn't necessarily set up with Leiningen or Penumbra in mind. During a bout of insomnia, I spent a couple of hours staring at this error message and wondering why it wasn't working:
Could not locate penumbra/opengl__init.class or penumbra/opengl.clj on classpath

Turns out, what this really means is that your java class path doesn't have the native libraries in it. You can view your current classpath in the swank REPL with (System/getProperty "java.class.path"). If you've been getting the error message above, you'll probably note that your classpath is lacking the .jars it needs, such as lwjgl.jar.

First thing is the check if they exist; Leiningen should have put them in your project's lib folder if you ran lein deps and lein native-deps (future versions of Leiningen may not need the native-deps plugin). If they exist, but your classpath isn't finding them, you may need to add them explicitly to your classpath. There are several ways to do this, but here's what I did.

My class path is in my .emacs file (C-x C-f ~/.emacs to open it in Emacs).
(setq swank-clojure-classpath

     (list "f:/Isaac/Dev/Norn/norn/src"
  "f:/Isaac/Dev/Norn/norn/lib/*" ;note asterisk
  "F:/Isaac/Dev/Norn/norn/test"
  "F:/Isaac/Dev/Norn/norn/classes"
  "F:/Isaac/Dev/Norn/norn/test-resources"
  "F:/Isaac/Dev/Norn/norn/resources"))

Java apparently needs the wildcard to find the libraries. This is specified in the Penumbra docs, but its easy to miss if you're not familiar with Java.

One last note: make sure you're using the correct native libraries. Just because your system is 64 bit doesn't mean that ClojureBox and Java are.

Monday, March 14, 2011

Nothing Existed Here Yesterday

The amazing thing about the creative process that always affects me every project is the way that formless raw material is suddenly turned into something. Whether it be a drawing, a render, or even a building, something has been called into existence. Every piece of artwork alters the world.



Nothing in this image existed yesterday. I was the one who went through the process of building it, and I still can't quite believe that it exists. That's the part of every project that gets to me. I can never quite believe that I was the one who did all that, it seems too easy afterwards.