Re: call clojure from java

2014-02-18 Thread Sunil S Nandihalli
You can't call a clojurescript function from java. However you can call clojure-code from Java and clojurescript code from javascript. On Tue, Feb 18, 2014 at 5:09 PM, sorin cristea wrote: > Hi > > do you know how I can call a clojure script from a java method ? > > > Thanks, > Sorin. > > -- >

Re: call clojure from java

2014-02-18 Thread Shantanu Kumar
Hi Sorin, Are you looking for something like load-file: http://clojuredocs.org/clojure_core/clojure.core/load-file Shantanu On Tuesday, 18 February 2014 17:09:20 UTC+5:30, sorin cristea wrote: > > Hi > > do you know how I can call a clojure script from a java method ? > > > Thanks, > Sorin. >

Re: call clojure from java

2014-02-18 Thread Michael Klishin
2014-02-18 16:00 GMT+04:00 Sunil S Nandihalli : > You can't call a clojurescript function from java. However you can call > clojure-code from Java and clojurescript code from javascript. I think the idea is to call a Clojure script (with a space) from Java. Use clojure.lang.RT#var and clojure.l

Re: call clojure from java

2014-02-18 Thread Sunil S Nandihalli
sorry I misread the email! On Tue, Feb 18, 2014 at 6:17 PM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > > 2014-02-18 16:00 GMT+04:00 Sunil S Nandihalli > : > > You can't call a clojurescript function from java. However you can call >> clojure-code from Java and clojurescript code fr

Re: call clojure from java

2014-02-18 Thread Stathis Sideris
I think you're looking for this method here: https://skillsmatter.com/skillscasts/3864-impromptu-rich-hickey-lightning-talk (you need to register to see the video) On Tuesday, 18 February 2014 11:39:20 UTC, sorin cristea wrote: > > Hi > > do you know how I can call a clojure script from a java

Re: call clojure from java

2014-02-18 Thread sorin cristea
Hi guys, Thanks for your information. I would take the advantage of concurrency in clojure and implement a concurrent scenario in clojure and call it from java code. For example I want to read/modify the content of file from many threads, this scenario I want to implement in clojure, and call t

Re: call clojure from java

2014-02-18 Thread Alex Miller
FYI, as of Clojure 1.6, you will use the clojure.java.api.Clojure class to obtain vars instead of RT. http://clojure.github.io/clojure/javadoc/clojure/java/api/Clojure.html But I would actually recommend creating a Java interface that looks just how want it, and then implement that interface in