Re: Can we use Clojure like a general library in Java?

2012-06-07 Thread Qihui Sun
Thank you! It seems a good begin. 2012/6/3 Karl Krukow karl.kru...@gmail.com Regarding those... Some time ago I created a project containing only the persistent data structures for use with Java et al. https://github.com/krukow/clj-ds It is the data structures only so no bootstrap

Re: Can we use Clojure like a general library in Java?

2012-06-03 Thread Karl Krukow
Regarding those... Some time ago I created a project containing only the persistent data structures for use with Java et al. https://github.com/krukow/clj-ds It is the data structures only so no bootstrap penalty. There are also Java'ish improvements like basic Generics and improved

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Sean Corfield
On Fri, Jun 1, 2012 at 5:53 PM, Qihui Sun qihui@gmail.com wrote: So I am interested,if Clojure can be used like a general library in Java,it will beat above libraries and be awesome ! Yes, you can instantiate clojure.lang.RT inside your Java code and load, compile and invoke Clojure code,

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Philip Potter
Yes it can! It's just a jar file after all, so you can use the classes in your java program if you like. However, clojure data structures typically do not use static typing as java uses it. For example, PersistentVector is a collection of Objects and not genericized. Getting things out of such a

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Qihui Sun
Thanks above two reply. As Sean Corfield said,it is a bit complex.If there is a command option,ONE TIME do this,it will more convenient. For example: java -jar clojure-1.5.0.jar -genclasses,will produce clojure-lib-1.5.0.jar,and it is genericized as Philip Potter mentioned! Maybe Clojure as a

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Sean Corfield
On Sat, Jun 2, 2012 at 7:31 PM, Qihui Sun qihui@gmail.com wrote: For example: java -jar clojure-1.5.0.jar -genclasses,will produce clojure-lib-1.5.0.jar,and it is  genericized as Philip Potter mentioned! Sounds like what you want is Leiningen, to generate an uberjar, optionally with