Page 3 of 3

Re: Question about parentheses

PostPosted: Wed Sep 08, 2010 10:39 pm
by Warren Wilkinson
Learning a new keyboard layout requires you to do touch typing exercises all over again. While you are learning, you will feel crippled (seriously), it takes about a month of daily practice before you are comfortable with the keys. You'll still make mistakes (lots of them) but you'll now find guess and check faster than looking at your reference keyboard cheat sheet.

Re: Question about parentheses

PostPosted: Fri Sep 10, 2010 2:21 am
by TheGZeus
I didn't ever do touch-typing exercises, not intentionally anyway.
In fact, seeing as I'm dysgraphic, those touch-typing exercises they had me doing were systematic in a way that left me spelling things weirdly until I got off qwerty.

Re: Question about parentheses

PostPosted: Fri Sep 10, 2010 6:34 am
by nuntius
FWIW, I tried Colemak for less than an hour last night. By the end, I could type the alphabet from a-z with only a few mistakes. Definitely easier to learn than Dvorak. Colemak has many keys matching qwerty and several easy patterns like "rst" and "jklmn"; u and y almost make sense in relation to the other keys. Not yet ready to switch (especially for passwords) but I'll try to keep practicing.

Re: Question about parentheses

PostPosted: Sun Sep 12, 2010 10:13 pm
by Jonsul
Since I've posted I've discovered Racket which has "{" and "[" all equivalent to "(". Which is nice because I can use either at the same time so it allows me to organize my code more.

Re: Question about parentheses

PostPosted: Tue Sep 14, 2010 4:38 pm
by findinglisp
Jonsul wrote:Since I've posted I've discovered Racket which has "{" and "[" all equivalent to "(". Which is nice because I can use either at the same time so it allows me to organize my code more.


Personally, this is a nightmare for me. When editing, you're bound to get something unbalanced and then it's a pain (either the implementation barfs or what you think is structure is suddenly untrustworthy, leading to bugs). IMO, use indentation for structure and organization, and ignore the parentheses altogether. But that's just me. There was a time when the ability to do that would have appealed to me (when I still "saw" parentheses). I understand the appeal.

Re: Question about parentheses

PostPosted: Tue Sep 14, 2010 5:51 pm
by gugamilare
findinglisp wrote:
Jonsul wrote:Since I've posted I've discovered Racket which has "{" and "[" all equivalent to "(". Which is nice because I can use either at the same time so it allows me to organize my code more.


Personally, this is a nightmare for me. When editing, you're bound to get something unbalanced and then it's a pain [...]


I guess you usually can't get something unbalanced using Paredit. But this would be bad for me, too. I'm used "not to see" parenthesis, but rather to see indentation. If you alternate between {, [ and (, you'll create irregularities in the code that your brain won't ignore. Lisp code is so clean compared to other languages! Plus, the difference between { and ( is not easily seen, for instance:
Code: Select all
)}})))})}))})

Re: Question about parentheses

PostPosted: Thu Sep 16, 2010 8:19 pm
by findinglisp
gugamilare wrote:
findinglisp wrote:
Jonsul wrote:Since I've posted I've discovered Racket which has "{" and "[" all equivalent to "(". Which is nice because I can use either at the same time so it allows me to organize my code more.


Personally, this is a nightmare for me. When editing, you're bound to get something unbalanced and then it's a pain [...]


I guess you usually can't get something unbalanced using Paredit. But this would be bad for me, too. I'm used "not to see" parenthesis, but rather to see indentation. If you alternate between {, [ and (, you'll create irregularities in the code that your brain won't ignore. Lisp code is so clean compared to other languages! Plus, the difference between { and ( is not easily seen, for instance:
Code: Select all
)}})))})}))})


Paredit is definitely the way to go, but even Paredit gets unbalanced sometimes with heavy editing and various other Emacs commands thrown in. It's much nicer to be able to fix that by just inserting a ")" somewhere, rather than having to try to figure out whether you need to balance a ")", "]" or "}". And as you rightly point out, they actually aren't very visually different (though this is somewhat font dependent and the font used in LispForum makes this worse).

Re: Question about parentheses

PostPosted: Thu Sep 16, 2010 11:54 pm
by Jonsul
Unbalanced code isn't really a problem at all. Because DrRacket automatically balances it no matter what you type. If you type "[cons 'a '(b c)" when you close cons it'll put a "]" whether you type ")" or "}". Plus the big plus to me isn't clarity in the brackets it was just a side I listed. I have a bit of carpel tunnel so the difference between a two key push vs a pinky push is big. My hand gets tired and sore after typing so many parenthesis. Plus I don't really mix brackets much anyways, the ends of my functions typically end like this:
Code: Select all
]]]]]]

But anyways I've fixed the problem for me at least a little bit. I've created my first utility to make it easier for me, and others that are interested, to program in Common Lisp. I made Parent, give it your code file in the command-line and it converts square brackets and curly brackets into parenthesis. Also if your not interested check it out and tell me what you think. It's my first fully polished program in Scheme. It's made on linux so I'm not sure how clear it is on windows.

http://ifile.it/r7x1gtd

By the way, it's programmed in pure R6RS if you want to check out the code.