Retreats are rather group focused (and even if it’s just two people — it can’t be regular and long enough; especially in the beginning) and a hackathon is, well, a hackathon. One has logistics challenge and another has logistics as well as intimacy challenge (or maybe we are talking about different kind of hackathons).
I’d rather suggest activities which are regular and repeated. That’s how I have made friends after college ended and I started working. Sports has worked for me in this regard.