On Mon, Nov 24, 2008 at 9:27 PM, Stephen C. Gilardi <[EMAIL PROTECTED]>wrote:

>
> On Nov 24, 2008, at 1:49 PM, Michael Wood wrote:
>
> This looks great :)
>
>
> Thanks!
>
> A couple of comments below:
>
> On Mon, Nov 24, 2008 at 6:57 PM, Stephen C. Gilardi <[EMAIL PROTECTED]>
> wrote:
> [...]
>
> Here are some examples of using the proposed clojure.main via "java -
>
> jar clojure.jar":
>
>
> Display usage info:
>
>
> % java -jar clojure.jar --help
>
> Usage: java -jar clojure.jar [option*] [file-arg*] [--] [arg*]
>
>
> Perhaps this should be:
>
> Usage: java -jar clojure.jar [option*] [file-arg* [-- [arg*]]]
>
> or does it make sense to allow args without file-args?
>
>
> It does make sense to allow args without file-args. However, -- is
> necessary if and only if you're including args, so I think this is correct
> (please check me on that):
>
> Usage: java -jar clojure.jar [option*] [file-arg*] [-- arg*]
>

That's fine by me.

Combining eval and repl, demonstrating that the repl can load files
>
> and see arguments:
>
>
>       % java -jar clojure.jar -e "\"welcome to the repl\"" --repl init.clj
>
> -- 1 2 :a :b
>
>       welcome to the repl
>
>       hi from init.clj, arguments are ("1" "2" ":a" ":b")
>
>       Clojure
>
>
> This "Clojure" seems out of place.  I wonder if it would make sense to
> suppress it if the repl is loading stuff, or if "-e" is used?
>
>
> It's there due to "--repl". I use an init.clj all the time to set up things
> like *print-length* that can't be set up in user.clj. I suppose I could put
> whatever greeting I wanted there if a "repl that loads files" didn't print
> Clojure. I'm inclined to leave it in for now pending more feedback.
>

Yes, I understand it's because of the --repl.

This is what Python does:

$ python
Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

$ python -i -c 'print "welcome to the repl"'
welcome to the repl
>>>

$ echo 'print "Hello from test.py"' >test.py
$ python -i test.py
Hello from test.py
>>>

That's not to say you should copy Python for the sake of it, but I think it
makes sense :)

I forgot to say that I think having a separate cljc makes sense.

-- 
Michael Wood <[EMAIL PROTECTED]>

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