Question about parentheses

Whatever is on your mind, whether Lisp related or not.

Re: Question about parentheses

Postby Duke » Wed Aug 18, 2010 3:44 pm

Jonsul wrote:Else is there a faster way to type parentheses, like a way to turn off numbers for a sec or something.

I just had an idea: put the parens on the home row via the Mode_switch modifier. I use a custom keymap with Xmodmap, which includes this:

Code: Select all
keycode 133 = Mode_switch
keycode 134 = Mode_switch

keycode 46 = n N parenleft
keycode 47 = s S parenright


I press either of the super keys, plus n or s, which are on the home row in the Dvorak layout. It feels better. It'll take some getting used to before it actually becomes more efficient, but I think it'll be worthwhile... maybe less so now that I'm using ParEdit and don't even have to type parenright anymore. ;)

Edit: it's been almost two weeks. I've adjusted to the change and am satisfied that it was worth the bother. I gravitated fairly easily toward super+n instead of shift+9, though mapping parenright did turn out to be a waste of a key. The benefit is not so much the easier reach as it is keeping my fingers on the home row to type in whatever comes after the paren.
Last edited by Duke on Mon Aug 30, 2010 12:09 am, edited 1 time in total.
"If you want to improve, be content to be thought foolish and stupid." -Epictetus
Duke
 
Posts: 38
Joined: Sat Oct 17, 2009 10:40 pm

Re: Brackets/Parentheses on Windows

Postby Kohath » Sun Aug 29, 2010 11:43 pm

Mostly OT :mrgreen:

TheGZeus wrote:
Paul wrote:
Kohath wrote:Hey. I use Windows almost all of the time, and I was being driven mad too.


Driven mad? If you're using Windows, you must already be mad, no?

Oh, snap!

Quite - so far it's too hard for me to unlearn windows, especially as I don't have large amounts of time, I'm just lucky I unlearned Algol like languages. The good thing about the Autohotkey solution (just like the keyboard modmap solutions) is that it works for every other program/interface on the computer (like typing here).

I also have daydreams of designing my own operating system to get lisp closer to the metal and UI, in the spirit of Genera or Squeak, but if I tried to do that on my own I'd probably officially be classed as insane.
User avatar
Kohath
 
Posts: 50
Joined: Mon Jul 07, 2008 8:06 pm
Location: Toowoomba, Queensland, Australia

Re: Brackets/Parentheses on Windows

Postby gugamilare » Mon Aug 30, 2010 11:03 am

Kohath wrote:I also have daydreams of designing my own operating system to get lisp closer to the metal and UI, in the spirit of Genera or Squeak, but if I tried to do that on my own I'd probably officially be classed as insane.


You are not the firt one to dream about that, take a look at Movitz. It seems to be quite dead by now.
gugamilare
 
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil

Re: Question about parentheses

Postby Warren Wilkinson » Thu Sep 02, 2010 10:13 am

I use a non-standard dvorak varient called Programmers Dvorak http://www.kaufmann.no/roland/dvorak/. I further modified it by swapping 'u' and 'i', and making CAPSLOCK just a third CTRL button. My parenthesis are under keys '5' and '8', but I don't have to hold shift to get them.

This is a file I called dvorak.xmodmap, you can use it with X11 on Linux by typing "xmodmap /path/to/dvorak.xmodmap".
Code: Select all
!
! Special programming replacements
!
keysym grave = dollar asciitilde
keysym 1 = ampersand percent
keysym 2 = bracketleft 7
keysym 3 = braceleft 5
keysym 4 = braceright 3
keysym 5 = parenleft 1
keysym 6 = equal 9
keysym 7 = asterisk 0
keysym 8 = parenright 2
keysym 9 = plus 4
keysym 0 = bracketright 6
keysym minus = exclam 8
keysym equal = numbersign grave
!
! Fairly Standard Dvorak key changes
!
!keysym equal = bracketright braceright
!keysym minus = bracketleft braceleft
keysym q = semicolon colon
keysym w = comma less
keysym e = period greater
keysym r = p
keysym t = y
keysym y = f
keysym u = g
keysym i = c
keysym o = r
keysym p = l
keysym bracketleft = slash question
keysym bracketright = at asciicircum
keysym s = o
keysym d = e
keysym f = i
keysym g = u
keysym h = d
keysym j = h
keysym k = t
keysym l = n
keysym semicolon = s
keysym apostrophe = minus underscore
keysym z = apostrophe quotedbl
keysym x = q
keysym c = j
keysym v = k
keysym b = x
keysym n = b
keysym comma = w
keysym period = v
keysym slash = z
!
! Switch Caps Lock and Control
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Control = Control_L
!keysym Num_Lock = Num_Lock Caps_Lock
!add Lock = Caps_Lock
Need an online wiki database? My Lisp startup http://www.formlis.com combines a wiki with forms and reports.
User avatar
Warren Wilkinson
 
Posts: 116
Joined: Tue Aug 10, 2010 11:24 pm
Location: Calgary, Alberta

Re: Question about parentheses

Postby findinglisp » Sat Sep 04, 2010 7:09 am

