Confused about declarations in C involving pointers ?

We know that in “C”, variable declaration involving functions and pointers at times gets quite confusing.
If you disagree please have a go at

declare x as const pointer to array 10 of pointer to function (int) returning const pointer to char


char *(*(**foo[][8])())[]; // decipher quickly please : )

It is certainly quite obtuse unless you are well versed with “right-left” rule.
Linux has this nice program cdecl which helps in figuring out where to put parentheses and where to put “const” and “volatile” modifiers in declarations. There is an online version of cdecl and like Detexfy I find it very useful and simple and hence sharing it here. If you are still itching your head with above examples, go an try your self on

Posted in Programming | Tagged , , , | Leave a comment

Draw your Latex symbols

Do you often find yourself googling for latex commands for symbols and then wondering what package is needed to be loaded in order to use that symbol? I have stumbled upon this beautiful online app Detexify and its so cool that I could not resist sharing it. It lets you freely draw with the mouse the symbol you are looking for and then it lists the closest matches. Below is the result for my attempt on Psi and the result is quite good.

Posted in latex, Maths Writing, Research | Tagged , , , | 1 Comment

Drifting–Kit McCallum

Its another beautiful poem by Mccallum, I am sure every one at certain stage in life feels the same.

I sometimes find I’m drifting
Through this life without effect;
I often wonder if I’m truly
Worth what I’ve been blessed.

I search through days that have been hard,
To try to understand,
The many trials that I have known,
The life that I have had.

You see me in my daily grind,
So confident and strong;
Yet when I am alone, I question
Just where I belong.

I often try too hard I find,
To analyze and guess,
To scrutinize, investigate
My life I will confess.

For somewhere deeper, there must be
Some meaning to this life,
Some way to make a difference,
Give a reason for this strife.

Is there some hidden meaning?
Some agenda to be found?
A greater purpose waiting
If I care to hang around?

It teases and it taunts me,
Always slightly out of sight;
A hazy vision out of reach,
Where darkness hides the light.

I struggle to bring clarity
To what awaits me there,
And yet this weak illusion
Always fades before my stare.

It seems the harder that I try,
To focus through the haze,
Just serves to add more questions,
Through my endless, tired gaze.

Perhaps I’m trying just too hard,
To understand it all,
For can we ever truly know
Just what we have in store?

Each incident, each moment passed,
Just adds upon the next,
But in the end, will I find truth …
Or will I be perplexed?

Perhaps I make it harder
Than it has to be sometimes,
But will my searching bring to me
My meaning over time?

Or will it leave me broken,
And confused as I feel now,
While questions bring no solitude,
To this, my wrinkled brow

Posted in life, poetry | Tagged , | Leave a comment

The Road Not Taken–Robert Frost (1874–1963)

This is a beautiful poem and has an open message. We can take an inspirational message or a message with a bit of regret.

A bit of  explanation on wiki


Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

Then took the other, as just as fair,
And having perhaps the better claim
Because it was grassy and wanted wear,
Though as for that the passing there
Had worn them really about the same,

And both that morning equally lay
In leaves no step had trodden black.
Oh, I marked the first for another day!
Yet knowing how way leads on to way
I doubted if I should ever come back.

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference.

Posted in life, poetry | Tagged , | 3 Comments

The Road Less Traveled — Kit McCallum

I was searching for “The Road Not Taken by Robert Frost ” and I came across this one and I really liked this too. I made bold, the bits I liked most..enjoy.



How often we must bear the challenges of life;
The endless roller coaster between happiness and sorrow;
The constant ups and downs of daily strife.
And always the question remains …. why?

Life is not an easy road for most;
It twists and turns with many forks in the road,
Although always, and inevitably, we are given a choice …

Do we turn to the right … or the left?
Do we take the high road … or the low road?
Do we take the easy path … or the difficult one?

Decisions are not easy for those struggling for direction …
And sometimes the many choices and signs become overwhelming.

While standing at a crossroads in life,
The urge is to take the most comfortable path;
The road with least resistance …
The shortest or most traveled route.

And yet, if we’ve been down that comfortable road before;
Have gleaned its lessons in life, and learned from our experiences;

Do we yet again follow the known?
Or does our destiny lie in another direction?

The fear of the road less traveled is tangible and all too real;
It manifests itself in many ways,
And tends to cloud the issues that might otherwise be clear.

It is in these times of confusion,
That we must seek peace and solitude;

Time to contemplate on our life,
Our experiences and our choices past;
Time to look back, and reflect on what we have learned
Without fear or confusion.

For only each of us knows our own personal thoughts;
Our unique past and personal history;
The experiences that brought us to the crossroads we now face.

We can always learn a small degree from others experiences,
And yet … no one person can walk in our shoes,
Others know not, the trials and tribulations faced in private …

