Saturday, July 19, 2025

The problem of fighting at night

The rule of war that battles have to commence at/post sunrise and conclude at/pre sunset was inspired by a lot of practical considerations (like most other rules in dharma) beyond mere 'follow this because this is virtuous'. 

The ancients lived in an already hostile world that became much more hostile once their only real source of light disappeared. There was fire ofc and there are records of soldiers coping with the darkness with their fire torches and oil lamps, but that can only help so much.

Men primarily identified each other(allies or enemies) by size/color/shape/design.. of their standards(dhwaja) and outfits (armor, gear), which quickly became ineffective after dark. In a battle, it’s dangerous to have people wildly swinging swords & shooting arrows in the dark without knowing who they might hit.

Another thing to consider is that battlefield itself is quite an unforgiving place to be in. Not being aided by light, you risk falling into ditches, holes, hitting rocks, stumbling, falling and getting cut/pierced by blades and arrows lying on the ground.

Night-time also means exposing yourself to the elements (wind/chill) and night crawlers - snakes, scorpions, porcupines, and also leopards, jackals, wolves, bears, etc. Very hard to defend yourself against this when you're preoccupied with a battle at the same time.

Another practical constraint I forgot to add in the earlier paragraph was that if you are carrying a fire torch, you have to free your non-dominant hand. This means dropping the weapon or the shield that you were carrying, which puts you more at risk.

Lastly, the issue of sleep which has been discussed at great lengths too. Fighting all day on the battlefield with heavy metal armor, swords, lances, bows-arrows must've already been pretty exhausting for the soldiers and letting it bleed into the night means overworking them at reduced cognitive capabilities.

The rule was mostly unviolated by either of the parties because there was significant loss to be prevented by each party if they upheld it.

Monday, July 7, 2025

A basic primer to hypothesis testing (part 1)

Summarizing an earlier post, I'd say that the basis of scientific enquiry is to model systems (a part of the world around us) by making falsifiable empirical claims (hypotheses) about it. These hypotheses are then formally validated by first constructing a well defined experiment around them that generates data from the system under observation, and then statistical analysis of said data. Post analysis, these hypotheses are either rejected or provisionally supported, along with revision in our models if necessary.

In this post, I would like to chalk out the formal validation process of the hypothesis with the example of a fear conditioning experiment. [TODO: add link]

Suppose you run a fear conditioning experiment and collect pupillometry data along with it. A data processing pipeline (perhaps developed by someone like me) will take in the eye-tracking data generated for the experiment and after multiple stages of preprocessing and modelling generate output pupil size responses for each of the conditions CS+ (conditioned stimulus followed by shock, here rotated: square), CS- (conditioned stimulus not followed by shock, here: square)

Consider that the final output looks something like this:

participant_id cs_p_response cs_m_response
p_001 0.838 0.256
p_002 0.842 0.278
p_003 0.657 0.392
p_004 0.769 0.138
p_005 0.800 0.169

Our primary aim in this exercise is to prove that post-conditioning, the participant does associate CS+ with the aversive stimulus, which would be indicated through increased CS+ response in comparison to the CS- response. So, we construct two hypotheses:

H₀: There is no effect or no difference in CS- and CS+ responses.
H₁: There is an positive effect or a positive difference in CS- and CS+ responses.

**One important point to note about hypothesis testing is that we always test against the null hypothesis instead of "trying to prove the alternate hypothesis."

Now, before we can statistically prove/disprove the null hypothesis, it should do us good to just try and plot our data to eyeball if there is some difference in the distributions of CS+ and CS- responses.



Looking at the plot, one can clearly see that the CS+ responses are higher in general (the blue curve on the right) then the CS- responses (the orange curve on the left). This supports our alternate hypothesis H₁. 

---

Our job would've ended here if this was to be considered enough proof of validity of H₁ (rather, invalidity of H₀). Alas, that is not the case and visual inspection is nowhere rigorous enough to conclude our study. We must employ actual statistical tests (like the Student's t-test) to prove our hypothesis. 

We need to quantify the difference the two distributions corresponding to the two groups in order to show that the difference is not (distributed) how we expect it to be (difference = 0, or rather centered around 0).

[TODO: expand]



What is Science?

07/07/2025

