Tying knots like a sailor