Tuesday, September 23, 2008

Rambo mode of Linux kernel

Ok this is interesting......

Kernel enters *Rambo* mode in out_of_memory() :mm/oom_kill.c
and what does it stand for..well, kernel starts to "shoot down" processes hoping to increase amount of free memory in the system.

Friday, September 19, 2008

What does 'I' stand for?

No, I am not going to answer that question in this post.

The book I am a strange loop is a search for the answer. I just read 50 pages of it and came up with this thought...

In that book 'being alive' is described as having a set of complex reflexes. Then one of those relexes (one of the strongest) should be a reflex that generates the answer 'I am alive' whenever I ask myself 'Am I alive?'.

"I think, therefore I am"

Church numerals (numbers and arithmetic using lambda calculus)

Here's how one would define zero and increment function using lambda calculus
 
(define zero (lambda (f) (lambda (x) x)))

(define (add-1 n)
  (lambda (f) (lambda (x) (f ((n f) x)))))
- From SICP
 
Here zero is a function that takes a function (f) and returns a function which takes an argument (x) and applies f to x, zero times (or do not apply f to x).
 
The definition of add-1 can be easily understood by looking at the body of inner lambda expression. The body applies f to x (n+1) times, where n is the parameter.
 
So one would be
 
(define one (lambda (f) (lambda (x) (f x)))) ; We apply f one time to x
I'll leave the definition of one as an exercise.:-)
 

Tuesday, September 16, 2008

Bug fixing

Two ways to fix a bug

1. Change the implementation to match the spec.
2. Change the spec to match the implementation.

Monday, September 15, 2008

Some thoughts on mass

F = (Gm1m2)/r2, is the force of attraction between two bodies with masses m1 and m2 and r being the distance between them.

  1. So when two bodies are brought sufficiently close together (such that r becomes very small), the force of attraction will be very large. This force will pull them closer. So masses does have a tendency to combine.
  2. Two masses always attract each other. The universe is full of masses, but ever expanding why??
Law of gravitation

First drive after driving test

I drove all the way from mannuthi to palakkad (1 1/2 hour drive). The drive was OK, but I've got to get lot more practice.

Created a blogger template!!!

I created a blogger template with 2-column layout. You can watch a demo here.