Warren Wilkinson wrote:I use a non-standard dvorak varient called Programmers Dvorak http://www.kaufmann.no/roland/dvorak/. I further modified it by swapping 'u' and 'i', and making CAPSLOCK just a third CTRL button. My parenthesis are under keys '5' and '8', but I don't have to hold shift to get them.


I have considered learning alternate keyboard layouts many times over the years, and even switched to standard Dvorak for a month or so about 15 years ago. I always found that I had problems whenever there was another keyboard that I had to use (everything from a colleague's laptop to my own Android slider phone). A while ago, I made the decision that an alternate mapping just wasn't a big a win as I hoped. It's just too tough being a Dvorak person in a QWERTY world, at least for me. The big problem for me was that I find that I really can't hold two mappings in my head, and so any switching time really throws me off. I type very fast on QWERTY as it is, so I found that in the month I switched to Dvorak, I never got back to my QWERTY speed, and then when I switched back, it took me about a month before I was back up to my original QWERTY speed.

That said, if it works for you, very cool. There are definite advantages to Dvorak and other keyboard layouts (I'd probably learn Colemak now, for the compatibility with left-handed Ctrl-Z, -X, -C, which was a definite problem with standard Dvorak).
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
findinglisp
 
Posts: 440
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX

Re: Brackets/Parentheses on Windows

Postby TheGZeus » Sun Sep 05, 2010 9:26 am

Kohath wrote:Mostly OT :mrgreen:

I also have daydreams of designing my own operating system to get lisp closer to the metal and UI, in the spirit of Genera or Squeak, but if I tried to do that on my own I'd probably officially be classed as insane.

Well, a friend and I are in the planning stages of writing a system in a combination of Forth, Lisp, and a NeWS-like dialect of PostScript.
It's meant to run on OpenFirmware/OpenBOOT, as that gives you a biiiig standard library.
We're not ready to go into detail, but I'll be mentioning it on the forums as we get closer.
TheGZeus
 
Posts: 79
Joined: Mon Jun 30, 2008 10:46 am

Re: Question about parentheses

Postby TheGZeus » Sun Sep 05, 2010 9:35 am

findinglisp wrote:(I'd probably learn Colemak now, for the compatibility with left-handed Ctrl-Z, -X, -C, which was a definite problem with standard Dvorak).

Colemak is poesgoed.

I'm much faster, more efficient, and RSI is no longer looming over my left hand.
The Kinesis helps, too.

I got back to my QWERTY speed fairly quickly, but I had a weird, semi-hunt-and-peck way of typing that required me to look down at the kb every few words.
TheGZeus
 
Posts: 79
Joined: Mon Jun 30, 2008 10:46 am

Re: Question about parentheses

Postby findinglisp » Sun Sep 05, 2010 9:42 am

TheGZeus wrote:
findinglisp wrote:(I'd probably learn Colemak now, for the compatibility with left-handed Ctrl-Z, -X, -C, which was a definite problem with standard Dvorak).

Colemak is poesgoed.

I'm much faster, more efficient, and RSI is no longer looming over my left hand.
The Kinesis helps, too.

I got back to my QWERTY speed fairly quickly, but I had a weird, semi-hunt-and-peck way of typing that required me to look down at the kb every few words.


So, what do you do when you have to use a QWERTY keyboard?
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
findinglisp
 
Posts: 440
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX

Re: Question about parentheses

Postby TheGZeus » Sun Sep 05, 2010 3:58 pm

findinglisp wrote:
TheGZeus wrote:
findinglisp wrote:(I'd probably learn Colemak now, for the compatibility with left-handed Ctrl-Z, -X, -C, which was a definite problem with standard Dvorak).

Colemak is poesgoed.

I'm much faster, more efficient, and RSI is no longer looming over my left hand.
The Kinesis helps, too.

I got back to my QWERTY speed fairly quickly, but I had a weird, semi-hunt-and-peck way of typing that required me to look down at the kb every few words.


So, what do you do when you have to use a QWERTY keyboard?

I look at the kb about 50% of the time, and make slightly more typos, and/or type rather slowly.
Since I didn't relabel my keys I see them all the time, and Colemak really does make moving back and forth somewhat less painful than I hear Dvorak can be.
I carry my netbook everywhere so I rarely have to use other people's computers, and I'm usually much more frustrated not having things like Japanese input, tiled window management, a useful command line, and Emacs keyboard controls. Kinda hard to be worried about where keys are when it just took you minutes to figure out how to launch a program.

EDIT: To clarify, my typing is weird only on QWERTY keyboards. On Colemak I often look away from both the screen and the keyboard, and I type fairly quickly.
TheGZeus
 
Posts: 79
Joined: Mon Jun 30, 2008 10:46 am

Re: Question about parentheses

Postby findinglisp » Mon Sep 06, 2010 8:07 am

TheGZeus wrote:EDIT: To clarify, my typing is weird only on QWERTY keyboards. On Colemak I often look away from both the screen and the keyboard, and I type fairly quickly.


That sounds reasonable. My problem is that it pretty much botched me on everything and it was painful every time I had to get it done. I really type today on QWERTY without really thinking about the keys at all. When I tried to make the switch in the past, that stopped and what was previously an unconscious act suddenly became conscious again. That really hammered my productivity.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
findinglisp
 
Posts: 440
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX

PreviousNext

Return to The Lounge

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron