SYSRQ on MacBook

Lately I’ve really needed SysRq in situations where /proc/sysrq-trigger just doesn’t do the job, and my MacBook is missing lots of crusty old XT-era keys. Finally, I know how to do this!

/* includes and error handling omitted for brevity... */
#define USAGE_CODE 0x070044 /* USB hid for F11 */

int main()
{
int codes[2];
int fd = open("/dev/input/by-id/usb-Apple_Computer_Apple_"
"Internal_Keyboard_._Trackpad-event-kbd", O_NONBLOCK);

codes[0] = USAGE_CODE;
codes[1] = KEY_SYSRQ;  /* from linux/input.h */
ioctl(fd, EVIOCSKEYCODE, codes);
}

Awesome. Supposedly, a tool called keyfuzz is also efficacious.

October 7, 2008 · bob

Guitars

Guitars Originally uploaded by bluesterror

To add a little space to our cozy apartment, I put up a couple of guitar wall hangers over the weekend and put the cases in storage (don’t tell our leasing office). It looks pretty cool, though I do think the guitars want 8 or 9 more friends. I just hope this isn’t the start of the inevitable transition from guitar-as-instrument to guitar-as-display-item.

October 7, 2008 · bob

Old soldiers

I had the good fortune to attend a free DC ACM-sponsored lecture by Tony Hoare last week. Hoare is the inventor of quicksort as well as the man behind two of my favorite Computing-related quotes:

Premature optimization is the root of all evil. (via Knuth)

There are two ways of constructing a software design: one way is to make it so simple there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

He gave a fairly dry talk on the importance of program correctness and how CS-the-science hopes to eventually figure out proof methods and tools that will some day help CS-the-discipline. But, he notes, we’re still a long way off.

I’m still not a member, but good things are coming out of the local ACM chapter. This is the same series that brought Brian Kernighan earlier in the year. Next month there is a black tie affair with Bjarne Stroustrup as the keynote.

October 5, 2008 · bob

OSS, I has it

I just sat in on a conference call as a representative (by default, since no one else called in) of the Linux ath5k community, with Atheros, makers of my MacBook’s wireless ethernet card. Atheros have really done a 180 for supporting the community, first by releasing ath9k, then by releasing the source to their previously-closed HAL last week. Thanks to that, 6 patches have already gone out fixing various problems. BTW, conference calls are just as pointless in the OSS community as they are in real life. But at least I did learn that it is pronounced “uh-THERE-ose”, not “ATH-er-ose.”

Buy laptops with Atheros wireless cards!

October 1, 2008 · bob

Divested

As of last Thursday, I’m no longer a land owner, so you guys are on your own with that whole voting thing.

September 30, 2008 · bob

Bits

Now that I’ve relearned Booth’s algorithm, I now understand this particular silliness. Are there still any machines where this is fast?

September 18, 2008 · bob

Turing

I’ve been going over a lot of old textbooks while studying for my upcoming CS GRE. I forgot how good the Hennessy and Patterson books are. Also I’ve read the dragon book cover-to-cover for the first time (the new edition with the lame CGI dragon on the cover), various parts of TAOCP, and Sedgewick’s Graph Algorithms in C. Time will tell whether I’ve digested any of that.

When I was in the bookstore the other day, I saw Petzold’s The Annotated Turing. I still blame Petzold for the worst book in my computing library, Programming Windows 95. But I needed to fill in some gaps on formal logic and it was 30% off so I thought I’d give it a go. One nice thing is that it presents in full the paper “On Computable Numbers, with an Application to the Entscheidungsproblem,” with corrections inline. I found a number of the annotations on the machines themselves to be superfluous to the original, while the background on Cantor sets and formal logic were absolutely worthwhile. The main problem is that the book sometimes cites large sections of material from another work, which just makes me wish I had read the other work instead. Conspicuously absent from citation but appearing in the bibliography is the mind-altering but lengthy Gödel, Escher, Bach, which in my opinion better tackles the philosophical angles. I give The Annotated Turing a B: nice explanation of the paper but Chuck loses a letter grade for citing his own book twice and for having a Windows tattoo.

September 17, 2008 · bob

Buy my stuff

If you’ve always wanted to own a piece of history, now’s your chance. Since I’m just over two weeks away from having to vacate my house for good, I’m selling all my crap. Oh, it’s wonderful crap, such as my couch, beds, bookshelves, small kitchen appliances, propane tanks, lawn mowers, chainsaws[1], and various electronics. Actually, assuming I get it all in order in the next day or two, you can drop by my house on Saturday to paw through the meaningful effects of a great living legend[2].

[1] Only one lawn mower, propane tank, and chainsaw. Two broken leaf blowers though. [2] Great and legend not guaranteed. Living hoped for.

September 9, 2008 · bob

Ads

Anyone in the interweb know why my LJ now has an ad sidebar, when I’ve explicitly opted out of the ad-supported-for-useless-goodies account? May it be time to move/shutter this thing?

Update: Oh. :(

September 3, 2008 · bob

Mainlandy

Ange & I are back from our brief tour of the Carribean. PR was nice: wonderful weather and warm ocean water. We somehow lucked out and missed all three hurricanes that went through the area during our stay. The local cuisine left a lot to be desired, and the area just outside of the resorts was pretty sketch, but otherwise it’s a decent little island.

I did find time during the traveling downtime to complete my Gstreamer FS. I’m rather proud of the fruits of that two-day hack, though I’ve yet to see if it works well enough to trick iTunes.

September 3, 2008 · bob