The gallows laugh is the dying man's joke, or famous last words. As already noted, the crowds of spectators at Tyburn or Newgate hangings in the eighteenth century used to admire people who died laughing: 'I was the capper, see,' says Daniel Then. 'We had the cull all set up and then something went wrong. The others got away but I got nabbed, ha ha ha!' And 'Ha, ha ha,' roars the crowd in appreciation of the jest as the trap is sprung, 'the damber died game.'
2010, Eric Berne, What Do You Say After You Say Hello?