I was actually writing a different post about hypothesis testing (still in drafts) and this point came up in the introduction. I realized that I don't really have a solid answer to this question. I have a vague idea of what all is "scientific", but I don't have a definition per se. In this post, I'll try to converge in on the answer as best as I can, but I get the feeling that the answer will be inadequate and I will have to return to this post multiple times over the years tighten it more and more.

As soon as I think about science, the following things come to mind:

  • curiosity
  • observation
  • data
  • hypotheses
  • experiment
  • modelling
  • testing
  • analysis
  • descriptive v/s predictive
Science, the way I see it, is an exercise in modelling 'systems'. One wonders(curiosity) about the world around them(systems) and tries to understand it(model them) to the best of their abilities. One constructs hypotheses(falsifiable empirical claims) based on the models, which are rigorously tested through well designed experiments followed by data acquisition and analysis. We either reject or fail to reject these hypotheses to generate provisional knowledge (in science, we can never have the final truth)  that is epistemically justified (justified through evidence and a process of interpreting that evidence).

I know this is too wordy, but for now this is the closes to a definition that I can get to.

Tuesday, July 1, 2025

Presentism

I was writing this post about the current politics surrounding Bajirao and learnt a new word: Presentism.

It means: 

"uncritical adherence to present-day attitudes, especially the tendency to interpret past events in terms of modern values and concepts."

Good to know. Quite useful when you see people commenting about ancient religious practices, social customs or what not. 



Monday, June 30, 2025

The Foolishness of Rejecting Bajirao

Last week Hon. MP Medha Kulkarni submitted a list of demands to the Railway minister, one of which was renaming the Pune Railway Station after Peshwa Balaji Bajirao. Within hours, social media timelines filled with calls to bury the idea. Criticism to the idea came in a variety of forms: 

  1. Some shared views I personally subscribe to, like: “We should let go of this compulsive need to deify historical figures and choose a neutral name - just call it Pune Station.”
  2. Others floated predictable alternatives - “Name it after Phule or Ambedkar.” Given my ideological leaning I disagree with this, but I still do see this as a valid part of democratic discourse.
  3. A huge percentage of criticism could be summed up in the usual wave of social media toxicity: personal attacks, name-calling, slurs. It's unacceptable, but unfortunately an inescapable reality of today’s digital landscape.
  4. Worse, however, was the real-life hostility shown by sections of the political opposition. This wasn't just ideological dissent, it was hatred, expressed in crude, caste-charged language. It reflects the two kinds of politics currently distorting our public life: party politics(any demand including this one coming from a BJP MPs would naturally be countered by opposition) and caste politics (Kulkarni and Bajirao are both Brahmins and the politics of caste centers around the narrative of the Brahmin as the archetypal oppressor).

Here, I'd like to state a couple of points for why, beyond the form, one should have problems with the substance of their arguments too:

Bajirao I became Peshwa at the age of twenty in 1720, amid growing instability in the Deccan. He cemented his legacy with a decisive victory at the Battle of Palkhed (1728), where he forced the powerful Nizam to accept peace. A decade later, he orchestrated a daring raid on Delhi, humiliating the Mughal court and asserting Maratha dominance in northern India.
Over the next two decades, he led more than 40 military campaigns, never losing a single one. His strategic brilliance extended Maratha influence from the Godavari to the Yamuna. Governors in Delhi deferred to him. Rajput kings paid tribute. Mughal emperors plotted how to placate—not defeat—this cavalry commander from Pune.
When he died of illness in 1740, he left behind a Maratha state poised to become the first indigenous Indian power since the Mauryas to dominate much of the subcontinent. In realpolitik terms, Bajirao was India’s premier head of state in the generation before the British East India Company took control.

Given all this, one wonders why would anyone not just dismiss Bajirao’s legacy but go so far as to actively celebrate his downfall? How could we call ourselves decolonialists if we are to estrange Bajirao, and with him the Maratha empire - the pre-colonial power that aligned most to our interests.

I see only one reason for this: the poison that comes in the form of present day's anti-caste politics. Because in today’s political climate, anything even remotely associated with Brahmins is seen as ethically suspect, regardless of historical fact. Bajirao was a Brahmin, and for some, that alone disqualifies him from public commemoration.

