In a stand mixer, combine sugar, flour, and cocoa. Add egg yolks and continue mix. Gently pour in milk. Once combined, pour all contents into double boiler, cook stirring almost constantly. You want this mixture to become thick like pudding/custard. You should see the bottom of your pan when you pass through it with a spoon. You can cook directly on the stove top on low heat, just be careful. Once thickened, ADD butter, vanilla, and salt. Cook for two more minutes stirring constantly. Pour it into your waiting cooked pie shell.