In a large glass bowl add the crushed pineapple, granulated sugar, vanilla extract, and eggs.
Mix with a help of a wire whisk and stir in the flour, baking soda (or baking powder) and a pinch of salt.
Transfer the mixture in a well-greased and floured 9x13 inch cake pan and bake the cake in a heated oven at 350 F or 175 C degrees for about 40 minutes.
Just 5 minutes before removing the cake from the hot oven, in a saucepan add the milk, butter, granulated sugar, and vanilla.
Bring it to a boil for 5 minutes and stir in the chopped walnuts and coconut flakes.
With the help of a straw poke the hot cake and pour the coconut and walnut frosting on top.
Spread with the spatula and let it cool for 2 hours before slicing.