In simpler terms, Mnemonic codes are part of Assembly Language, which comprise of operations like ADD(to add), SUB(to subtract), etc, which a computing machine can understand. Even to perform simplest of calculations in series, people were still feeding in scores of mnemonic codes, which they could neither comprehend nor understand properly. The Mnemonic codes formed a part of low level language and were completely different from the natural languages which humans speak or understand.
Namaste and welcome to the eighth post of this blog. This post, like all the previous ones is indeed very special, but more so, because I personally found it the toughest to compose till now. I really hope you guys like it much more than all of the previous posts.
Panini was the man who designed the entire grammar for Sanskrit. The semantics, which comprise of some 4000 rules in total, are so scientific and logical in nature, that it could very well be the baseline of structures used by various computer scientists. Panini composed a book by the name of Ashtadhyayi which comprise of exhaustive set of rules for Sanskrit Grammar. The grammar is based purely on mathematical and algebraic algorithms, and is powerful enough to be used to model a generator, which could churn out the rules for languages like Chinese or Thai.
Alright enough of the theory, time for some practicals. Lets take up certain concepts of modern day computer programming and see how well they match up with the rules of Panini's Sanskrit.
Database and Metadata: In layman terms, Database is a collection of data. Raw data is meaningless. Metadata, in programming terms, means data about data. In other words, raw data, which is meaningless as such, assumes meaningful patterns and collection when metadata is applied to it. Panini's Sanskrit, in the form of 4000 rules, form four compact databases. Aksharasam Amanaya, Sutrapatha, Datupatha and Ganpatha are the databases of Sanskrit, and the metadata are the rules contained within these databases.
Recursion: Those who are not aware, recursion is a process of repeating items in a self-similar way. In computer programming, whenever a method call is made from within the method itself, it is called recursion
The picture below would explain recursion better
It is interesting to note that Panini has extensively used recursion in Sanskrit grammar. Each of the 4000 rules are called Sutras, and each complete word to define those rules was called Pada. Panini did not use all the Padas in a Sutra to fully explain the Sutra. He, at times refers to previous Sutras where the Pada has already been defined or used (method invocation). There are instances when Panini has called a Sutra from within itself to refer to the Pada.
मार्जारः श्रावितृ मूषकम् अपश्यत् (The cat, who hears, saw the rat)
Here there is a recursion of मार्ज(The Cat). May sound easy now, but think of it as a semantic being composed 2600 years ago
Arrays and null values: Panini has defined a term called Lop, which would be equivalent to Null. A null can be assigned to a variable, or a pada in Sanskrit, and then used for simple Array operations in Sanskrit like Join(Sandhi in Sanskrit). A number of array joins can result in a complex term, which again can be broken down(disjoint). The below example shows A simple Sanskrit word as three distinct String arrays with Null
नमःस्तुते = न मः लोपः स् तु लोपः ते
S1[0] S1[1] Null S2[0] S2[1] Null S3[0]
Polymorphism: Literally, polymorphism simply means one word having more than one meanings. My software industry friends would understand better, but the below image can be of help for the others.
लम्बोदर: could mean A person with big Stomach, and could also mean Lord Ganesha. The user of the word has the freedom to define the meaning of the word in his context(run time polymorphism)
Distributive Law(Inheritance and Sets): Panini used Brevity extensively in his Sanskrit Grammar rules. Consider this:
सुरेश: विपणिं गच्छति : Suresh went to the market(Suresh(s)Market(b))
सुरेश: त्रिचक्रिका क्रयक्रीत Suresh bought a cycle(Suresh(s)Cycle(b))
Suresh went to the market, brought a cycle(s(a+b))
Conditional Prgramming(If-Then-Else): Panini had made strict rules when two words were being joint or disjoint. At times, it would happen, that these rules may conflict. He again had a set of conditional statements, as per which every time there was a conflict, some rules can "block" other rules based on certain conditions
If X then Y(माथरा कौनदिन्य: न्याय: )
If X then Y else Z(तक्र कौनदिन्य: न्याय: )
If(not X) then Y(निसेधा)
If X then(Y and Z) (विभास: )
And the similarities, rather derivations dont end there. Sanskrit grammar has full support of multiple inheritance, function overloading, data abstraction, transformations...the list is endless. If certain scientists at NASA, and in India are to be believed, Sanskrit could very well be the language for all future communications, including interstellar communication. With hopes that one day this may be true, I would like to bring my post to an end. At some later time, I would wish to pick up the remaining of the software programming paradigms and their Sanskrit origins. But, as of now, I would love to know what you felt about this post.
Coming up with a book based on Indian history/mythology.
Please join the Facebook page and invite others as well to do the same.
Please help me promote the book and the page and make it a huge success.
Please click here and like the page which comes up - Finders, Keepers
If you are on Facebook and are interested in such topics, please click on the link below and like the page which comes up.
Rediscovering India
Goodbye and Namaste!!
References:
1.) R. Briggs, 1985, “Knowledge representation in Sanskrit and artificial intelligence", AI Magazine, vol.6,pp. 22-38.
2.) The methods used inside the ashtadyayi is similar to today's arrays, inheritance (including multiple inheritance), polymorphism, etc. used in OOPS - Reference: Recent Research in Science and Technology, 2011, 3(7): 109-111, ISSN: 2076-5061, www.scholarjournals.org
3.) Ashtadyayi Reference: http://avagraha.wordpress.com/
4.) Panini's Ashtadhyayi A Computer Scientist's viewpoint by Amba Kulkarni, 3096420, http://www.academia.edu/
5.) Maharshi Panini : The Father of Computer Programming !!! http://asciencecalledhinduism.blogspot.in/2013/03/blog-post.html
Marvelous!
ReplyDeleteNamaste Prabal!!
DeleteThanks a lot for the reply
Interesting indeed. Eagerly waiting for another post on similar lines (As suggested towards the end of post)
ReplyDeleteThanks a lot Rohit!!!
DeleteI will try to bring up the further programming concepts in subsequent posts
Read entire article breathlessly. In the times prior to C or OOPS, there used to be lot of excitement about this. Many of us were proud of declarations by many scientists and engineers alike about sanskrit being most suitable language for interacting with the otherwise dumb machine called computer. However, the voice and excitement thereof not only dampened gradually, it died all of a sudden. Thanks for reminding and thanks for trying to bring back the focus on the subject. Great work ! But I suggest you to continue the work and if possible try to give it shape of a Book.
ReplyDeleteNamaste Sandeep!!!
DeleteThanks a lot for liking it this much!!!
I really hope people take a cue out of it, and start taking these concepts seriously enough.
THanks a lot sir, for your appreciations!!
Read entire article breathlessly. In the times prior to C or OOPS, there used to be lot of excitement about this. Many of us were proud of declarations by many scientists and engineers alike about sanskrit being most suitable language for interacting with the otherwise dumb machine called computer. However, the voice and excitement thereof not only dampened gradually, it died all of a sudden. Thanks for reminding and thanks for trying to bring back the focus on the subject. Great work ! But I suggest you to continue the work and if possible try to give it shape of a Book.
ReplyDeleteSeems to be multiple similar comments, these
Deletenice article...the research and the explanation are great..
ReplyDeletekeep penning
Namaste mk!!
DeleteThanks a lot for appreciating the post!!!!
Veryyyyy good blog... Good effort... Truly useful one for developers and students! :)
ReplyDeleteNamaste and Thanks a lot for liking this post
DeleteThis is so pointless. I'm a mechanical engineering student currently and I've taken quite a few programming courses, and this seems retarded. Sorry.
ReplyDeleteNamaste!!
DeleteThough I would have loved had this post not being made anonymous. But, I am sure a lot of mechanical engineering students who have taken up programming courses would not find it retarted. Thanks
Dear Saxena,
ReplyDeleteA very good insight and study by you.
Dear Saxena,
ReplyDeleteA keen study and analysis by you.
Namaste!
DeleteThanks a lot for reading through the entry and liking the post
First off.. Good article.
ReplyDeletewith reference to the book itself, ashtadyayi itself is ashtanam adhyayaanam samaharaha: as in the joining of 8 chapters, dealing with the 4 padarthas.. a complete trestise on a language to be adapted as need be!
Namaste Varun!!
DeleteAshtadhyayi, the first ever book on Grammar itself surely deserves more recognition than it has got till now. I hope with more international focus, the treatise will earn the respect it deserved
Great article Sapan :)
ReplyDeletei am more interested in sanskrit now
Namaste Dhiren,
DeleteGlad you liked it
You changed my understanding of sanskrit as a language.. looking forward for more insights :)
ReplyDeleteThanks for this
Namaste DHiren,
DeleteThanks again!!!
I didn't understand how there is a recursion in "मार्जारः श्रावितृ मूषकम् अपश्यत्"
ReplyDeleteCould you please explain?
The sentence starts with Marj, the cat, and while we are forming it up, it refers back again to the start of the sentence when it encounters "who hears", to get the reference.
DeleteAgain it goes back to the start of the sentence to get the reference of the cat.
I was wondering what was it that made Sanskrit different from other languages..realized that while most languages started off in rudimentary form and over generations evolved in a haphazard manner, Sanskrit was the product of brilliance of one single man called panini..thanks for such a wonderful post!
ReplyDelete-Deepti
Amazing post !!
ReplyDeleteI was skocked to know that sanskrit is the suitable language for computer programming .
Manner you analyze the facts was fantabulous . Good Going Great Job !!
Totally Shocked!!!!
ReplyDeleteThe way Sanskrit is analysed with respect to the logics and concepts of programming is just adorable...!!
Thank you SAPAN SAXENA
Woah. 4000 rules.
ReplyDelete