Preheat oven to 350°F (175°C).
Grease and flour cake pans.
Cream butter and sugar until fluffy.
Add eggs one at a time.
Pour in melted chocolate and vanilla.
Mix flour, salt, and baking soda.
Alternate adding flour and buttermilk.
Divide batter between both pans.
Bake 30–35 minutes. Let cool.
Make frosting: whisk yolks, milk, sugar.
Cook mixture over medium heat, stirring constantly.
Add butter, stir until melted.
Mix in pecans, coconut, vanilla.
Cool frosting until spreadable.
Layer cakes with frosting between.
Frost top and sides generously.