blog.rupamsunyata.org

Decklin’s excuse for some blogging software. Est. 2006.

Cover an ox with a sheet

New Filco keyboard! Do want.

(There is a good explanation of mechanical keyswitches at ErgoCanada. This is a "light tactile" board. Opinions, as they say, will vary.)

I may be just a little too into this. My girlfriend laughed at me when I actually bit my lip upon determining firsthand that the ICA had aquired, for their iMac-populated computer lab, 20 or so of the out-of-production tactile version of another particular keyboard I'd been coveting. But I couldn't help it.

(Don't worry. We laugh at each other a lot.)

The data are

So I always knew that my ThinkPad's display sucked. But now I have scientific proof! (Long-winded post about my job follows.)

I was running some timing tests at work on the code for a psychology experiment. This involves quickly presenting a stimulus to the subject, then measuring reaction time and synchronizing with EEG readings. Nothing very complicated, but accurate timing is essential; you don't want another variable confounding your results. So I have this photocell device that sends a signal to a Mac through the EEG hardware when there is really actually physical light coming off of the screen, not just when I told the computer to display something.

Now CRTs, of course, are actually scanning (with an electron gun) the display at 75 or 85 Hz or something, not constantly pumping out light to the whole screen. This means 12 or 13 (or whatever) ms between refreshes. So if you want something to appear for 100 ms, you have to fudge a little, and make it so that you get maybe 8 or 9 scans. You can synchronize your presentation to the refresh so this is feasible. But how long the subject really perceives it ultimately depends on how "flickery" the monitor is at a given refresh rate.

LCDs, on the other hand, do not have this problem. They actually do produce light constantly -- their refresh rate is pretty much always only 60 Hz or less, but you get the same(ish) output over the entire cycle, instead of in blips that give the illusion of a constant image (in fact, as Matthew points out, they can continue to hold the same image for even longer periods between refreshes. Can't wait to try out that patch). And luckily for us, 6 cycles are in theory exactly 100 ms (in practice, it's close enough).

Or so I thought. I could not, no matter how many times I banged my head against it, get consistent results between our laptop (also a ThinkPad) and any external display. For reasons I do not entirely understand (probably scheduling issues), on CRTs I was getting one extra cycle, so I had to reduce the time by one to compensate. This was done for published studies years before I arrived at the lab, so (for the sake of not introducing additional variables) there is an extremely large disincentive to go back and fix it the Right Way, whatever that is. Our laptop's internal display was producing results that were skewed like those of a CRT. I thought for a minute I was going nuts from testing all day, but it kept happening.

Curious, I swapped out the lab's T60 for my faster T61 and (to rule anything else out) killed all my other processes and wrote a fresh PyEPL script that did nothing but repeatedly blink some text for 100 ms. Here is, on the external VGA port, a cheap old 15" Dell LCD I pulled from the server room:

http://www.rupamsunyata.org/~decklin/blogfiles/20080626/vga-lcd.png

(These images are from the Mac, which is still using System 9.something. I had to remember Command-Shift-3 to take a screenshot and use StuffIt to get them off of it. Srsly. I can't remember the last time I used StuffIt.)

And here is a CRT, showing the refreshes: (The DIN3 line is the actual signal, and the others are integrated over some number of milliseconds to compensate for scanning and attempt to get a usable number. Of course, this is done in hardware, not synchronized to anything else.)

http://www.rupamsunyata.org/~decklin/blogfiles/20080626/vga-crt.png

Now, this is the one that blew my mind. The ThinkPad's internal LCD:

http://www.rupamsunyata.org/~decklin/blogfiles/20080626/lvds-lcd.png

You can see that 60 Hz is spaced much farther apart, and that there are 6 cycles as intended, but. It's acting like a CRT! On the refresh, it puts out enough light to trigger the photocell, but inbetween, nothing. I ought to be noticing flicker and/or getting headaches all the time, if this is truly the case. (I guess I did get glasses for and because of staring at computer displays all the time. Should update my hackergotchi.) I have to admit I do not understand what is going on here at all. But it seems like making any assumptions about a display is (as the voice in my head was telling me all along) a very bad idea. Perhaps someone can email me some clue. But at least I have some hard data to validate my subjective opinion of the ThinkPad's internal LCD.

Anyway: I still recommend the ThinkPad, even if the display is awful. I have a nice external monitor connected through DVI to the dock at home, and I mainly use a laptop so I can get out of the house and go hack outside or in a coffeeshop (not ideal lighting). The build quality, keyboard/trackpoint, performance, and the fact that Debian (testing or unstable, anyway) Just Works are all higher up on the list for me. I do wish I could afford the new lighter one, though.

Dealing with it

I had this crazy idea a few months ago which Joey's post about muscle memory reminded me of.

For those not in the US, our keyboards have ` and ~ on the key to the left of 1. I prefer this key to be Esc. Long ago I simply swapped the two keys, but the original "Esc" key is always in some weird and inconsistent place and reaching for ~ became as annoying as reaching for Esc. (I suppose I might not care if I didn't use a unix shell or regular expressions or bit masks or...)

So, noting that I mostly only wanted that key for ~, and not `, I came up with the following (in xmodmap form):

keycode 49 = Escape asciitilde grave Escape

This means: if you just hit the key, it does the Right Thing (Esc, as if I were on a real unixy keyboard). If you hold Shift and press the key, it also does the Right Thing (~, as if I were on a PC). But what to do about `, or Shift-Esc, which are no longer possible? We make them the alternate graphs (just old down AltGr. I think the xkb option to put this on right Alt is "grp:switch"). I honestly use those two infrequently enough that I don't care about having to remember the extra bucky.

(I tend to type $(cmd) in the shell, and not `cmd`, because I use the former in scripts and I always found the latter harder to read. I suppose I would care more if I used Lisp or Haskell or...)

What I like most about this solution is that it lets me use the same muscle memory on all my hardware. Never mind weird Esc positions; laptop vendors still can't agree on the correct order of Fn and Control. But you don't have to care if you put Control on Caps Lock. Same idea. It does feel a bit like cheating, but it has made my wrists far more comfortable.

Oh, and to wean myself off the key way out in the corner:

keycode 9 = NoSymbol

Now the question, of course (getting back to Joey), is what would happen if my "new" Escape key broke. I guess I'd have to keep the laptop at home and plug in my Happy Hacking Keyboard :-)

Dear Lazyweb

I just wasted half an hour (mostly finding a dead motherboard and bending wire) making one of these:

http://www.rupamsunyata.org/~decklin/blogfiles/20060622/usbport.jpg

I then threw out the cap to my USB storage device. Why doesn’t anybody sell them? Why are the holes for your keyring always on the part you use (thus weighing it down, particularly if it's sticking out of the front of a tower) and not the part that comes off? It's not easy to unplug by accident (I did squeeze it a bit removing some of the metal).

I think I’m just not looking in the right place. I can’t be the first person to have been annoyed with this. Lazyweb, please tell me where to go.

(Yes, the only thing I use it for is my SSH key.)

LOWSRC

I’ve been meaning to put up some old (recent) stuff from Cat and Girl. One, two. I know the latter is supposed to be the funny one but it really gets me for some reason. I guess you had to be there. (See subject line.)

I have not actually had a chance to test this yet

Dear Lazyweb,

Does anyone know how to remap Caps Lock to Control in Windows for a specific keymap (e.g. Dvorak) only? The standard thing appears to be hardware-level.

Dvorak

I cleaned the house today and vacuumed out my keyboard because it seriously needed it. And since I had the keycaps off... well, I decided this might be a good time to switch to the dark side. We’ll see how long this lasts.

I have no idea why the keycap part mattered, because I haven’t actually looked down yet, just at this image of the keymap.

vi is a bit weird.

Ah, Usenet

Some interesting old comp.arch posts from John Mashey.

Whoops

Apropos of my last post here, I am redoing my rawdog config and writing a tag plugin. This involved merging all my state pickles into one file first, which rather strangely brought my server to its knees until the OOM-killer kicked in.

I couldn't figure out what was going on for a second. And then I noticed that ever since I switched it to LVM I wasn't using my swap partition at all. So, a word of warning: never assume your fstab is right just because your filesystems show up.

Pickle still needs to be replaced, but a lot of things need to be replaced.

This would explain many things

(11:12:42) Decklin: do you know the price of athlons has almost doubled?
(11:12:58) Kelly: why?
(11:13:08) Kelly: bird flu?

Generated by Mnemosyne 0.9.