Preheat the oven to 350°F (180°C).
Butter or spray a rectangular 8x12 inch (20x30 cm) cake pan lined with parchment paper. See Notes below for variations.
Chop 1 ounce semisweet chocolate and put it in a medium bowl with ½ cup unsweetened cocoa powder.
Heat ⅔ cup creamy stout beer in a medium saucepan over medium heat until it almost boils. Don't let it boil. Add to the chocolate and let stand 1 minute. Whisk carefully until the chocolate is completely melted and the mixture is smooth. Add ⅓ cup whole milk and mix. Reserve.
In a large mixing bowl, beat the 10 tablespoons unsalted butter, softened, with an electric mixer, or use the bowl of a stand mixer with the paddle attachment, at medium speed for 30 seconds.
Add 1 cup firmly packed dark brown sugar and ½ cup white, beating for 3 minutes, until light-colored and fluffy, and scraping the sides of the bowl frequently.
Add 3 eggs, one at a time, mixing well each time. Add 1 teaspoon pure vanilla extract or paste and mix well, scraping down the sides.
Sift the dry ingredients: 1 ½ cups all-purpose or cake flour, 1 teaspoon baking soda and ½ teaspoon salt, and add them in 3 parts, alternating with the Guinness mixture in 2 parts, mixing well but just until it's incorporated. You start and end with the flour mixture. Don't be tempted to beat too much at this point, as it will make the cake tougher. You can have the dry ingredients measured and sift directly over the butter mixture, or do it in a different bowl if that's easier for you.
Pour the batter into the prepared pan and bake for about 40 minutes, until a cake tester or toothpick inserted in the center comes out clean. The time might vary depending on the pan and oven.
Let the cake cool completely on a wire rack (cooling rack).