Rinse the black and red beans and place in a large saucepan.
Cover with water and bring beans to a boil over high heat.
Boil for 1 minute.
Take the pan off heat, cover, and let stand for 1 hour.
Drain beans.
Rinse beans, drain again, and add 3 cups water.
Bring to a boil over medium heat, then cover and simmer over low heat for 45 minutes.
Stir barley into the bean mixture and cook for another 10 minutes.
Stir millet into the mixture.
Cook for another 20 minutes.
Mix in rice and cook for 20 to 25 minutes, checking after 10 minutes to see whether you need to add a little more water.
Cook until rice and beans are tender.
While grains cook, toast pine nuts in a dry skillet until golden.
Serve in a large bowl garnished with pine nuts.