Preheat the oven to 200 degrees.
Chop 2 of the red onions into quarters. Toss in a little vegetable oil and place in the oven to roast for 20 mins.
In the meantime, add the vegetable oil to a pan on medium heat. Chop the final onion into rough small cubes and fry on medium heat until they become translucent.
Finely chop or grate the ginger and garlic (finer the better) and add to the onions. Cook for a minute until everything becomes fragrant.
Add the spices and cook for 30 seconds.
Add the chopped tomatoes and cook until they become soft and broken down (feel free to add 50ml of water here just to stop the ingredients from burning or sticking to the bottom).
Finally, add the dal and the water and cook on medium low until the lentils are soft. Add more water if the mixture becomes too dry.
In a separate small pan, add the vegetable oil and bring to smoking. While that is coming to temperature, dice the red onion finely and place in the pan. Cook until they are roasted dark brown in colour. Just before it turns this colour, add the cumin seeds, curry leaves, dried chilli ad dried long red chilli. Cook until the onion is dark and then pour everything into the dal mixture. Season with salt and pepper.
Serve with rice or Naan or Idli.