Sunday, August 20, 2006

Vazhai, the liveliness of humanity

The days now down this earth has become so sick, with everybody pushing and pulling every other to pull/push himself up and up above the layers in order to get the feel and the illusive wealth and health through various means. But, even in this worser picture, there does exists hope, light amidst the darkness for the sick, slumber and helpless to guide and lead them to the doors of relief, a satisfaction in the basic components for the survival.

These words seem to be flowery, but truly from heart, NO. "VAZHAI", serving as light over here for few really backward places around here in Tamilnadu is doing a good job. Here is where they operate their mission from:

VAZHAI: Nurturing Generations www.vazhai.org/index.htm

A recent analysis revealed that there are lot more places where people are not provided with proper education, no proper means of basic amenities, not challenging for the survival and they fall to the thrashing of growing needs and greeds. There would obviously exists places where situations has been even worser, blunderous rather, i do agree. Its just the practicality we need to think of in analysing all these.

One small piece of thought, one small piece of favour, could make a few feel happy, feel satisfied down at their heart isn't? There are more in building a nation, its not all about the value of currency, the edge in advancing technologies, or rather in the strength of the security that we have and being proud to ourselves. But, its all like painting your house outside, and spitting inside the hall! We got to improve, its not about the population and the competition that one can argue for all these under developments, its all about taking the situations in hand and moving about to make a change.

One can say, the poverty, illiteracy and other things would be just like this. But why can't one push himself to see what makes all these? Why can't we make a change and try to correct them? If one's house is dirty, he tries to clean it (if at all he is sane) isn't? Is it not same with his country too? Its all in the hands of us, volunteering and coming forward to make a change, to help others, to make them stand as we are now.

Dreaming of a new nation, to serve for the Mother land, to serve for the Humanity! Jai Hind.

Saturday, August 5, 2006

Fork Bombing!

Try this in BASH if and only if you are really _free_.

$ :(){:|:&};:

The above command is nothing but in short known as “Fork Bomb”. Looks so cute, or rather so innocent, or mysterical, isnt? It makes your system run out of resources! If only if you’ve let your processess limit to unlimited in BASH (unfortunately!). Here is a good explanation of what it does:

Though an old technique, interesting because of its "cuteness" :) Ofcourse, this wouldnt work if you had set limits on the number of processes that could be forked.

Wednesday, August 2, 2006

HARD time with SOFT drinks

This is a recent story about the analysis done on the pesticide and other compound levels in some of the softdrinks like Pepsi, Coke etc. Ofcourse, the results are shocking indeed. Read the story here:

Today's story@The Hindu: Pesticide levels too High : CSE Report

But this is not a new issue indeed! This was raised a couple of years back too. But the amazing part is that after that issue, the amount of pesticides and the carcinogens found in the samples has increased! Why does this happen so? As usual, the manufacturing association claiming that they comply to the BIS standards, why should such an analysis be presented?

BIS standard seems to have been set a couple of years back to standardize the pesticide levels in the softdrinks. But, the problem is that the BIS standard for softdrinks was finalized only by October last year and even now, it's not announced, though the final standards was formally confirmed by the May, this year.

One reason is that the base water that they use for softdrinks is indeed pesticided, and the cleaning of it to the core is going to just increase their investment on the softdrinks. Here are few more links that would give an idea about BIS:

CSE: Press note on BIS action

Pesticide in Coke/Pepsi

BIS Homepage

As a supporter of Softdrinks myself, felt shocked, rather ashamed to see the recent reports. An action has to be taken from our side, the consumers of soft-drinks to control the mutation of the drinks. The best action is to stop consuming so that the manufacturers realize the importance of hygiene. Hope they come to some compromise between the market/money and public hygiene sometime.

Above all, it seems that the new BIS standard for the soft drinks that has been finalized is in par with the world standards. We do realize the work done by the Union of Health and Family Affairs but its also on our part to take an action, to realize that its responsible for us someday to hold the broom to clean up the parts of our place that are dirty.

