Re: clojure.lang.Script

2008-12-21 Thread Parth Malwankar



On Dec 21, 8:21 pm, Emeka  wrote:
> > java -cp clojure.jar clojure.lang.Script yourapp.clj
>
> In my SciTe I added  java -cp clojure.jar clojure.lang.Script $(FilePath)
> plus others and when I click 'GO' or F5 instead of running the code and
> printing result. I have
>
>
>
> > java -cp clojure.jar clojure.lang.Script C:\janus\myapp.clj
>
>   exit 0
>
> No other thing comes out. So how do I cause it to print the result of the
> code I have written. It works in SciTe, however, it doesn't print result.
> Have you used clojure.Lang.Script with SciTe before?

If you are using the latest Clojure you can probably try:
java -cp clojure.jar clojure.main filename.clj

I haven't used SciTe but this is what I do in my clojure launch
script.

Parth

>
> Emeka.
--~--~-~--~~~---~--~~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: clojure.lang.Script

2008-12-21 Thread Emeka
>
>
> java -cp clojure.jar clojure.lang.Script yourapp.clj
>

In my SciTe I added  java -cp clojure.jar clojure.lang.Script $(FilePath)
plus others and when I click 'GO' or F5 instead of running the code and
printing result. I have

>
> java -cp clojure.jar clojure.lang.Script C:\janus\myapp.clj

  exit 0

No other thing comes out. So how do I cause it to print the result of the
code I have written. It works in SciTe, however, it doesn't print result.
Have you used clojure.Lang.Script with SciTe before?

Emeka.

--~--~-~--~~~---~--~~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: clojure.lang.Script

2008-12-21 Thread James Reeves

On Dec 20, 5:07 pm, janus  wrote:
> I wanted to use clojure.lang.Script in order to use SciTe editor,
> however, I am not getting any result. Has anyone used Script before,
> if yes, please I need your help. First ,I need direction on how to use
> it .Or anyone really used Scite with  Clojure, if yes, please copy you
> code and send to me.

You just need to run clojure.lang.Script with the Clojure jar file in
your classpath:

java -cp clojure.jar clojure.lang.Script yourapp.clj

- James
--~--~-~--~~~---~--~~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



clojure.lang.Script

2008-12-20 Thread janus

I wanted to use clojure.lang.Script in order to use SciTe editor,
however, I am not getting any result. Has anyone used Script before,
if yes, please I need your help. First ,I need direction on how to use
it .Or anyone really used Scite with  Clojure, if yes, please copy you
code and send to me.

Emeka
--~--~-~--~~~---~--~~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: agents and hanging clojure.lang.Script

2008-11-26 Thread Shawn Hoover
On Wed, Nov 26, 2008 at 1:41 PM, Vincent Foley <[EMAIL PROTECTED]> wrote:

>
> I was toying around with agents today, and I got a weird behavior:
> agents hang clojure.lang.Script.  Here's a simple demo script; if you
> run this script, it'll print the vector and the program will be
> hung.
>

The agent threadpools hang around and keep the process alive. Try calling
shutdown-agents at the end of your script.

Shawn

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



agents and hanging clojure.lang.Script

2008-11-26 Thread Vincent Foley

I was toying around with agents today, and I got a weird behavior:
agents hang clojure.lang.Script.  Here's a simple demo script; if you
run this script, it'll print the vector and the program will be
hung.

(let [a (agent [])]
  (doseq [i (range 10)]
(send-off a conj i))
  (await a)
  (println @a))

$ java -cp $HOME/src/clojure/clojure.jar clojure.lang.Script
agents.clj
[0 1 2 3 4 5 6 7 8 9]
# Script is hung here

Running the same code in clojure.lang.Repl prints the vector, returns
nil and gives you a new prompt.

Is it "normal" behavior, is there some sort of clean up that needs to
be done, am I not using agents correctly?

Thanks for the help,

Vincent.

P.S. This is with r1125
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---