Cook the berries: put the raspberries, the 1/4 cup sugar, the lemon juice, and a tiny pinch of salt in a small saucepan. Smash about half the berries with the back of a fork, then set it over medium heat. Simmer for 8 to 10 minutes, stirring, until it thickens into loose jam. Pour into a small bowl and cool completely.
Warm the cream base: combine the heavy cream, whole milk, the 1/2 cup sugar, corn syrup, and the remaining salt in a medium saucepan. Warm over medium heat, stirring now and then, until the sugar dissolves and the mixture is steaming but not boiling.
Temper the yolks: whisk the four yolks in a separate bowl until they loosen. Ladle some hot cream into the yolks, whisking slowly, then repeat. Pour the yolk mixture back into the saucepan, whisking the whole time. This is the step that prevents scrambled eggs.
Cook the custard: keep stirring over medium-low heat until the custard thickens enough to coat the back of a spoon — about 170°F on a thermometer, or the spoon test: run your finger across the back and if the custard holds the stripe, it is done. Do not let it boil.
Strain and chill: pour the custard through the strainer into a bowl. Stir in the vanilla. Let it cool for 15 minutes, then cover and refrigerate for at least 2 hours — overnight is better. The colder the base, the smoother the churn.
Churn: pour the fully chilled custard into the frozen canister and churn according to your machine, about 25 to 30 minutes, until it looks like thick soft-serve. Transfer to a chilled loaf pan and smooth the top.
Swirl: dollop the cold raspberry compote across the top in five or six spoonfuls. Take a butter knife and draw it through the ice cream in three or four big strokes, up and over, like folding. Stop as soon as the ribbons are visible. Over-swirling gives you pink ice cream.
Freeze: press parchment paper directly against the surface, then cover tightly. Freeze for 2 to 3 hours until scoopable. If it freezes longer, let it sit on the counter for 10 minutes before scooping.