Hacker News new | ask | show | jobs
by kbd 2743 days ago
> Java is not as bad as you think. Clojure does takes a little longer though

For example, I have a Python script[1] that runs on each command prompt to print status about my current git repository. Just timed it, it runs in .08-.12 seconds within a repo and about .02s outside of a repo. I still want to rewrite it in C using libgit2 someday, but something like that would be unusable if it was written in Clojure.

[1] https://github.com/kbd/setup/blob/master/HOME/bin/repo.py

2 comments

Yeah, for scripting you should use something like Planck: it uses clojurescript which is virtually the same language as clojure, but starts up super fast so is great for scripts: https://github.com/planck-repl/planck
absolutely, Clojure is not a scripting language and Planck is amazing.

There are issues with a Graal-compiled Clojure repl due to reflection (apparently), but I think it's only a matter of time before those geniuses come up with something.

And python tends to have fairly high startup time (compared to compiled languages) for any non-trivial script.