drip icon indicating copy to clipboard operation
drip copied to clipboard

iclojure started thought drip fails at readline

Open vi opened this issue 11 years ago • 6 comments

In iclojure started normally on my Debian Wheezy I can use up,down,Home,End and other keys. But in iclojure started thought drip those keys produce some capitalized letters (and I have to use ^P, ^N, ^F, ^B instead to natigate around).

Also iclojure startup time is still slow even if I use drip...

vi avatar Apr 12 '13 22:04 vi

Just use Leiningen. REPLy, which version 2 uses, is probably the best Clojure REPL out there and it has built-in readline support.

iclojure seems to be using a plugin and lein trampoline. This very likely means the JVM trampoline starts is not started via Drip.

michaelklishin avatar Apr 12 '13 22:04 michaelklishin

I was trying stand-alone iclojure and "iclojure" script are edited to use "drip".

REPL-y is fine (I see only one omission compared to iclojure: can't tab-complete object's Java methods), but the issue still conflicts with "drop-in replacement of java"...

vi avatar Apr 12 '13 22:04 vi

@vi let me explain. iclojure does not start the REPL. It starts Leiningen which, via a feature called trampoline which basically makes Leiningen set up the classpath, run another JVM with it and exit. So it is Leiningen's trampoline that is running whatever the plugin is that iclojure uses.

If tools are not aware of Drip, they will use the regular java runner. Drip developers cannot change every single tool out there.

michaelklishin avatar Apr 12 '13 22:04 michaelklishin

You can prevent drip from being used at all with a leiningen invocation by setting LEIN_JAVA_CMD=.

Raynes avatar Apr 12 '13 22:04 Raynes

iclojure is started directly, not using lein trampoline irepl.

By default iclojure script does this:

  1. Check if we are inside Leiningen project.
  2. If inside Leiningen project, start lein trampoline irepl
  3. If not in any Leiningen project, $JAVA -client -jar $ICLOJURE_JAR. And I had JAVA=drip before that line.

First time (without pre-loaded instance) it started normally, but the second time (using pre-loaded JVM) it behaved poorly.

You can prevent drip from ... -> The question is not about preventing or enabling drip. The question is about drip and readline. Is drip intended to be used only with Leiningen or with any Java application?

vi avatar Apr 12 '13 23:04 vi

Drip is known to be used with JRuby

michaelklishin avatar Apr 13 '13 00:04 michaelklishin