Re: Ending or closing malformed line in REPL

2011-12-09 Thread Chas Emerick

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.

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

Cheers,

- Chas

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

2011-12-09 Thread jlhouchin
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


Re: Ending or closing malformed line in REPL

2011-12-06 Thread Stuart Sierra
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

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

2011-12-06 Thread jlhouchin
On 12/6/2011 12:23 AM, Laurent PETIT wrote:
 2011/12/6 jlhouchinjlhouc...@gmail.com:
 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

2011-12-06 Thread jlhouchin
On Dec 6, 10:04 am, Stuart Sierra the.stuart.sie...@gmail.com 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

2011-12-06 Thread Laurent PETIT
2011/12/6 jlhouchin jlhouc...@gmail.com:
 On 12/6/2011 12:23 AM, Laurent PETIT wrote:
 2011/12/6 jlhouchinjlhouc...@gmail.com:
 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?

Hello Jimmie,

Sorry for the inconvenience on the undocumented Ctrl+Enter. That's
something I'm working on and will be fixed in the next release.

 Also, I do not see any way to go back in history with this REPL as I
 can with the other.

Yes, currently, a REPL in CCW will be tied to a project, which will
provide the classpath context for the REPL, among other things.

Then, once the REPL is started, you can maximize it via Ctrl+M (on
Windows/Linux).

Hope that helps,

-- Laurent


 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

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

2011-12-05 Thread jlhouchin
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


Re: Ending or closing malformed line in REPL

2011-12-05 Thread jlhouchin
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 jlhouc...@gmail.com 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


Re: Ending or closing malformed line in REPL

2011-12-05 Thread Stephen Compall
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.

-- 
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better

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

2011-12-05 Thread 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.

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

2011-12-05 Thread Laurent PETIT
2011/12/6 jlhouchin jlhouc...@gmail.com:
 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

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

2011-12-05 Thread Laurent PETIT
2011/12/6 Laurent PETIT laurent.pe...@gmail.com:
 2011/12/6 jlhouchin jlhouc...@gmail.com:
 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

s/namespace/REPL/

 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

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

2011-12-05 Thread Petr Gladkikh
Clojure REPL in Counterclockwise
(http://code.google.com/p/counterclockwise/) is pretty nice.
And yes, allowing multi-line expressions and having no way to edit
them is annoying.

On Tue, Dec 6, 2011 at 11:45 AM, jlhouchin jlhouc...@gmail.com wrote:
 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



-- 
Petr Gladkikh

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