Dreaming of a new INDIA!

Saturday, June 24, 2006

An attempt to create a MusicalOS

"Let there be music." - I wished and there was music.

Here we go:

  • 650 MB of code for GUI Applications.
  • 100 MB of code for supporting drivers/libraries.
  • 220 MB of code for Fonts Servers/Network drivers.
  • 300 MB of code for E-Mail clients/SBIN apps.
  • 1 GB of code with other XYZ apps.
Do one require all the above for just playing a list of songs that (s)he wishes to listen?? There's a lot that could be stripped down! This is how it goes the fantasy of making a MusicalOS from scratch.

MuscialOS :: What is it all about?
Its just a distribution, that has minimal features required to play a list of songs that is stored in a secondary storage. GUI support is not provided. The generic we extend our requirements, the bigger the kernel and the loadable module gets. Hence, to be more specific, the requirement goes like this, we just need a keyboard support and a console support in whose command prompt, commands could be invoked to play a list of songs and nothing else. No USB/Floppy/any XYZ devices please. Spare Harddiscs/CD-ROMs.

Minimum requirements
Though, building from the scratch requires a list of files to be build and other stuff to be decided at length, we just make a jot of what are the necessary modules without which our life would be under serious trouble! :)
  1. Sound support - Very Trivial, its where we depend on, isnt?
  2. Filesystems - Trivial, otherwise, no access to data!
  3. Terminals, Console drivers - Trivial, else would be a blindman's box!
  4. Device supports - Keyboard, Mouse, Monitor, CD-Rom drivers - Required.
  5. Anything else??? (Still thinking!)
First Step
As a first step, Kernel v2.6.17-1 is compiled with network support removed and a CRAMfs initrd image is made with modules. And Eureka, the box boots. We've just started :)

From "Sliding Snow Leopard" to "Crazed Snow-Weasel"

This is not some kind of a story or a movie, rather a technical news. Though old, needs to be blogged. The name "Crazed Snow-Weasel" is the codename for the new release of Linux Kernel v2.6.17. The older codename was this "Sliding Snow Leopard". Hmm, interesting!

One of the busiest free software development thread, one can ever find another example, is this kernel development. Three weeks back downloaded a recent kernel v2.6.16-9 (recent then!) and now when i come back, to my surprise, it just rose to v2.6.17-1.

Thanks to all kernel developers, for providing the patches to ascend the throne of the recent version. Finally patched up the kernel downloaded with all the patches (somewhere around 13). Not much changes between v2.6.16-9 and 2.6.17-1. Moreover, this is not a right place to discuss the changes for they are already there in the celebrated www.kernel.org.

Saturday, June 3, 2006

A Little BLOGGER Hack!

The NavBAR at the top of the blog was not the one i liked to have. So, did
a little hack into the stylesheet of the blogger page and now, its gone!
Atleast as far i've checked that its not showing its presence in
Epiphany/Mozilla. Didnt checked this out in other browsers though.

