In a dry 3-quart heavy saucepan cook 1/4 cup sugar, undisturbed, over moderate heat until it begins to melt and cook, stirring with a fork, until melted completely and deep golden brown. Remove pan from heat and dip pan briefly into a bowl of ice water to stop cooking. (Caramel will harden.) Cool pan about 5 minutes and return to heat. Add milk and cook over moderate heat, whisking, until caramel is melted. Whisk in cocoa until combined well and keep mixture warm.
In a metal bowl set over a saucepan of barely simmering water (or a double boiler), melt chocolate, stirring, and remove from heat.
In a bowl with an electric mixer, beat egg yolks with remaining 3/4 cup sugar until thick and pale. Whisk in caramel mixture and chocolate in streams, whisking until combined. Pour custard into another 3-quart heavy saucepan and cook over moderately low heat, stirring constantly, until a candy thermometer registers 140° F. Cook custard, stirring (do not let it boil) 4 minutes more and remove pan from heat. Cool custard completely and freeze in an ice-cream maker according to manufacturers instructions.