Re: how to restart Clojurescript One repl the right way?

2012-03-15 Thread Murphy McMahon
This is what I did on a project branched off of ClojureScript One:

https://github.com/pandeiro/multiedit/blob/multi-edit/src/app/clj/one/sample/repl.clj

It saves the server instance to an atom and adds (stop) and (restart)
functions. Just an idea. M

On Sat, Mar 10, 2012 at 6:36 AM, Pierre-Henry Perret  wrote:
> Yes, good question. It leads to another one: is ther a clojure hook  to stop
> the server ?
>
> I personally kill the process to sweep out the vm and then can restart
> again.
>
> Le jeudi 8 mars 2012 09:21:58 UTC+1, George Oliver a écrit :
>>
>> hi, I'm just starting with ClojureScript and ClojureScript One.
>> Sometimes working with One I kill the cljs-repl for whatever reason
>> (something hangs, I make some mistake and can't correct it, etcetera);
>> when I go to restart (by running lein repl again), I then can't
>> restart the cljs-repl. I get,
>>
>> BindException Address already in use: JVM_Bind
>> java.net.PlainSocketImpl.socketBind
>>
>> What's the right way to restart in this situation? Thanks.
>
> --
> 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

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


Re: how to restart Clojurescript One repl the right way?

2012-03-11 Thread Pierre-Henry Perret
Yes, good question. It leads to another one: is ther a clojure hook  to 
stop the server ?

I personally kill the process to sweep out the vm and then can restart 
again.

Le jeudi 8 mars 2012 09:21:58 UTC+1, George Oliver a écrit :
>
> hi, I'm just starting with ClojureScript and ClojureScript One. 
> Sometimes working with One I kill the cljs-repl for whatever reason 
> (something hangs, I make some mistake and can't correct it, etcetera); 
> when I go to restart (by running lein repl again), I then can't 
> restart the cljs-repl. I get, 
>
> BindException Address already in use: JVM_Bind 
> java.net.PlainSocketImpl.socketBind 
>
> What's the right way to restart in this situation? Thanks.

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

Re: how to restart Clojurescript One repl the right way?

2012-03-11 Thread John Collins


On Thursday, March 8, 2012 9:21:58 AM UTC+1, George Oliver wrote:
>
> hi, I'm just starting with ClojureScript and ClojureScript One. 
> Sometimes working with One I kill the cljs-repl for whatever reason 
> (something hangs, I make some mistake and can't correct it, etcetera); 
> when I go to restart (by running lein repl again), I then can't 
> restart the cljs-repl. I get, 


> BindException Address already in use: JVM_Bind 
> java.net.PlainSocketImpl.socketBind 
>
> What's the right way to restart in this situation? Thanks.




When you get a BindException error like the one you have it's probably 
because your ring server didn't shut down properly when your repl 
disconnected. I always have to resort to looking up the pid(in Linux) and 
killing the process running on the address:port  and running lein repl 
again or cljs-repl if you are still within the clojure repl. I think this 
situation can be remedied somehow if the server connection can be saved to 
a var so that a stop and start function can be called on it.

John 

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

how to restart Clojurescript One repl the right way?

2012-03-08 Thread George Oliver
hi, I'm just starting with ClojureScript and ClojureScript One.
Sometimes working with One I kill the cljs-repl for whatever reason
(something hangs, I make some mistake and can't correct it, etcetera);
when I go to restart (by running lein repl again), I then can't
restart the cljs-repl. I get,

BindException Address already in use: JVM_Bind
java.net.PlainSocketImpl.socketBind

What's the right way to restart in this situation? Thanks.

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