Re: [racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-24 Thread Nadeem Abdul Hamid
On Sat, Nov 24, 2012 at 12:14 PM, Grant Rettke gret...@acm.org wrote:

 On Sat, Nov 24, 2012 at 11:07 AM, Nick Shelley nickmshel...@gmail.comwrote:

 I sort of like this behavior, and the visual difference gets rid of any
 potential confusion.


 Just an idea... you might duplicate Paredit's functionality:

 http://emacswiki.org/emacs/ParEdit

 It is way past beta and has probably gone through all of the pain of
 debating over points like this since a lot of people use it and have shared
 their feedback, too.


I haven't really used ParEdit at all - just tried it out a little bit in
the last couple of days - but it seems to be too much of a straitjacket to
me (at least in its default, out-of-the-box settings)? It overrides/ignores
too much of what I try to do in terms of typing (closing) parens, and it
seems possible to get it in a state where parentheses don't match up, like
 ( ... ], and it's not immediately evident how to correct it conveniently
because ParEdit neither lets me delete or change the ].



 Additionally, it would be a big selling point for DrRacket to be able to
 offer Paredit equivelant functionality in addition to the other great
 stuff it already offers.


Yes, or maybe, better-than-ParEdit functionality, :-P 




 
   Racket Users list:
   http://lists.racket-lang.org/users


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-24 Thread 주대연
I agree with the proposal.
And source-code auto formtting is also useful.
2012. 11. 23. 오전 9:29에 Nadeem Abdul Hamid nad...@acm.org님이 작성:

 Hello all,

 I've been discussing with Robby a possible improvement of DrRacket's
 automatic parentheses behavior and would like to get a sense of others'
 general opinion about this. What follows is a description of my proposal
 and then some concrete questions.

 ;;
 The idea is to have DrRacket automatically skip over
 automatically-inserted closing parens if the user types one while the
 cursor is right in front of one. (The Eclipse Java IDE does this with
 various types of braces and parens, and in the past I've found this very
 nice and have observed others (my students) interact well with such a
 feature.)

 A concrete example: suppose you are in the process of typing the
 expression (+ 4 (- 1 2) 3). After you type the first opening
 parentheses and the characters following it up to the 2, the expression
 in the editor looks like:
   (+ 4 (- 1 2|))
 where the | represents the cursor's position. Note the two
 automatically-inserted closing parens that are after the cursor right now. 
 With
 the current implementation, you have to then use the right arrow key to
 make the cursor skip past the first auto-inserted ) and then you can
 type 3. However, that really disrupts the typing process because even
 if you don't type a ) as a habit and then realize you have to delete the
 extra one, you still have to lift and move your finger to the arrow keys
 area of the keyboard or type some other key combination to skip the
 cursor forward.

 My proposal would be to have it so that if you type ) in the editor
 state above, it becomes:
   (+ 4 (- 1 2)|)
 and now you continue typing a space and the 3. Of course, the same thing
 should apply for other types of parens - ( [ { etc.

 I don't know about others, but I actually get annoyed with the curent
 automatic parens feature to the point of disabling it. That is, I like
 the auto-parens feature not because it relieves me from having to type
 closing parentheses - I don't mind that, and I actually tend to do that
 automatically as I'm typing expressions; but the benefit is that it always
 keeps parens balanced while I'm still in the middle of typing an
 expression. However, with the current behavior, it tends to make me type
 extra closing parentheses and have to go back and delete parens to balance
 things up again.

 ;;
 So, the questions:

 1. Do you use the automatic parentheses feature of DrRacket?

 2a. If yes, does the proposal above resonate well with you?
 2b. And, do you think this smart skipping of auto-inserted closing
 parentheses should become the intrinsic behavior of the automatic
 parentheses mode, or should it be a separate preference? (i.e. have two
 preference options - the current automatic parentheses one and then a
 subordinate option that enables/disables this skipping over of
 auto-inserted closing parentheses as the user types them)

 3. If your answer to #1 is No, why not? (Is it because you find its
 current behavior awkward in some way?)

 Thanks,

 nadeem


 
   Racket Users list:
   http://lists.racket-lang.org/users


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-23 Thread Eli Barzilay
8 hours ago, Nadeem Abdul Hamid wrote:
 The idea is to have DrRacket automatically skip over
 automatically-inserted closing parens if the user types one while
 the cursor is right in front of one. (The Eclipse Java IDE does this
 with various types of braces and parens, and in the past I've found
 this very nice and have observed others (my students) interact well
 with such a feature.)

IMO, inserting a closing paren (of any shape, including quotes) must
come with such a feature, but what you describe is only to let you get
used to the idea.  I'd prefer that in the auto-insert-closing-paren-
mode, typing a closing paren jumps over the existing one even if the
cursor is not in front of one.  IOW, in this mode, I'd like it if (
and ) behave like M-( and M-) in Emacs (IIRC, drr doesn't do the
last one).

I'd also extend it with more paredit-like things, like backspacing or
deleting a paren.  (I don't actually use paredit, but for the sake of
being what some people are used to, I'd vote for whatever it is
doing.)  That's probably the only other extension that is needed to
make this mode into a proper you're pretty much always balanced
thing.

And BTW, since the bg check syntax thing was mentioned: I think that
it is a very good reason to have this feature, since it makes a huge
improvement in having it run into read errors much less.  (Personally,
on both drr and emacs, I've completely adapted to always using the
meta with an open paren, and IME it's one thing that helps students a
lot yet they seldom know about it or remember to use it.  I'm so used
to it, that if I happen to type or see a single ( I have a mental
alarm go off.)


Having said that:

 1. Do you use the automatic parentheses feature of DrRacket?

No, I'm used to always M-ing my parens.  (In both editors.)  Having a
proper drr thing might actually make me change it, given that there is
an Emacs thing that I can use too.


 2a. If yes, does the proposal above resonate well with you? 
 2b. And, do you think this smart skipping of auto-inserted closing
 parentheses should become the intrinsic behavior of the automatic
 parentheses mode, or should it be a separate preference? (i.e. have
 two preference options - the current automatic parentheses one and
 then a subordinate option that enables/disables this skipping over
 of auto-inserted closing parentheses as the user types them)

I have a strong opinion about this, even without using it...  I think
that it shouldn't be a separate option.  In this mode the ( key is
already useless for just inserting a single paren, so there's no
reason that ) will be different.


 3. If your answer to #1 is No, why not? (Is it because you find
 its current behavior awkward in some way?)

