I need a way to run Clojure
code faster. I use SciTE
for almost all languages including Clojure
which means that you have to run Clojure
pretty much the same way you run it from the command line. I've created some batch file that runs the Clojure
file on hitting <F5>
:
@java -cp C:\clojure-1.5.1\clojure-1.5.1.jar clojure.main %*
My main gripe is that running a Clojure
file takes almost 2 seconds to run, which is unacceptable. I want the code to run(compile faster?) as fast as in Clooj
and at the same time have a python
or Lisp
file in another tab for experimentations and other stuff something that SciTE
can provide.
I want to know how Clooj
can run/evaluate the whole file in less than a second so that I can reproduce the same in SciTE
and not have to switch between the two when for example testing if some code can run unmodified in Common Lisp
. It would be awesome if there was a way to evaluate code from the command line like clisp -q -x "(print 'under-a-second)"
.
My main objective is not to move away from SciTE
(Clojure
-Lisp
code comparison) and still be able to run code faster(I'm talking about startup, not optimization).
UPDATE:
The Clojure compiler can evaluate code from the command line(found it in main.clj
in the jar file), this way:
java -cp clojure-1.5.1.jar clojure.main -e "(print 'hello)"
The bad news is that it compiles the expressions which take on average 2 seconds like the previous one.