Staying friends with an ex-lover is easier said than done.

But Lena Dunham and Jack Antonoff seem to have mastered the art of the post-split friendship.

After announcing in January their five-year relationship had ended, the high-profile pair hung out this weekend, with Lena even posting a selfie of them to Instagram.

“Best friends 4ever,” she captioned the shot.

The writer/actor/director recently penned an essay about learning to be alone after her break-up from the musician and producer.

“How do you get back your taste for solo life, overcome the fear of your own thoughts?” she wrote.

“Even when my partner was away for work, the house had always been full with his presence—a wayward red sock, a pile of used earplugs.

“I started slowly, with a bath, the kind that lasts so long you resemble a Shar-Pei …. I found that the bath was a good starting place because bathing alone is natural, something you might even do with someone in the other room Skyping their cousin or playing video games.

“I read a poetry book cover to cover sitting at the kitchen counter while my parents were out for the night enjoying a more active social life than I do, double-fisting leftover Danish,” she reveals.

“Then I stepped into a restaurant not far from the house and asked for the table by the window, where I ordered only tea and a bread basket but considered it a start.”

She now believes alone time is a crucial experience for a woman’s growth.

“This pure and fiery solitude, is the time in which women form themselves—and that a patriarchal society has removed that privilege from us through the threat of eternal loneliness as a penance for the sin of loving yourself.”