Make the rempah. Drain the soaked dried chilies and blend them with the fresh chilies, shallots, garlic, lemongrass and belacan into a coarse paste, adding a splash of water to get the blades moving.
Pat the squid very dry. Bring a small pot of water to a gentle simmer and blanch the squid rings for 20 to 30 seconds, just until they turn opaque, then drain right away. This firms them up and stops the sambal from going watery later.
Heat the oil in a wok over medium. Fry the rempah, stirring often, for 8 to 10 minutes until it darkens and the oil starts to split from the paste. This is the step most people rush. Keep going until it smells toasty and sweet, not raw and sharp.
Add the sliced onion and cook for 2 minutes until it softens at the edges but still has some bite.
Stir in the tamarind and sugar, add 3 to 4 tbsp water to loosen the sauce, and simmer for 1 minute. Taste and adjust salt now, while there is no squid in the pan to overcook.
Add the blanched squid and toss to coat, cooking just 1 to 2 minutes to heat through. Kill the heat the moment it is hot. Squid turns rubbery if it sits on the fire, so serve straight away over rice.