In a small saucepan, bring 2 cups of water to a boil. Add tapioca pearls and simmer, uncovered, for 10 minutes. Cover with a lid and remove from heat. The tapioca pearls should plump up and turn translucent in about 10 minutes (if not, let it reboil for 5 minutes and keep it covered again for 10 minutes). Drain the liquid through a sieve and rinse with cold water until water runs clear. Set aside.
In a large pot, bring the beans and 8 cups of water to a boil over high heat. Reduce the heat to low and let simmer, covered, stirring occasionally. Make sure there is enough water covering the beans at all time; add more boiling water if necessary. Cook for about 1.5 hours, or until the beans are tender and the liquid reduces to a thick consistency.
Stir in rock sugar and allow to dissolve completely. Stir in tapioca pearls and coconut milk before serving. Serve hot or chilled.