I really like Clojure as a language, but the JVM implementation takes over a second to start. This lack of responsiveness makes it a poor choice for many small scripts that should run quickly. If not for this issue, I would probably use Clojure on a regular basis.
Although you could argue the .NET CLR is also optimized for long-running applications, because it's directly competing with Java. Why is the CLR so much quicker?
For interests sake, I typed "java -version" on my new MacBook Pro now and it took 0.9 seconds. Second time it took 0.11 seconds. It's still unacceptably slow, in my opinion.
I can't agree with you more. I love clojure. We have done some projects with clojure. But clojure start slow, which make scriting with it a very bad idea. As an example one of our team member write this: https://github.com/killme2008/clojure-control. we use it to manage many machines remotely, wich is a pain. We used to use fabfile to manage them, with is much better.
One solution (a little awkward) is to keep a warmed-up JVM in the background, and have your scripts send the arguments to it. Some trouble to setup, and of course the send-code can't be in Java... but it is lightening fast. I'm not sure why this isn't a more common practice: if there was a standard server and (non-java) client, it wouldn't be awkward.
Comments
I really like Clojure as a language, but the JVM implementation takes over a second to start. This lack of responsiveness makes it a poor choice for many small scripts that should run quickly. If not for this issue, I would probably use Clojure on a regular basis.
As did java just a few years ago. Once it has been started once though, it's quicker.
As does java - it's all the same jvm.
The VM is optimized for long-running applications, not brief scripts............ bang those out in whatever.
Although you could argue the .NET CLR is also optimized for long-running applications, because it's directly competing with Java. Why is the CLR so much quicker?
For interests sake, I typed "java -version" on my new MacBook Pro now and it took 0.9 seconds. Second time it took 0.11 seconds. It's still unacceptably slow, in my opinion.
If ClojureScript ever becomes self-hosting (it's currently compiled via JVM-Clojure), it'd be much more attractive for scripting.
(PS: should mention that it's fine if you don't anticipate editing said scripts often)
I can't agree with you more. I love clojure. We have done some projects with clojure. But clojure start slow, which make scriting with it a very bad idea. As an example one of our team member write this: https://github.com/killme2008/clojure-control. we use it to manage many machines remotely, wich is a pain. We used to use fabfile to manage them, with is much better.
One solution (a little awkward) is to keep a warmed-up JVM in the background, and have your scripts send the arguments to it. Some trouble to setup, and of course the send-code can't be in Java... but it is lightening fast. I'm not sure why this isn't a more common practice: if there was a standard server and (non-java) client, it wouldn't be awkward.