Re: Counterclockwise nREPL multiple commands
On Dec 9, 1:27 pm, Chas Emerick wrote: > On Dec 6, 2011, at 11:27 PM, jlhouchin wrote: > > > As I work through the Programming Clojure book, I play with the code I > > enter into the REPL. > > I just want to say that I am infinitely enjoying using the REPL in > > Counterclockwise. It does make multi-line code so much nicer. > > > Awesome job guys. > > > Now that I had my perverse pleasure. Is there a way to force quit a > > command/job rather than the REPL? > > > Thanks again for a totally awesome tool and language. > > Counterclockwise does not yet provide the UI for killing a running > evaluation. Coming sooner or later. :-) > > BTW, if you have further tooling questions, there is a dedicated > Counterclockwise mailing list: > > http://groups.google.com/group/clojuredev-users/ Hello, Yes, I am subscribed to the Counterclockwise list. The main reason I posted here is that I do no know what is Counterclockwise versus what is nREPL in this particular situation. Would you still consider the Counterclockwise list the preferred list for this question? I will keep that in mind for further questions and comments. Thanks. Jimmie -- 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: Ending or closing malformed line in REPL
On 12/9/2011 1:34 PM, Chas Emerick wrote: > > On Dec 6, 2011, at 11:31 AM, jlhouchin wrote: > >> This biggest issue I see in this context, is that the REPL is tied to >> the editor. Yes, I can detach the REPL, but it is still a part of the >> editor. I can't have the pdf of my book side by side with the REPL. As >> soon as I click on the REPL, the entire editor comes to the top, >> putting my book behind. Making it impossible to see the code I am >> attempting to enter. >> >> Is there a way to run this REPL completely independent of the editor? > > You can detach the REPL view from the Eclipse frame; right click on the REPL > view's tab and choose "Detached". If I'm reading your question right, that > should get you what you want. Yes, you can detach the REPL from the the current tab or location within the editor. But it seems that either Eclipse or CCW is using a form of Multiple Document Interface which causes the editor window to come to the top above any other application when the REPL is selected and has the focus. If I have the REPL detached and only using 1/3 of the width of my screen and I have the editor at full width. The editor blocks everything except the REPL which is the topmost within the editor. So what I have settled on for my journey through the book is to leave the REPL in its normal place and resize the editor to 1/3 of the width of my screen. This leaves 2/3 the width for the book. This is working fine on my 15" laptop. I have also simply created a Clojure Project for the book, so that I can type the code as I progress through the book. This workflow is working fine for me. >> Also, I do not see any way to go back in history with this REPL as I >> can with the other. > > Ctrl+up and Ctrl+down will allow you to recall expression history. > > (Note that if you're on the Mac, these shortcuts clash with Spaces; you'll > need to either rebind them to other keys in the Eclipse preferences, turn off > Spaces, or change Spaces' keyboard shortcuts.) Thanks. I don't know if that is documented anywhere, but I missed it. I will definitely put that to use. And thanks for this wonderful tool. I know it isn't where you want it to be, but it is definitely very usable. I definitely look forward to seeing what a CCW 1.x looks like. Jimmie -- 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
Counterclockwise nREPL multiple commands
Hello, As I work through the Programming Clojure book, I play with the code I enter into the REPL. I just want to say that I am infinitely enjoying using the REPL in Counterclockwise. It does make multi-line code so much nicer. I entered this. (defn whole-numbers [] (iterate inc 1)) (take 10 (for [n (whole-numbers) :when (> 100 n)] n)) As expected it outputs the desired results. This is after my first experiment which ended in putting the REPL into an infinite loop which required force quitting. (take 10 (for [n (whole-numbers) :when (> 10 n)] n)) As I had enter the above in a REPL that I had to quit. I tried it again after entering the successful command at the top. And I wondered why this one was infinite. Then I noticed that I had a (take 10 ...) which would never be satisfied and seq which was infinite and never cease iterating. So while I was watching the REPL churn up one of my two cores, I had a thought. I re-entered the successful command again. And the REPL took it and executed it just fine. I continued for a while executing both the infinite and finite versions of the above into the REPL. It just kept on going. It took all the cpu I could give, but kept going. At some point it ran out of resources and exited. This was not unexpected by me. Awesome job guys. Now that I had my perverse pleasure. Is there a way to force quit a command/job rather than the REPL? Thanks again for a totally awesome tool and language. Jimmie -- 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: Ending or closing malformed line in REPL
On Dec 6, 10:04 am, Stuart Sierra wrote: > The built-in Clojure REPL is bare-bones to minimize external dependencies. > Maybe some day we can have alternate distributions with more full-featured > REPLs. For now, it's easier to use a development environment: Emacs + > inferior-lisp or SLIME, Counterclockwise + Eclipse, Clooj, LaClojure + > IntelliJ, ... > > -S Yes, I understand. It isn't a problem. I was following the instructions of the book which uses the default REPL. For a minimal REPL, it really isn't that bad. I have seen worse. And I was the creator of the problem I was having. I am enjoying learning Clojure. It is nice. Thanks. Jimmie -- 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: Ending or closing malformed line in REPL
On 12/6/2011 12:23 AM, Laurent PETIT wrote: > 2011/12/6 jlhouchin: >> On 12/5/2011 7:19 PM, Stephen Compall wrote: >>> On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote: >>>> When I entered the closing " and then closing >>>> paren. I was fine. >>> >>> You may also try backspace; unusually for a REPL, that works. >> >> I tried that. But as I was on a new line after hitting the enter/ >> return key. It wouldn't go back to the previous line. I would have >> loved that it did. That the backspace could backspace over newlines. >> That would be sweet. >> >> Now, I do not know if there are any difference in repls or if there is >> only one repl. I was using the default 1.3 repl. > > There are also REPLs embedded in all the major editors / IDEs. As a > shameless plug, I'd say that the namespace of Counterclockwise, a > Clojure Feature for Eclipse, does the job quite well (input history, > syntax coloration, code completion, hyperlinks, non-blocking sends, > multiline input area with auto-indentation, namespace browser with > search box& documentation on mouse over / go to source on mouse > double click, etc.) > > If you're interested, go to its "Getting Started page" : > http://dev.clojure.org/display/doc/Getting+Started+with+Eclipse+and+Counterclockwise > > If you do not know / like Eclipse, then just start again from this > general starting page to see what best suits your needs: > http://dev.clojure.org/display/doc/Getting+Started Hello Laurent, and also Petr from his post. Thank you for your replies. I have already selected Counterclockwise to use for editing. I am a longtime Smalltalker, so I like rich environments. But I have yet to learn how to use it much. I have not seen how to simply open a REPL like I would use to go through the books examples. When I go through the menus, I see a Connect to REPL option. But I have no REPLs to connect to. I did not know how to connect or use a REPL within ccw. So, upon the writing of this email I went to search the ccw group archives. I had already joined a week or so ago. I found how to open a REPL. It took me a moment to learn how to execute a statement which was entered. Then I happened upon ctrl-enter. This biggest issue I see in this context, is that the REPL is tied to the editor. Yes, I can detach the REPL, but it is still a part of the editor. I can't have the pdf of my book side by side with the REPL. As soon as I click on the REPL, the entire editor comes to the top, putting my book behind. Making it impossible to see the code I am attempting to enter. Is there a way to run this REPL completely independent of the editor? Also, I do not see any way to go back in history with this REPL as I can with the other. Thanks for your suggestion. I look forward to learning ccw better. Jimmie -- 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: Ending or closing malformed line in REPL
On 12/5/2011 7:19 PM, Stephen Compall wrote: > On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote: >> When I entered the closing " and then closing >> paren. I was fine. > > You may also try backspace; unusually for a REPL, that works. I tried that. But as I was on a new line after hitting the enter/ return key. It wouldn't go back to the previous line. I would have loved that it did. That the backspace could backspace over newlines. That would be sweet. Now, I do not know if there are any difference in repls or if there is only one repl. I was using the default 1.3 repl. Thanks. Jimmie -- 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: Ending or closing malformed line in REPL
My apologies for the noise. I had entered (interleave (whole-numbers) ["A" "B" "C"] [") on the repl and hit enter. When I went back and tried again and looked and looked. The problem is the open string " prior to what appears to be a closing paren. In this instance it isn't a closing paren but a part of the string which is waiting to be closed. When I entered the closing " and then closing paren. I was fine. I should have provided more context in the original post and you could have seen my error. Again, my apologies. Jimmie On Dec 5, 11:03 am, jlhouchin wrote: > Hello, > > While I am going through the Programming Clojure 2nd edition book, I > am entering the code into a REPL. > > Sometimes when entering the code I enter a typo and hit enter and > cannot get the REPL to close that malformed line. > > It often happens with an errant closing ] or ). > Frequently this occurs when I go back in the history to edit a > previous line to edit, explore and play with it. The closing paren is > already in the line and I accidentally hit enter. > > I would love to know how I can cause that line to execute, and give me > the error, so that I can go on and try again. > > Currently I end up having to exit the REPL and create a new one. > > If that is the only thing I can do, that is fine. I just wanted to > learn if there was some other means of completing that line. > > Thanks. > > Jimmie -- 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
Ending or closing malformed line in REPL
Hello, While I am going through the Programming Clojure 2nd edition book, I am entering the code into a REPL. Sometimes when entering the code I enter a typo and hit enter and cannot get the REPL to close that malformed line. It often happens with an errant closing ] or ). Frequently this occurs when I go back in the history to edit a previous line to edit, explore and play with it. The closing paren is already in the line and I accidentally hit enter. I would love to know how I can cause that line to execute, and give me the error, so that I can go on and try again. Currently I end up having to exit the REPL and create a new one. If that is the only thing I can do, that is fine. I just wanted to learn if there was some other means of completing that line. Thanks. Jimmie -- 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