Thursday, March 19, 2009

Got to love this if u've heard the real song

"
Another Glitch in the Call

(Sung to the tune of a Pink Floyd song)
-
We don't need no indirection
We don't need no flow control
No data typing or declarations
Did you leave the lists alone?
-
Hey! Hacker! Leave those lists alone!
-
Chorus:
All in all, it was, just a pure-LISP function call.
All in all, it was, just a pure-LISP function call.
"

If you don't know, the real song is,
Another brick in the wall..

Friday, February 27, 2009

Habit

The most basic fact of life. Every action is influenced by habit.

Friday, January 23, 2009

23

It's Jan 23, 2009. It's been 23 years of travel through this strange loop.

Thursday, January 22, 2009

Does god exist?

Yes, God exists in minds of people. Then you may ask does it exist in reality? Take a look at this quote from "The Matrix".

"If real is what you can feel, smell, taste and see, then 'real' is simply electrical signals interpreted by your brain."

Well, real seems so un-real now. doesn't it? :-)

The most "real" place anything can exist is someone's mind. Since God exists in many (many!!!) minds. It should be more real than you or me.

"
Neo: I thought it wasn't real
Morpheus: Your mind makes it real
" - From 'The Matrix'

Friday, January 16, 2009

"I don't know"

still remains one of the hardest things for me to say.

Thursday, January 8, 2009

Emacs - customizing code indentation

In code editors with automatic indenting, we can normally customize the indentation by setting up variables. Say, "indent-space" which is an integer which determines how many spaces should be inserted from current indentation level for a nested block. It usually takes a long time to find out the name of the appropriate variable (which involves searching through a list of 1000 variables). Emacs takes a different, highly interactive approach.

The code indentation engine in Emacs works with "syntactic symbols". When you type code in emacs type "C-c C-s". The minibuffer will show the syntactic symbol near point. Now type "C-c C-o" this will ask for a syntactic symbol that you want to customize (By default it shows the one near point). Here you can select the number of spaces Emacs should use to indent this particular syntactic symbol.

For ex:-

main()
{ /* type C-c C-s here, minibuffer will show defun-open, typing C-c C-o now
will allow you to set the number of spaces Emacs should insert for a brace
starting a function definition */


PS:- A point means the position at which the cursor is in.


Wednesday, January 7, 2009

Using Emacs CVS commands

This tutorial is for us (really lazy Emacs users) who hate to get out of Emacs for those boring CVS tasks (checkout, commit...).

From shell (or if you've started Emacs and don't want to get out of Emacs try 'M-x shell')

1) Set the environment variable CVSROOT
2) Login to CVS
3) Start Emacs if you haven't already (and don't bother getting out)

Whenever I say something like go to the file and type x to do some CVS action. It means go to the line for that particular file in *cvs* buffer.

The first thing we've got to do is to checkout a repository so that we can work on it. The Emacs command for that is 'M-x cvs-checkout'. Emacs will prompt you for the name of the module (In some future version, there'll be some command 'M-x cvs-checkout-mindread' that will read your mind and figure out the module). After checking out, a *cvs* buffer will pop up showing the list of files downloaded.

If you want to edit a file, go to that file and type 'o'. After hours of typing away if you want to know the status of files, go to *cvs* and do 'M-x cvs-status'. This will show you which files were modified after checkout. If you want to find out what modifications you have made to a particular file, go to that file and type '='.

And finally when it's time to commit
'M-x cvs-do-commit'
Emacs will prompt you for a commit message. After typing it in do 'C-c C-c' to commit.

Not very relevant but you may find this useful

'C-u n C-x ^' to increase the size of a window by n lines. This is very useful for increasing the size of the window you are editing in (as you may want to keep *cvs* window small).