Be careful. I wrote an emulator for the IBM 7094 so I could run and understand Thompson's grep. Even though I wrote it in Lisp it was...painful.
Thompson uses self-modifying code, so my emulator had to handle that.
Thompson's code is incredibly clever, and back when he wrote it self-modifying code was pretty common. But by modern standards it would have been a maintenance nightmare.
You need to understand the context. The quote in Gita was to motivate the best warrior of the time at the battlefront facing opponents who were mainly his cousins and uncles.
In that context the quote is about performing the duties you were born to do without overthinking the consequences.
the context makes it even worse. its a strange kind of tribalism that is being promoted here. "do what you are asked to without understanding the real consequences". btw war is actual zero sum usually.