For each is individual … unique … and personal.

And that is why … while standing at a crossroads,
Only “we” can formulate the decision for ourselves;
The true direction that lies within;
The choices we must deliberate on with clarity and wisdom.

For it is only through personal reflection,
That we can now choose our destiny;
… Our next adventure;
… And the future we will embrace.

Posted in life, poetry | Tagged , | Leave a comment

Pakistani obsolete currency notes–part 3

Some more obsolete currency pictures contributed by a friend Sajid Siraj:

1 Ruppe Note from 1948-1949

1 Ruppe Note from 1948-1949

1 Ruppe Note 1975

1 Ruppe Note 1975

5 Ruppes Note in 1947

5 Ruppes Note in 1947

5 Ruppes in 1948

5 Ruppes in 1948

5 Rupees 1972 - 1978

5 Rupees 1972 - 1978

5 Rupees 1997

5 Rupees 1997

10 Rupees 1953

10 Rupees 1953

10 Rupees 1957

10 Rupees 1957

10 Rupees 1972 - 1975

10 Rupees 1972 - 1975

10 Rupees 1972

10 Rupees 1972

50 Rupees 1957

50 Rupees 1957

50 Rupees 1972 - 1978

50 Rupees 1972 - 1978

Some Coins Head

Some Coins Head

Coins tails

Coins tails

Posted in Currency Notes, inflation, Pakistan | Tagged , , | 39 Comments

LHC Explained–two different ways

Manchester University Professor Brian Cox gives a nice overview of Particle Physics dealt in LHC project.

While accuracy in both science and reporting is serious business, the science itself should be fun,says Kate McAlpine’s and this is how she describes CERN Project

Posted in Uncategorized | Tagged , , , | 1 Comment

Pakistan Contribution in CERN

On Tuesday 21 July 1998, Director General Chris Llewellyn Smith unveiled the sign naming the Route Abdus Salam on the Meyrin site.Formerly the southern portion of the Route Pauli, the road passes near the site of the Gargamelle bubble chamber which discovered neutral currents at the PS in 1973. This, CERN’s first major physics discovery, provided the first experimental confirmation of the electroweak unification of which Salam (Pakistan only Nobel Laureate) was a major architect.[1]

The informal scientific co-operation between CERN and Pakistan dates back to the 1960s, through Dr. Abdus Salam. Some theoretical physicists from Pakistan had the opportunity to work at CERN and in 1980s, some of the experimental physicists from Pakistan, specializing in the technique of Solid State Nuclear Track Detectors (SSNTD), also benefited from CERN by exposing the stacks in the beam at the Super Proton Synchrotron (SPS).
In 1997, PAEC signed an agreement for an in-kind contribution worth one million Swiss francs for the construction of eight magnet supports for the CMS detector. The signing of the agreement was followed by the visit of Llewellyn Smith to Pakistan in 1998. The agreement provided an entry point for Pakistani scientists and engineers into the CMS collaboration.[2]. These equipments engineered in Pakistan are also mentioned in this interview.

In 2000, CERN’s new director-general, Luciano Maiani, visited Pakistan, and during this visit another agreement was signed, which doubled the Pakistani contribution from one to two million Swiss francs. This new agreement covered the construction of the resistive plate chambers required for the CMS muon system
Recently, a protocol has been signed enhancing Pakistan’s total contribution to the LHC programme to $10 million.
National Centre of Physics (NCP) of Pakistan is involved in a number of LHC-related activities such as detector construction, detector simulation, physics analysis and Grid computing. Several other Pakistani institutes are also collaborating with CERN indirectly through the NCP. The activities of these institutes cover areas such as software development, manufacturing of mechanical equipment, alignment of the CMS tracker using lasers, and the testing of electronic equipment. [2]

Above Excerpts taken from article by Dr Ishfaq Ahmed


Posted in Grid Computing, Pakistan, Research | Tagged , , , , , | 7 Comments

LHC Successful switch on

Scientists have hailed a successful switch-on for an enormous experiment which will recreate the conditions a few moments after the Big Bang.

They have now fired two beams of particles called protons around the 27km-long tunnel which houses the Large Hadron Collider (LHC).

The £5bn machine on the Swiss-French border is designed to smash protons together with cataclysmic force.

Scientists hope it will shed light on fundamental questions in physics.

The first – clockwise – beam completed its first circuit of the underground tunnel at just before 0930 BST. The second – anti-clockwise – beam successfully circled the ring after 1400 BST.

BBC NEWS | Science/Nature | ‘Big Bang’ experiment starts well.

Posted in Cluster Computing, Grid Computing | Tagged , , | Leave a comment

LHC and Google Homepage

Hmmm guys at google are really fast and they never miss an event of international importance, here is how google page looks today.

Posted in Uncategorized | Tagged , , , | Leave a comment