The Blogger inserts the NavBAR Code exactly after the "<body>" tag. Hence
if we can someway comment the code out, it should work, isnt. Its not very
obvious at first sight.

  • Commenting before <body> tag and after that doesnot help. Because the
    code inserted has a comment breaker "<!-- -->" which breaks unterminated
    comments if any.
  • Moreover, there is yet another way, it is to wrap up the <body>
    within the JavaScript comment using "<script>" block. But this also will
    not help much since the embedded code has good amount of "</script>" as
    well as "<script>" hence, browser would terminate the comment halfway and
    we are into some other problem.
  • Finally efficient way is to use the "CSS" property. Enclose "<body>"
    in a "<div>" with its _visibility_ being "hidden". This finally has worked
    out. Stop, but not precisely, i wouldnt want more space before by Blogger
    Header. Here comes the help from "Negative Margins", finally, things
    worked out.
  • Eureka!!! Its done. Need another hack to include HTML tags in the blog that we mail!


    Sunday, May 28, 2006

    Shifted to Blogger

    Due to space constraints on my domain, i've shifted the Logs to this Blogger.

    This is a test blog through mail.

    Friday, May 19, 2006

    Out into the Space, Are we???

    A good news poping out in the nuclear/sub-nuclear science. Scientists working on the RHIC (Relativistic Heavy Ion Colloider) project at Brookhaven Labs at NY found few remarkable results while finding the "Lost Moments" _immediately_ after the "BIG BANG". Here is a short description about the experiment performed by them.

    The Gold ions are accelarated at the rate of 0.9999 times the speed of light in two separate pathways and finally allowing them to go for a head-on collision. The particles splitted and splattered are observed and the changes are noted with micro-second precision.

    The remarkable finding is that, at the horizon of collision, the particle gets ripped off all its constituents to form more fundamental particles. All Quarks are stripped and they collide and the group of nucleons thus collected at the horizon behave as though they are fluids with a property to change shape with a constrained motion.

    The expected intuitive result is that the shattering might have caused those particles to have dynamics similar to that of gas atoms that blow up. But this new state of matter is really intriguing. This has opened new doors to further research and a new vision into the secrecy of "FIRST FEW MICROSECONDS" after the "BIG BANG".

    Get the full news here: RHIC Center

    Feeling good that we are proceeding to find the secret behind the evolution but only thing is that the assumptions that we had used to build this huge empire of thoughts/experiments should hold to be true at the end.

    Keys Mutated

    A mere continuation of the previous post. This had to wait for many days since i was a bit occupied with the work at hand. Here goes the layout of the part of keyboard that is not working.
    |Esc|
    |~||!|
    |Tab ||Q|
    |Caps||A|
    |Shift||Z|
    |Ctrl||Start||Alt|

    And interstingly, here is the outcome of certain experiments done on this part. Under normal circumstances, "Caps" works fine. Here goes the crazy output of experiments.

    First Attempt: (Assuming Caps is off initially)
    Caps + Tab + Q = W
    Caps + Tab + A = S
    Caps + Tab + Z = X

    Second Attempt:
    Caps + Tab + Q = w
    Caps + Tab + A = S
    Caps + Tab + Z = x

    The above shows some kind of shift in the circuit. Another experiment with surprising results, generally when the keypad works normal, and we press two keys at a time, one which has got the connect first (ofcourse we couldnot press two keys in sync.) would be printed or one/two characters would be printed and it stops there. But the three keys, 'Q', 'A' and 'S' behave differently.

    Assuming Caps lock is off initially,

    Caps + Tab + Q + A + Z = WsXwsxWsXwsxWsXwsxWsXwsx

    Oh! What has happened? 'A' has got some real trouble and there is a short as expected before in the keyboard circuitry and so that it connects 'S' with 'A'.

    No idea, will be debugging this issue i guess this end of week.

    Thursday, May 11, 2006

    ESC TAB ALT CTRL a z q ~ ` 1 ! Mouse

    That was a tragic situation to be in. My box at home had a slight problem. It used to be there some months back and now the problem is back. Now with a new flavour :(

    The initial problem was the disfunctional mouse, which shuts off at random intervals. Sad that the interval might be so long and is not predictable. Casual look at the problem seemed to be something to do with the OS since i'vent configured much things from the OS end. Later came to know it was not the problem with the OS but with the hardware itself. The more appropriate reasoning would be the dust accumulated in the ports. After clearing that it worked well, and was happy for a few days.

    Now, the problem has repeated, but this time, with an additive, my keyboard is most of the times left-dead, meaning left portion of the keyboard, where most of my key-shortcuts would be configured is dead. There is no response when we press those keys. Thanks to GNU/Linux that does understands it needs to copy when you select text. Otherwise it would have become a nightmare copy/pasting the text. It was really restrictive to use my dear comp now :(. Have to fix it up. But the only puzzle now is i've cleaned up the dust in both keyboard/motherboard/mouse. Still the problem persists. This confirms the short at some point either in the keyboard circuit or the serial port connection.

    How does it work at random times? Does it appears random? Have to carry out a few investigation, but now, presently, keeping mum, let the work get over :)

    Monday, May 8, 2006

    BASHing to Bake a Pointer

    The BASH has become so powerful that 'pointers' can be implemented in that. Here is a small how-to on how to simulate pointers and surprisingly, you can have any level deep of pointer reference. But, dont expect too much in this, for this has to be taken as an analogy to pointer concepts and not to be taken as exact replica of the one thats done in C/C++.

    HERE IS HOW TO CREATE A POINTER:

    # Dont get annoyed, you can only get cheese with the milk not a pizza!

    $ some_var=1729
    $ some_pointer="some_var"

    SOME EXPERIMENTS:
    Now that the pointer variable, "some_pointer" has been created, here is how to de-reference it to get the value. This was quite interesting coz, as we imagine, the things like '$$var' and '${$var}' doesnot workout that well.

    First job is to make variable get work properly. We give a variable by name, say, "some_var" and we ought to see the value "1729", so here is a try.

    # This is the one we know already.

    $ echo $some_var

    ...

    # All other methods, are in vain :(

    $ echo $$some_var # Really bad
    $ echo '$'$some_var # Seems convincing..
    $ echo ${$some_var} # Pathetic
    ...

    # And finally, here comes a method, to
    # refer to the value of a given variable name.
    # Lets put that as a function

    $ function _() { eval echo $`echo $1`; }

    # Here comes...

    $ _ some_pointer
    some_var
    $ _ some_var
    1729
    $

    # Bingo.. things seems to work :)

    DE-REFERENCING THE VARIABLE:
    Now we have the variable de-reference function. Here we go.


    $ function _() { var=$(eval echo $`echo $1`); eval echo $`echo $var`; }
    $ _ some_pointer
    1729
    $ echo "BINGO! THAT WORKED!!!"
    bash !": event not found

    # A lil too much crazy :)

    HANDLING ARRAYS IN BASH:
    Now comes the best part with the 'Arrays'.

    # Here is how to create an array.. requires no energy actually.

    $ myarr[1]="hello"
    $ myarr[2]="world"
    $ myarr[3]='missing (L|W|KN)IFE'
    $ myarr[fun]="really"

    # Now to access an element, we should be doing this.

    $ echo ${myarr[1]} # Or even as
    $ echo ${myarr[fun]}

    # Here is how to count the total number of elements

    $ echo ${#myarr}
    $ echo ${#myarr[fun]} # This gives the length.

    # Here is how to access all elements in one go..

    $ echo ${myarr[*]}
    $ echo ${myarr[@]}

    # But what is the difference? You might ask, so, try this:

    $ for each elem in "${myarr[*]}"
    > do
    > echo "*" $elem "*"
    > done
    $ for each elem in "${myarr[@]}"
    > do
    > echo "*" $elem "*"
    > done

    # The difference should be visible :)

    POINTER TO AN ARRAY:
    Here we turn around to fix up our actual task of implementing pointer, we should be complete isn't? So, we also do the work of simulating pointer to an array (sounds lot of fun..).

    Here is how we access n'th element of an array, or in short given a subscript and an array name, we access its value.

    # For now, we limit ourself by denoting the array and subscript by variables.

    $ a_var="myarr"
    $ a_sub="fun"
    $ eval echo '${'$a_var"[$a_sub]"'}'
    really
    $

    # We are ready with the mode of attack and here goes our function.

    $ function _() {
    > a_var=$(eval echo $`echo $1`)
    > a_sub=$(eval echo $`echo $2`)
    > eval echo '${'$a_var"[$a_sub]"'}'
    > }
    $ _ a_var a_sub
    really
    $

    # Its done :)

    LIMITATIONS...
    This is not the limitations of the BASH pointer simulation rather, limitation on the content side in Blog. Planning to write a complete pointer simulation script for BASH and hope to put that soon in my Wiki.

    Saturday, April 29, 2006

    Drenched in Dream Land

    That was a part of fun :) yesterday. After installing and using GNU Hurd, looked around my room. Was pretty untidy and it needed a sweep. As usual, jumped into cleaning work and finally called up Mudanna to find if he is free that evening. Fixed up a schedule to freak out at beach.

    Thank GOD. It was all cloudy up high above our heads, it was only 3:30pm. Difficult to believe though! We started from here by 4:30pm and was there for 2 hours. Fun after a long time at my favourite spot, the Beach. We dived into the water, no hesitation, no fear, we got all drenched. Remembering those bulls at village ponds, we were literally like that, to reduce heat. One hurdle in that was the saltiness of the sea water. Since its summer, the salt levels would've risen and hence the water was more "sticky" and "itchy", but not much and the reduction of heat overwhelmed all those.

    Played a game with a small wooden stick which came from somewhere. Finally, its time to leave, and we were back to home. Only then i found, its better if we were fishes :) Had a heavy dinner, body still swaying as in the wave. Had a good sleep, to start the next day of this weekend. Here it goes. Scheduled this day to office.

    Happy Thing, Sad Thing and In the End

    There are few moments that we are happy, and there are few moment that we are sad. At all other moments we are just normal. A casual look at these actions on the long run reveals the following philosophic quote:

    Happy Thing about the Sad Thing is that it would END but its the Sad Thing with the Happy Thing too.

    So simple looks the quote but so deeper needs the explanations that would say, nothing stays so long over the time. Its a very simple example that most of us would be indifferent to the essence of what it says. Its always difficult to take it to the heart about the philosophy.

    Scanning the above quote, some people would feel the second part of the quote to be unacceptable at times pessimistic. But there is no difference, except that they are positively biased or they tend to see the greener part of life.

    Can we materialize the above quote into a statement? My vain attempts over it. Didnt involve much of my time into it. Anyways, here it goes.


    Lim(Time->inf) H(S) = Lim(Time->inf) S(H)

    Where H->Happy Thing and S->Sad Thing.

    And, moreover since the happy thing and sad thing could be applied only to living beings that could sense 'feelings', through the act of perspectives and lot other stuff, whatever we define is restricted to the life of the living system under consideration.

    An explanation could be obtained if we look into the above limit expression. Consider the life of a person, he would've undergone Happy times and Sad times on his life path. As his life goes on, at the end, which obviously means the end of his life, (if it is natural), he is pushed into such a state that neither happy thing, nor the sad thing could trigger him, meaning, they are indifferent to him, because of lesser pronounced sensory stimuli and the perspective vision that is dusted due to the ageing.

    Hence, In the end, the "Happy Thing" and the "Sad Thing" are one and the same. Remembering back the words of Bagvad Gita, (or any other religious scripts that talk about the nature of God), it seems the above things are dual of each other and co-exists and finally at end of life, merge into one, the nothingness.

    Debian Hurd - GNU Mach up and running

    EUREKA!! Finally, my infactuation on running a micro kernel on my system worked out well. I've installed the Debian Hurd - the true GNU system with GNU Mach kernel and its up and running at home. So, no Hurd now at office, planning to use the 10G available there for someother experiment. Moreover, no progressive dreams, im still on my Debian box while writing this post.

    Here is a small HowTo on Debian Hurd installation:

    1. Hold your patience.
    2. Make a partition on your disk free.
    3. If you have the grub installed in the box, it'll be helpful.
    4. Time to read the fine manual (RTFM) here: Debian Hurd - Installation
    5. Learn about Hurd here: GNU Hurd

    Above all, the GNU Hurd comes with 'Nano' and no browser support. FTP SEGFAULTS at times. But its a good experience working with it. Found 'gcc' to be missing with the base installation. This made me a bit annoyed, but, no matter as far as the internet is there. Will have to grab a package and install. Planning to port few packages to GNU Hurd. The next target would be to 'ping' 'Google' and get a positive response from my GNU Hurd box.

    Wednesday, April 26, 2006

    Still Deeper into GCC

    Bingo... The problem is partially solved. The '.note.GNU-stack' section is added into the assembly by the dear GCC. Here is an article explaining why it is that way and the way to prevent them out.

    Executable memory: some apps that work on RH9 don't on FC1

    Still deeper to dive into GCC. Only thing left is to do up with its modular design and will have to see how it supports the frontends. Interesting problems at hand though!

    Satisfied, though near deadlines.

    Here comes, end of yet another day. The network stuff at the boot loader is driving me crazy. Waiting for a solution to dawn and the deadlines are pretty closer. Planning to sleep early (Its still late, now 12:20pm). Between, its horribly hot outside even now. Atleast the AC inside the cabin makes the place comfortable :-)

    There are few things that happened today:

    • Fixed up my system with 'FC3' (The newest one they had, spare them for not grabbing 'FC5'). Also, came to know 'FC5' is not shipped with few utility programs like tftp and things like that but didnt refer to the release notes.
    • The sweet 'GNOME' is running and the BULKY Firefox 1.5.02 with all its graceful looks and themes helping me to blog. As usual, 'EMACS' is the world.
    • I have a 10G in the disk running WinXP. Planning to scratch it but feeling a bit insecure since its the only primary partition. My FC3 is in the extended partition. In case if i rub the first my second shouldnt become homeless. Anyways, will sort it out in few days. Plans are there to tryout 'Debian HURD' or few other home-(to be)-made distros.

    Its getting late... and let it be a sweet good night :-)

    Tuesday, April 25, 2006

    Deeper insight into gcc

    The Problem
    This is just a continuation of analysis of the "x86 Hello World" written and tested on my pc which is an AMD Athelon one. It worked well and its an i686 arch. Came back to my office and to my annoyment found it didnt work that well, ofcourse it SEGFAULTED. For an introduction, here is the link to the analysis of that code in my wiki:

    LINK > x86 Hello World

    And the version of GCC is 3.4.2 20041017.

    The Discussion:
    Me and a few others at the office were discussing (late night! OOPS) regarding this and told them that the linker tends to align the code in the 16-byte segment and this might be the problem. To my surprise i found its not actually true.

    The Clarity
    The alignment of the code and the block is decided by the compiler/linker depending on the architecture it has. Moreover my analysis on the "16-byte alignment" stuff didnt work that well in my PC at office though they both are the same with respect to architecture. So, it has become clear that dear GCC is playing some trick.

    The Observation
    Now comes the result, i didnt notice the version of GCC i have at home. But its going to be of no use. So, generated the assembly code out of the C-code and to my surprise found the code below in the assembly dump:


    .section .note.GNU-stack,"",@progbits

    It was a bit disturbing, coz i didnt get the above line at my home. So, i removed it and tried compiling the assembly code and BINGO, it worked. The code is processed and the "Hello World!" was at my sight. Replacing the above line back made the code to SEGFAULT.

    The Result
    Im still not sure as to why the above line has to make my code SEGFAULT. What i suspect is that the addition of that above innocent line makes some of the code to offset to a different location and that few things gets offsetted. Im yet to confirm the actual reason and would update the Wiki with this observation.

    Yet, its still interesting to find how the compiler/linker could've been constructed by making all these stuff and experimenting, and so i believe there certainly exists "Pleasure in Finding Things out...".

    My First Blog

    This is my first introduction to blogging. It feels happy to write in words what we had come across or felt. There are few of my friends who has indirectly inspired me in this act of blogging.

    Me still in office and planning to make a night out (ofcourse, the night-out for a bachelor not in TEENS would generally mean till 1 or 2 for (s)he wouldnt be up and running till the day dawns, not a generic statement though, applies in most of the case).

    Silence has got lots in itself to be enjoyed, particularly when you are working :-) or thinking alone...