Due to space constraints on my domain, i've shifted the Logs to this Blogger.
This is a test blog through mail.
Refracting reflections on the way...
Due to space constraints on my domain, i've shifted the Logs to this Blogger.
This is a test blog through mail.
By:
XaoS
at
3:12 PM
1 comments
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.
By:
XaoS
at
11:42 AM
0
comments
|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.
By:
XaoS
at
11:15 AM
0
comments
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
By:
XaoS
at
5:30 PM
0
comments
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.
By:
XaoS
at
12:23 AM
2
comments
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.
By:
XaoS
at
11:10 PM
0
comments
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.
By:
XaoS
at
5:21 PM
0
comments
Here is a small HowTo on Debian Hurd installation:
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.
By:
XaoS
at
4:58 PM
0
comments
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!
By:
XaoS
at
3:06 PM
0
comments
There are few things that happened today:
Its getting late... and let it be a sweet good night :-)
By:
XaoS
at
2:32 PM
0
comments
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...".
By:
XaoS
at
3:18 PM
0
comments
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...
By:
XaoS
at
1:32 PM
0
comments