their ship was moving slowly out to sea , a dim shape in the fog with red and green lanterns marking her port and starboard sides and with a lone sailor astride her bowsprit blowing a melancholy foghorn to warn other ships away .