Throw the lentils into a medium saucepan. Fill with enough cold water to cover the lentils by about an inch. Bring it to a boil over medium-high heat, then turn down to a simmer and cook until the lentils are tender but not mushy, about 20 minutes. Drain and set aside.
Meanwhile, as the lentils cook, grab a large skillet. Pop it over medium-high heat and add the oil. Allow the oil to warm for a minute, then drop in the cumin seeds and cracked peppercorns and cook, shaking the pan once in a while until the cumin seeds darken a touch, about 1 minute.
Add the onions, sprinkle with a dash of salt and cook until they turn dark caramel brown, stirring often. This will take about 15 minutes. Splash the onions with a little water if they stick to the bottom of the pan. You'll know they're done both by their deep chestnut color and by the slight crispiness developing on some of the onions.
Using a slotted spoon or spatula, remove about half of the onions to a paper towel-lined plate; these are for garnish later. Sprinkle in the ground cumin, cayenne and then add the cinnamon stick; saute about 1 minute.
Add the rice and cook, stirring often (but gently so you don't break the rice!) until some rice grains start to brown. Quickly, add the cooked lentils, 3 cups of water and 1 1/2 teaspoons of salt; bring to a boil. Turn the heat down to low so that the pan is at a simmer, cover and cook 30 minutes. The water should be completely evaporated and rice should be tender. (If there's still too much water in the bottom, put the lid back on and cook for another 5 minutes.)
Turn off the heat, keep the lid on, and allow the rice to steam undisturbed for about 5 minutes.
Meanwhile, toast the pine nuts, if using, in a small skillet over medium-low heat, shaking often, about 5 minutes.
Taste the rice for seasoning. Serve with the reserved caramelized onions, toasted pine nuts, if using, and a little squeeze of lemon juice. I also like to serve this with some dollops of Greek yogurt.
Recipe courtesy of Aarti Sequeira