But this is a deeply flawed and intellectually dishonest approach to history. The idea that all Brahmins are historical oppressors is not only historically inaccurate, but also ignores regional and temporal complexities in caste dynamics. And even if we accept caste as a dimension of history, Bajirao’s record of leadership stands on its own. Bajirao should not be seen merely as a Brahmin; he was a strategist, warrior, and empire-builder whose caste was incidental to his achievements.

Additionally, critics invoke the Manusmriti as the most remarkable taint of the "Brahmanical" Peshwa rule, as though eighteenth‑century Maharashtra ran on its verses like code. In reality, caste practice varied drastically across regions and eras; with many scriptural prescriptions being casually overlooked in practical life. Bajirao’s own correspondence shows concern for soldier pay, grain prices and river crossings, not ritual law. Latching onto Manusmriti because it's an easy target and reducing a flesh‑and‑blood strategist to a footnote in an ancient legal text is pure intellectual laziness.

The kind of logic we now see in India would be laughable elsewhere if it weren’t becoming so mainstream. Imagine Britons rejecting Queen Victoria because some 19th-century theologians justified slavery using the Bible. Or Germans erasing Otto von Bismarck because certain Protestant scholars once defended feudal hierarchy. Neither figure is free of moral baggage. Bismarck’s “Blood and Iron” speech glorified militarism. Victorian Britain profited from opium, indentured labor, and ruthless colonization. And yet, their legacies are studied, debated, critiqued—not erased. Because to amputate your past is to forfeit the ability to learn from it.

India’s social fabric is already frayed by identity politics. Scrubbing Bajirao from public memory will not relieve Dalit poverty or end caste insult; it will simply amputate a chapter in which an Indian power, led by an Indian commander, bent both Mughal and Afghan forces to its will. In an era when we lament colonial amnesia, it is perverse to torch an indigenous success story.

Friday, June 13, 2025

A loose history of southern Europe

Far too often I hear the greatness of Northern Europe in terms of the scientific and philosophical progress it has made, contextualizing this to the innate greatness of the northern European culture and the people born into it. I've always abhorred exceptionalism of this sort, and been doubtful about this particular claim. I believed that in pre-modern times, near-tropical countries are much more favoured to make great advances in science and culture sheerly because of the geographically guided climate, flora and fauna they find themselves in. With this belief, I found more surprising that it's the northern Europeans (namely, Germans, British, Dutch, etc.) that find themselves to be more successful than their southern counterparts (specifically Italians, Greeks).

I was listening to a podcast with David Deutsch as the guest where he talked about the "intellectual movement shifting from southern to northern mainly because of what happened to Galileo." This led me to very deep rabbit hole about the history of the Mediterranean.

