I'll also reply inline ... -> On 23 jan, 00:51, Peter Wolf <opus...@gmail.com> 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 > > 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 with some > > options predefined. > > Yes, this is exactly what I do also, and it is even called a > "configuration" in IntelliJ > > > To enable the user work against the clojure version he wants, we > > require him to have clojure library as a standard library dependency > > on the classpath of his eclipse project. > > > I think you could do quite the same thing for IntelliJ. > > > We did that because of several reasons : > > > - we wanted the user to be able use his own version of clojure, not an > > imposed one > > - we wanted the user to be able to have several clojures running at > > the same time > > - we absolutely wanted to prevent the user run his code in the eclipse > > VM ! > > - we wanted regular eclipse users to feel at home with clojuredev, > > having in mind that having a smooth migration path from java to > > clojure, first by just incorporating bits of clojure in a (n already > > existing) java project codebase, could be a good thing. > > Yep. Same solution, same reasons.> So we took the road you described by > quoting Stuart. We call a "bridge > > function" that takes strings and returns strings (or core clojure > > datastructures : maps, vectors, strings, keys, java.lang basic types). > > > This bridge function runs on the eclipse JVM, and calls a server we > > systematically install in the remote JVM when the user launches his > > project. > > > The code for the client part is here : > >http://code.google.com/p/clojure-dev/source/browse/clojuredev/trunk/s... > > The code for the server part is here : > >http://code.google.com/p/clojure-dev/source/browse/clojuredev/trunk/s... > > (and yes, it's yet another variation on the repl over socket) > > Thanks, I shall take a look at this. > > 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? How do you > detect it/protect from it?
No, currently, clojuredev's dynamism is tied to an existing (and visible via its REPL console) launched configuration. It is this configuration that is used. So the user has only access to the launched JVM, and if he breaks it, then he just has to click on the "stop VM" button on the classic console view. Was that your question ? > > For example, I was using the SmallSnake code for testing, and when that > file is loaded, it pops up a window and runs a process forever. I don't > want that to happen, just because someone included that file in their > IntelliJ project. > > This must be a problem common to all Swank based IDEs. What is the > "Clojure way" here? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---