Look up a word’s definition in Emacs

Here’s a quick lisp snippet I found in my .emacs. I put it together some time back and referenced this great site in the comments.

  (defun word-definition-lookup ()
"Look up the word under cursor in a browser."
(interactive)
(browse-url
(concat "http://www.google.co.in/search?hl=en&q=define%3A"
(thing-at-point 'word)))
)

The above code is called with an M-x word-definition-lookup

It causes Emacs to use google’s define keyword for the word at point. It ought to use the system’s default browser to do this.

Dawkins’ new book is out

I’m a huge fan of Richard Dawkins, and the moment of clarity I got when I first read The Blind Watchmaker is one I’ll always treasure. The world felt sharper, clearer and I walked around in a happy daze for a few days. I’ve read almost all his books since, and loved every one of them.

dawk_thumb

He has mentioned for quite awhile that he’s wanted to write a children’s book, and that book is finally out now. It’s called The Magic of Reality and there are some early reviews out at New Scientist. The book is also, I’m happy to note, already out on FlipKart. Of course, I ordered it immediately. Here’s something to
save for my kids.

Update: A week has passed, and i’m now holding the book in my hands! Maybe I’ll post a review when I’m done.

File management over SSH with Konqueror

I was cleaning up and backing some pics on my phone, and needed a quick way to view and delete a bunch of them. Well I’m on linux, and KDE has always had an amazing suite of applications, so it was no surprise that there was an easy way out. Konqueror supports the ‘FISH’ protocol to transparently handle files over ssh. I just had to enter
this:

fish://user@192.168.0.103:2022

And I get a perfectly normal konqueror window that shows all the files on my phone :)

This is what it looks like:

konq_thumb

Signed up for another library

I’ve been a member of Just Books for a few months now, and it is pretty good. The main advantage is that it is walking distance from my place. But they have a pretty decent catalog as well.

After being a member of the British Council on-and-off for the past few years, I signed up to it yet again on Saturday. I took a Platinum membership, which allows six books, three periodicals, and three DVD’s. That still ends up being cheaper than my JustBooks subscription. The membership also gives me online access to their ebrary, which is filled with technical books. That looks like a pretty good option for passing the time.

I now have a lovely box set of Simon Pegg’s Spaced, a couple of Mike Carey and Grant Morrison graphic novels, and a few other fiction and non-fiction books. Good times!

Some new programming books

O’Reilly has a nice 50% sale going on for their ebook catalog, so I went ahead and got a few. I didn’t want anything overly technical, since I’ve got an increasingly large pile of those in my hands these days. I searched for some books that I could read in the short bursts of free time I get in-between tasks, and decided to buy these:

Algorithms in a Nutshell
Beautiful Code
Masterminds of Programming

Maybe I’ll put up reviews once I finish them.

Getting started with Arduino

My Arduino kit finally came today, and I’ve played with it a few hours so far. For someone not very comfortable with the hardware side of things, I found it remarkably easy getting basic functionality working on it.

With the help of some very useful tutorials, I was able to create a simple tool: a photocell+LED setup that lights up the LED whenever the room goes dark, and switches itself off when the room brightens.

Here’s what it looks like:

And here is the code to make it happen.