Preheat oven to 350°F (175°C). Grease a baking sheet.
In a mixing bowl, combine flour and sugar.
In a saucepan, melt butter. Add water and cocoa powder. Bring to a boil, then remove from heat.
Pour cocoa mixture over flour mixture. Stir to combine.
Add buttermilk, beaten eggs, baking soda, vanilla extract, and salt. Mix well.
Pour batter into prepared baking sheet. Bake for 20 minutes.
For the frosting, melt butter in a saucepan. Add cocoa powder and milk. Bring to a boil, then remove from heat.
Stir in powdered sugar and vanilla extract until smooth. Add chopped pecans if using.
Pour frosting over warm cake. Let cool before serving.