When I was reading, there were a lot of things that came up which needed to be sorted out in a nice order and connected to each other before I can consume them. Here's an attempt at that:

  1. 1071, Byzantines lose the Battle of Manzikert.
  2. They never really recover from this, Byzantine empire starts declining
  3. Political instability
  4. 1190, Alexios III Angelos deposes Isaac II Angelos and becomes the Byzantine emperor
  5. 1195, prince Alexios IV Angelos, son of Isaac II, is imprisoned by his uncle Alexios III Angelos
  6. 1201, prince Alexios is smuggled out of Constantinople by Pisan merchants to the Holy Roman Empire
  7. 1202/03, prince Alexios offers the Crusaders money, army, and the Greek Orthodox Church if they help him overthrow his uncle Alexios III
  8. Jul/Aug 1203, Crusaders manage to fulfil their task and get prince Alexios on the throne
  9. Dec 1203, relationship between Alexios and the Crusaders is soured. They feel cheated.
  10. Apr 1204, Fourth Crusaders sack Constantinople!!!
  11. Byzantines never really recovers from this, empire starts declining
  12. Political instability in the Greek lands. Those who can, start to emigrate (westwards)
  13. Lots of Greeks landing on the Italian shores, carry their culture with them
  14. 13th/14th Century Italy, Economic prosperity. Powerful city states, calm Mediterranean waters (as opposed to rough Norther European seas) offering good opportunities for maritime trade, strategically placed for trade with Asia through middle east. 
  15. Italian metropolises = super rich people, big cities, lots of urban poor, slums, wide rich-poor gap, questionable sanitation in certain areas
  16. Mid 14th Century, Black Death ravages through Europe killing off 30-60% of the population in the cities.
  17. Post black death, food and land prices plummet. Surviving people have better standards of living
  18. Late 14th, early 15th Century: Rich people find themselves to be too rich. Sponsor arts, sciences, philosophy and fine living.
  19. "Thinkers" started to think and write about stuff they found interesting
  20. "Oh wow! Ancient Greece is so interesting!!" (see above, who landed on the Italian shores with their culture?)
  21. Common people (non-thinkers) are psyopped into "retvrn to antiquity"
  22. Rich people want their mansions to be built like those in ancient times
  23. 1402, Brunelleschi and his friend Donatello go to Rome to study ancient Roman architecture. 
  24. "Omg, is this Linear Perspective"!!!
  25. Brunelleschi works on the Basilica of San Lorenzo and the Florence Cathedral
  26. 1445-1475, withing 30 years, 4 great men are born in Florence: Boticelli, da Vinci, Michelangelo!!!
  27. "Oh shit! Are we living in the Renaissance"!!!
  28. 1497-1503, Copernicus spends time in Bologna, Rome and Padua to study religion, philosophy and ofc astronomy
  29. 1532 Copernicus finalizes his theory on Heliocentrism
  30. 1533, although unpublished, the theory is reaches the educated people across Europe
  31. 1543 Copernicus dies of apoplexy and paralysis
  32. 1543 His book on Heliocentrism is published
  33. 1564 Galileo is born in Pisa!!!
  34. 1592-1610 Galileo works at Uni Padua teaching geometry, mechanics and astronomy
  35. 1610 Galileo publishes the Starry messenger, noting his observations of the starry sky made through his telescope (the first scientific article of this kind). 
  36. 1611 Galileo's colleague at Padua, Cesare Cremonini, is being tried by the Roman Inquisition for heresy and Galileo's name comes up as his collaborator
  37. 1613, one of Galileo's letters to his student goes viral. It reads ~"The heliocentric model does not challenge Biblical authority because the Bible has no authority over science anyway" 
  38. 1613-1616 Controversy bubbles up even more
  39. Feb 1616 Galileo is ordered by the Inquisition to reject Heliocentrism and all his books are banned
  40. 1616-1632 Galileo stays away from controversy
  41. 1632 Galileo writes a "neutral" book about the two celestial models in the form of a dialogue. The speaker defending Geo-centrism is conveniently made out to be kind of stupid
  42. 1632 The Pope takes this as a personal attack and the Church starts a formal trial against Galileo
  43. 1633 Galileo arrives in Rome and denies ever defending Heliocentrism.
  44. Jun 1633, Galileo's apology and evasions don't work and he's charged for crimes against the Church. He was forced to recant his views, his books were banned and he was sentenced to imprisonment (which was later changed to house arrest)
  45. 1642, Galileo dies, while still in house arrest
  46. late 17th Century, southern Europe (Italy, Spain) becomes more conservative. Creativity and spirit of scientific enquiry flee southern Europe in fear of religious persecution.
  47. late 17th, early 18th Century: empiricism and rationality find a new home by latching themselves onto the Protestant revolution in northern Europe.
  48. "Oh shit! Is this the start of the Age of Enlightenment"!!!

Sunday, June 1, 2025

Segmentation of Mahabharata sentences

Motivation:

The main problem that I face parsing Mahabharata is due to my lacking Sanskrit skills. I'd say, due to my Marathi background, I have a basic understanding of words and their meanings (they're pretty similar to Marathi words) but it's not as great as it should. 

As an example to illustrate my point, consider this word:                 samāsīnānabhyagacchadbrahmarṣīnsaṃśitavratān.
It's a mouthful, isn't it? It's much better understood in it's unsandhied form:
[samāsīnān abhyagacchat brahmarṣīn saṃśita- vratān.]

  • samāsīnān     = sitting together  
  • abhyagacchat     = he approached
  • brahmarṣīn     =  the brahmarishis
  • saṃśita-     =  firm
  • vratān.     =    vows
"He approached the brahmarishis who were sitting firm in their vows"

I want each of my verses to have an unsandhied form accompanying it.

