How to Use Clojure for Scripting
asimjalis.github.io
asimjalis.github.io
I'm (mostly) kidding...
I want to like clojure. I've always had a soft spot in my heart for lisp, and clojure seems to be the best contender for hitting the right balance between the classic "no syntax at all, just more parens" and various more modern takes on "It's lisp, but with our own weird syntax bits layered on." Unfortunately the JVM'ness of it has shown through so much as to kind of turn me off. (Not least of all the overhead of starting a JVM to do anything.)
Have you tried Racket?
But yeah, racket is fun.
In terms of having a soft spot for lisp and clojure I find that Racket is the best thing ever for scratching that itch. I really am excited by clojure for scripting though.
Racket Scripting https://docs.racket-lang.org/guide/scripts.html
Certainly many little tricks to help with speed.
I've had racket, and particularly the plt redex stuff, on my list for someday when I have time for a while now.
I've only ever been exposed to Clojure. Does Scala and JRuby have this as well?
I do like some of Clojure's syntactic sugaring, but I haven't yet decided whether it's worth it to me to use Rackjure (Clojure-isms ported to Racket).
[1] http://planck-repl.org [2] https://anmonteiro.com/2016/11/the-fastest-clojure-repl-in-t...
(defn deps [the-deps]
(merge-env! :dependencies the-deps))Anyways, running a clj file using the provided shebang does indeed work! Albeit _much_ more slowly than a comparable Perl|Python|Ruby script.