Mix sugar and cocoa; add syrup and milk. Cook in saucepan over medium heat until a small drop forms a soft ball in cold water (234 to 240 degrees F on a candy thermometer). Remove from heat. Add butter, pecans, and vanilla. Beat with mixer or by hand. Pour into a slightly buttered oblong glass dish and cut into squares. Work fast, as mixture thickens quickly.