The problem is currently, there's no good Sanskrit sentence segmenter out there that can split sentences into words and desandhify words into their constituents. I looked up and there are two options:

  1. Vidut.Sandhi: https://vidyut.readthedocs.io/en/latest/sandhi.html
    It's a python package built by the guys at Project Ambuda. I assumed it would do the job but I saw a note somewhere on the site that the sandhi-split tool is deprecated and they suggest using the Dharmamitra API. 

  2. This brings me to Dharmamitra. I didn't use their API (for which one can refer to this python package from one of the makers of Dharmamitra), but I did use their Sanskrit model for getting each of the sentences parsed.

Saturday, May 24, 2025

What is a temple?

I saw this tweet today wherein the lawyer is arguing that temples aren't a "Essential Religious Practice" for Hindus because Vedic Hindus worshipped Agni, Vaayu, etc. without temples : https://x.com/LiveLawIndia/status/1925490765393797190

My first thoughts on seeing this was: Wait, that's not true! And then it got me thinking, "What is a temple?"

To begin answering this question, we have to understand what "religion" is. For us, today, our thinking about these things is corrupted by one of the most potent mind viruses of our time - Christianity. More specifically, the version of Christianity that survived the Protestant Reformation. Religion for us is a private affair, a thing that we do on top of living our lives. We go to our work every day, we go to movies once in a while, we go on vacation, we retire, we spend time with our loved ones...and sometimes we pray to our Gods. There's life, and then there's practicing our religion. There are things that we owe to our loved ones, to ourselves, to the government and sometimes, if you are religious, there are things you owe to your Gods. The ancient ones saw religion completely differently. Rather, it was such innate part of their life, they didn't see it at all. When being religious involves everything from getting educated, getting married, earning your bread and butter, raising kids, and eventually getting old and dying with honor, would they know that they're being religious?

(To expand: This is even more pronounced in polytheistic societies where lack of belief in one God, can always be substituted by belief in other God which could be easily be included into the existing pantheon.)

This changes with Christianity, or the flavour of Christianity that we know and has taken over the minds of almost everyone in the world. The separation of the Church and the State, also defines the religion to be a personal voluntary practice. It allowed people to have a life outside of religion, which would've been inconceivable for the ancients.

I digress, the main issue is about temples.

So, let's assume you (your civilization) has created Gods. As it happened in those ancient civilizations like Hindus or the Greeks, the divine stood for abstract ideas and natural elements - rain, wind, fire, thunder, seas, rivers, big trees, etc. Any adjective you can think of for describing these elements, becomes an attribute of the divine. Any utility or nuisance value that these entities hold becomes their power. Having made these Gods, how do you make them manifest? Then came the idols and the temples.

The Hindus and the Greeks, I think understood temples in a very similar way. The temple is the "devalaya" or the "oikos tou theou", both essentially meaning "the house of god". Why does the god have to be housed, you ask? Because abstract entities aren't digestable until they are "pointable". One needs to be able to point at a thing that exists in the physical world as a proxy for what they are talking about. This is how the human minds works. We make things in the physical world to convey abstract ideas from one mind to another.

Temples are one of these things. You tie the abstract to a defines space in the physical world. "This right here is where God is." Only then can the idea be put to downstream use. Even if we assume that the pre-Vedic people lived a near-nomadic life without temples, the fact that they conducted ritual sacrifices, with sacrificial altars, the sites for which were chosen carefully can be assumed as an act of grounding the divine. The sacrificial site itself becomes the temple in such a scenario.

Friday, May 23, 2025

The second worst thing you can do is go against the state...

...and the worst thing you can do is go against the people.

I was listening to a podcast about Socrates' trial (Politics on Trial: Socrates vs Democracy), and this thought came to my mind.

Socrates was charged with, among other things, corrupting the youth of the city/state of Athens. In his trial, he was found guilty as a result of which, he was put to death.

The host goes through many things about the trial, but for this post, I'll only talk about one of them:

As mentioned earlier, the main charge that was put against Socrates was - 'corrupting the youth of the city/state of Athens'. The reason I say 'city/state of Athens' here, is because in case of Athens of 399BC these two could be hyphenated to mean the same entity and there are ways in which these could be seen as different entities as well. 

Athens was a democratic republic, but unlike modern representative democracies where apart from voting their representatives to run the government the people of the state have very little power or involvement in the governmental affairs, Athens had much more public participation. People were chosen randomly and took turns (over fixed tenures) to serve in public offices. Contributing to the state was an integral part of every person's life. Even in Socrates' trial, like in most trials of those times, the jury was the (a selected 500) people of city. So the city-state and the city-people can be seen as the same entity.

