On Nov 16, 1:09 pm, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> Now, with Clojure compiled into its jar and the associated faster  
> launching, it's reasonable to think of using Clojure for more tasks  
> that might otherwise be done with bash/perl/python.
>
> That would require a way (ideally built into the standard clojure.jar)
> for Clojure to read a script from stdin, execute it, and exit. Would
> this be best done by enhancing clojure.lang.Script or by providing a
> new "main" tailor made for it?

Yes, yes!  My suggestion would be to modify clojure.lang.Script to
make it work like bash/perl/ruby; i.e., script is first argument,
command-line args follow, if no args at all read script from STDIN.

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.

-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to