1. Make the bar nuts: Preheat oven to 325 degrees and line a baking sheet with parchment. In a large bowl, mix egg whites, brown sugar, salt, cayenne, and rosemary into a thick paste in a large bowl. Add nuts and toss until fully coated. Spread nuts evenly on baking sheet and roast for 30 minutes, tossing every 10 minutes, until toasty and aromatic. Transfer to another baking sheet and let cool. Nuts can be stored in an airtight container at room temperature for up to 1 week.
2. Place canister for ice cream maker inside the freezer to chill. In a small bowl, mix about 2 tablespoons of the milk with cornstarch to make a smooth slurry. In a medium bowl, whisk cream cheese and salt until smooth. Fill a large bowl with ice and water.
3. Combine remaining milk, cream, sugar, and corn syrup in a 4-quart saucepan and bring to a boil over medium-high heat; boil for 4 minutes. Remove from heat and gradually whisk in the cornstarch slurry. Bring mixture back to a boil over medium-high heat and cook, stirring with a heatproof spatula, until slightly thickened, about 1 minute. Remove from heat.
4. Gradually whisk hot milk mixture into cream cheese until smooth, then stir in the smoked porter. Pour the mixture into a 1-gallon Ziploc freezer bag and submerge the sealed bag in ice bath. Let stand, adding more ice as necessary, until cold, about 30 minutes.
5. Remove frozen canister of ice cream maker from freezer. Assemble ice cream machine and turn it on. Pour ice cream base into canister and spin until thick and creamy. Pack ice cream into a storage container, folding in ½ cup bar nuts as you go (reserve the rest for another use or snacking). Press a sheet of parchment directly against the surface, and seal with an airtight lid. Freeze in coldest part of your freezer until firm, at least 4 hours.