On Sat, Apr 9, 2011 at 6:46 AM, Lee Spector <lspec...@hampshire.edu> wrote:
> But still, I will humbly submit that it's totally freakin' nutso that it 
> should be so hard to do basic user interaction.

I'm curious as to what percentage of developers are writing
console-based applications (in any language)?

What do the processes look like in other languages? How are those
processes different to what happens with Clojure?

With the following test program, t.clj...

(println "Testing...")
(let [a (read-line)]
        (println "> " a))

...I can open up a REPL, do (load-file "t.clj") and it runs as
expected. I can also type clj run t.clj and it works just fine (can't
remember where I got that script from - it just wraps the java command
to start Clojure).

Now, I will concede that lein run t.clj does not work - and that does
seem a bit odd given that lein repl then (load-file "t.clj") works but
if it's a technical limitation with the run task, fair enough.

However, given the clj run command, I can add a #! line to my Clojure
scripts, make them execute and just run them:

#!/usr/bin/env clj run
(println "Testing...")
(let [a (read-line)]
        (println "> " a))

Now I can just type ./t.clj and it works as expected...
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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

Reply via email to