On Nov 16, 2008, at 1:21 PM, Stuart Sierra wrote:
> I would like both the REPL and Script to be callable from the same
> main
> (), i.e. you should just be able to call java -jar clojure.jar without
> naming a class. Default behavior would be to run a script, as with
> bash/perl/ruby, use a special command-line arg to run a REPL. Or
> maybe imitate python, and run a REPL if there are no command-line
> args. Either way is cool by me.
>
> If I have time today, I'll cook up some code for this.
One canonical, flexible main sounds good to me too. I was mistaken
about how things work now, though. With Rich's change today, the
following already works as an executable script (hello.clj):
#!/usr/bin/env java -cp /sq/ext/clojure/clojure.jar clojure.lang.Script
(println "Hello, cores!")
For me, that launches and runs in about 1.1 seconds of real time.
Cool!
--Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---