Yet, the distinction between the people of the city and the city state can be seen too. It was the state that went to wars. It was the people who suffered them. It was the state that faced existential crisis in a decade or so leading up to the trial. It were the people that got anxious. Regardless of their rotating system of assigning public officers, or the brief rule of a "select few members"(like the Thirty Tyrants) the ones in power and the ones that power is exercised on shall always remain distinct. It was in this way that the city-state and the city-people can be seen as two different entities.

My main these is two-fold. 
1. Socrates did a grave mistake of going against the state. I think I read this in David Dennett's book - that a state can be seen as an organism, which like most organisms is primarily driven by self-preservation. The Athenian city-state too was driven by self-preservation. It took the threats against it seriously, and in doing so, naturally found Socrates' actions threatening the existence of the state in the form that it was back then.
The kind of questions that he asked, doing is philosophy in the public squares, drove people to question the very foundations upon which the state was built on and based its everyday functioning. When the state held every person responsible for keeping itself afloat, Socrates "corrupted the minds of the youth" by driving them away from the duties laid onto them by the state, thus undermining its power and threatening its existence. This is an extremely serious crime for anyone to commit.

2. Much more grave than the mistake of going against the state was Socrates's actual mistake - going against the people. Towards the end of Socrates's 71 year life, the people of Athens had gotten anxious about the future of their beautiful democratic experiment that the city of Athens was. It was just reeling itself from the Peloponnesian War, and then a series of coups like the Thirty Tyrants. Since 508BC, Athens had been an oasis of democracy in a land which wasn't really accepting of those ideas. It managed to survive till the turn of the 5th Century BC by holding its ground against some very serious forces. By the time of the trial of Socrates (399BC), it would be naturally for the people to be tired of protecting their faiths in the idea of Athens against their own realities. Then comes Socrates' with his grand philosophies of undermining the very thing that they cared about and staked their lives on. "But why do you find Athens worth protecting? What is it about democracy that makes it better than everything else? Why you seek to have an equal say in the flow of power?" Socrates would ask questions like these justifying them by his pursuit for truth and higher knowledge. But while doing so, Socrates was, inadvertently or not, perceived as being contemptuous. His questions were perceived as personal attacks against people who were so devoted to the cause of Athens, which was naturally offensive to those whose devotion had previously demanded them to risk even personal life. This made the people wary and tired of Socrates.

Out of these two, I think the first got Socrates to the trial, but the second one gave him the verdict. People would rather let 71 year old Socrates die, that to have him survive amongst them planting seeds of doubt if their entire lives (as faithful servants of Athens) had been a lie. People rather chose to live in a happy delusion than possibly bitter truth.

Thursday, May 22, 2025

Entertainment should never be free

While on my commute to office today morning, I was listening to a song from "Mi Vasantrao", the lavni song. The scene came to my mind:

Vasantrao and PL Deshpande go to the old Lavni singer's hut. She sings for them. Vasantrao is quite touched by her singing and although he himself was poor, he takes out whatever money he had in his pocket and gives it to her. She then asks him to sing for her, and he sings equally well, after which she returns him that same money, along with some of her own.

Now, when I thought of this today morning, it got me thinking - entertaining someone is probably the best thing you can do for them. Life can get anything from dull and boring (in the best worst case) to pretty miserable and painful (in the worst worst case). Providing someone a moment of happiness, maybe making them laugh, making them excited, making them thrilled, or awed...is extremely valuable. A small island in this vast ocean of suffering that life is. This service, should never be free.

When I say that being entertained should never be free, I am not putting the responsibility of putting a price of entertainment on the entertainer. No. Rather, the entertainee should feel a internal obligation to reimburse the entertainer fairly. One should have a natural urge that compels them to pay their entertainer what they are due.

If you see a joke that makes you laugh, you ought to pay for it. If you see a good movie that made your lifted your spirits, you ought to pay for it. Someone's company makes you feel better, you ought to pay for it (this kind of payment can and often is done in the form of reciprocation)

Bottom line, entertainment should never be free.



The problem of fighting at night

The rule of war that battles have to commence at/post sunrise and conclude at/pre sunset was inspired by a lot of practical considerations (...