On Thursday, June 9, 2016 at 12:08:39 PM UTC-4, Jiacai Liu wrote:
>
> I  started learning clojure recently, and I am annoyed at the way to run 
> it (aka. lein run). why clojure script can't be run like python,ruby or 
> scala, like python <file>.py
>

I suggest using [Inlein](http://inlein.org/) for this. You just download 
the inlein script, pop it into your ~/bin (and make sure it's executable 
(`chmod +x inlein`)), and make your scripts start like:

~~~
#!/usr/bin/env inlein

'{:dependencies [[org.clojure/clojure "1.8.0"]
                 [org.clojure/some.thing "0.1.2"]
                 [some-lib "1.2.3"]]}

(require '[clojure.some.thing :as sth]
         '[some-lib.core    :as sl])

;; Any args passed to script are stored in the `*command-line-args*`
;; list, with no script name (just args).
(println "Hi, Inlein!" *command-line-args*)
~~~

and, *boom*, you got yourself a stew goin'.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to