mikera / clisk

The Clojure Image Synthesis Kit
281 stars 13 forks source link

require more explaination for the rest of us #8

Closed yunfan closed 4 years ago

yunfan commented 11 years ago

i got to know this libarary via clojure planet, and found its really a cool one

but the problem is i dont have CV background, which let me not famillar those terms in the example codes

and the README.md seems miss a sections called "How it Works", i know i could just RTFC, but with your document, it would be better for me to quick learn this library

mikera commented 11 years ago

LOL at the issue title :-)

I'll see what I can do.......

kyptin commented 9 years ago

This library looks interesting, but I'm a little surprised how challenging it's proving to try it out. I first tried lein try net.mikera/clisk 0.10.1, to no avail. Cloning and doing a lein repl in the repo root didn't work either. (It looks like this is not a Leiningen project.) Lastly, I tried mvn install followed by java -classpath target/clisk-0.10.2-SNAPSHOT.jar -jar ~/.m2/repository/org/clojure/clojure/1.7.0/clojure-1.7.0.jar. Like the others, I got a REPL, but I can't successfully call (require 'clisk.samples.autostereogram) because java.io.FileNotFoundException: Could not locate clisk/samples/autostereogram__init.class or clisk/samples/autostereogram.clj on classpath..

I'm not accustomed to using maven with Clojure projects, so I may be missing something that's obvious from that perspective. In any case, maybe a brief explanation of how to try out the library from a REPL would be helpful to myself and others.

Thanks for all your work in the Clojure ecosystem. :-)

mikera commented 9 years ago

@kyptin I'm not familiar with lein try, I suspect it has an issue since it I would expect it to work with a Maven project.... I will take a look at this

In the meantime, your best bet is probably just to create a new project with Clisk as a dependency.

mikera commented 9 years ago

One other point.... the examples are not bundled in the distribution jar because they are in the test suite. You may need to copy these to your new project.

mikera commented 9 years ago

OK I think you are just having a problem with the fact that the examples are not in the distribution jar.

lein tryworks for me, the following works as expected:

lein try net.mikera/clisk 0.10.1

(use 'clisk.live)
(show [x y])
kyptin commented 9 years ago

Ah, that's it! The sample namespaces are in test/, so didn't make it into the lein try session. Thanks!

A note about this may be worth adding to the Readme, or maybe to the docstrings in the samples namespace.

That was super cool, by the way, to see an autostereogram in 3 lines of code. :-)