Boil the potatoes in a pot of salted water until soft. Reserve the water.
Set a separate pot of salted water to boil for the pasta.
Fry the ham in butter, then add onion, carrot, and celery until softened.
Add parsley, tomato sauce, and a few spoonfuls of potato water. Let the sauce reduce.
Blend the sauce with anchovies and capers until thick and smooth. Return to pan.
Saute the artichokes in butter and olive oil until crispy in a separate pan.
Boil the pasta until al dente, drain, and add to the sauce with parmesan and butter.
Season with salt and pepper. Transfer to a serving plate, top with remaining sauce.
Garnish with fried artichokes and sliced pistachios.
