Re: Calling Clojure from Java (again)

2009-01-23 Thread lpetit
On 23 jan, 03:00, Stuart Sierra wrote: > On Jan 22, 6:51 pm, Peter Wolf wrote: > > > However, if there is only one Clojure image used for references and the > > like, what happens if someone calls an infinite loop, or infinite > > recursion, in a file.  Does the Clojure server hang/blow up?   >

Re: Calling Clojure from Java (again)

2009-01-23 Thread lpetit
Hi, On 23 jan, 01:43, Peter Wolf wrote: > Hi Laurent, > 1) Does Eclipse use the server for resolving references? Currently, the only resolved references are those that come from a clojure environment launched by the user. So yes. When time comes to resolve references for the needs of the editor

Re: Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
Thanks for the explanation Stuart, So it seems that all the Swank Clojure IDEs rely on files only containing "safe" code. I guess that's OK provided everyone understands this. Is is any way to only process the def's? For example processing the following would only define the symbol "foo", b

Re: Calling Clojure from Java (again)

2009-01-22 Thread Stuart Sierra
On Jan 22, 6:51 pm, Peter Wolf wrote: > However, if there is only one Clojure image used for references and the > like, what happens if someone calls an infinite loop, or infinite > recursion, in a file.  Does the Clojure server hang/blow up?   If you code an infinite loop, the SWANK server will

Re: Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
Hi Laurent, My questions and current beliefs are: 1) Does Eclipse use the server for resolving references? 2) Is the server visible to the user, or hidden inside Eclipse? 3) Does the server call load-file? 4) Can the user break the server with bogus code in a file? 5) What happens if a file has

Re: Calling Clojure from Java (again)

2009-01-22 Thread lpetit
I'll also reply inline ... -> On 23 jan, 00:51, Peter Wolf wrote: > Thanks for the lengthy reply Laurent,  Replies in-line > > lpetit wrote: > > Peter, > > > We asked us the same question some weeks ago, on clojuredev. > > > We took the path to follow how eclipse launches a java application > >

Re: Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
Thanks for the lengthy reply Laurent, Replies in-line lpetit wrote: > Peter, > > We asked us the same question some weeks ago, on clojuredev. > > We took the path to follow how eclipse launches a java application > when the user requires it to test it. > So we created a customized "launch config

Re: Calling Clojure from Java (again)

2009-01-22 Thread lpetit
Peter, We asked us the same question some weeks ago, on clojuredev. We took the path to follow how eclipse launches a java application when the user requires it to test it. So we created a customized "launch configuration" (sorry, eclipse jargon), that is just a classical eclipse java launcher w

Re: Calling Clojure from Java (again)

2009-01-22 Thread Michael Reid
On Thu, Jan 22, 2009 at 4:43 PM, Peter Wolf wrote: > > This is a rejuvenation of the old "calling Java from Clojure" thread > > I have been looking at the solutions from Mark > / > 1) From a Java application, read a text file containing Clojure code > and invoke specific functions it defines

Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
This is a rejuvenation of the old "calling Java from Clojure" thread I have been looking at the solutions from Mark / 1) From a Java application, read a text file containing Clojure code and invoke specific functions it defines from Java code. 2) Compile Clojure code to bytecode and use