On Tue, 13 Jul 2010 21:55:15 +0100 Paul Richards <paul.richa...@gmail.com> wrote:
> I'm new to Clojure, and I've found it possible to make Clojure scripts > executable by adding '#!/usr/bin/env clj' as the first line (and > 'chmod +x' of course). > > E.g. My sample script: > > #!/usr/bin/env clj > > (println "Hello World") > > This seems like a very convenient way to dabble with Clojure, yet I > have not seen it suggested anywhere. Is this method discouraged? It's just slow - you have to load the JVM, then clojure, then it starts working on your scripts. You can use nailgun to fix most of that. See my writeup on clojure without the Java (which also recommends the env hack) for more on that - and other such tricks.: http://www.mired.org/home/mwm/papers/simple-clojure.html <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- 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