(Explained above.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-22 Thread Harry Spier
On Thu, Nov 22, 2012 at 7:20 PM, Nadeem Abdul Hamid nad...@acm.org wrote:


1. Do you use the automatic parentheses feature of DrRacket?

Yes


 2a. If yes, does the proposal above resonate well with you?

I would prefer the following.  On my computer (windows) when auto-inserted
closing parenthesis is enabled, if I type ctrl [ then no closing bracket is
inserted but  ctrl ( inserts a closing bracket and ctrl { does nothing.  I
would prefer ctrl-( , ctrl-[ and ctrl-{ all don't insert a closing bracket
and also use ctrl-), ctrl-} and ctrl-] for the behavour you describe.

 2b. And, do you think this smart skipping of auto-inserted closing
 parentheses should become the intrinsic behavior of the automatic
 parentheses mode, or should it be a separate preference?

I would like a separate preference.
Thanks,
Harry Spier



 
   Racket Users list:
   http://lists.racket-lang.org/users


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-22 Thread Asumu Takikawa
On 2012-11-22 19:20:54 -0500, Nadeem Abdul Hamid wrote:
The idea is to have DrRacket automatically skip over
automatically-inserted closing parens if the user types one while the
cursor is right in front of one. (The Eclipse Java IDE does this with
various types of braces and parens, and in the past I've found this
very nice and have observed others (my students) interact well with
such a feature.)

That sounds good to me. I don't use automatic parens in DrRacket, but I
have in the past. In emacs or vim, I use paredit, which has the same
behavior on closing parens (though paredit seems to also insert a
newline for indentation).

Cheers,
Asumu
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-22 Thread Stephen Chang
I have tried automatic parens and stopped using it for the exact
reasons you mentioned. I would start using it again if your proposal
is implemented.



On Thu, Nov 22, 2012 at 7:20 PM, Nadeem Abdul Hamid nad...@acm.org wrote:
 Hello all,

 I've been discussing with Robby a possible improvement of DrRacket's
 automatic parentheses behavior and would like to get a sense of others'
 general opinion about this. What follows is a description of my proposal and
 then some concrete questions.

 ;;
 The idea is to have DrRacket automatically skip over automatically-inserted
 closing parens if the user types one while the cursor is right in front of
 one. (The Eclipse Java IDE does this with various types of braces and
 parens, and in the past I've found this very nice and have observed others
 (my students) interact well with such a feature.)

 A concrete example: suppose you are in the process of typing the expression
 (+ 4 (- 1 2) 3). After you type the first opening parentheses and the
 characters following it up to the 2, the expression in the editor looks
 like:
   (+ 4 (- 1 2|))
 where the | represents the cursor's position. Note the two
 automatically-inserted closing parens that are after the cursor right now.
 With the current implementation, you have to then use the right arrow key to
 make the cursor skip past the first auto-inserted ) and then you can type
 3. However, that really disrupts the typing process because even if you
 don't type a ) as a habit and then realize you have to delete the extra one,
 you still have to lift and move your finger to the arrow keys area of the
 keyboard or type some other key combination to skip the cursor forward.

 My proposal would be to have it so that if you type ) in the editor state
 above, it becomes:
   (+ 4 (- 1 2)|)
 and now you continue typing a space and the 3. Of course, the same thing
 should apply for other types of parens - ( [ { etc.

 I don't know about others, but I actually get annoyed with the curent
 automatic parens feature to the point of disabling it. That is, I like the
 auto-parens feature not because it relieves me from having to type closing
 parentheses - I don't mind that, and I actually tend to do that
 automatically as I'm typing expressions; but the benefit is that it always
 keeps parens balanced while I'm still in the middle of typing an expression.
 However, with the current behavior, it tends to make me type extra closing
 parentheses and have to go back and delete parens to balance things up
 again.

 ;;
 So, the questions:

 1. Do you use the automatic parentheses feature of DrRacket?

 2a. If yes, does the proposal above resonate well with you?
 2b. And, do you think this smart skipping of auto-inserted closing
 parentheses should become the intrinsic behavior of the automatic
 parentheses mode, or should it be a separate preference? (i.e. have two
 preference options - the current automatic parentheses one and then a
 subordinate option that enables/disables this skipping over of auto-inserted
 closing parentheses as the user types them)

 3. If your answer to #1 is No, why not? (Is it because you find its
 current behavior awkward in some way?)

 Thanks,

 nadeem


 
   Racket Users list:
   http://lists.racket-lang.org/users

_
  Racket Developers list:
  http://lists.racket-lang.org/dev