Imagine you're encoding morse in a protocol that has only an instant pulse. you can't do a dash, only dots.

But you can encode a dot as two dots with a short gap between them, and a dash by two dots with a long gap between them.

And you can of course merge adjacent dots: V is ···-, but you don't need eight dots to represent that, you need 5:
dot-short-dot-short-dot-short-dot-long-dot

and an extra-long gap between two dots is a space

if my math is correct, you encode "hello world" in 39 dots

this was originally going to be a math problem but I think I figured it out by the end, so I just posted it in case anyone found it interesting or can point out a way I'm fucking up.

I'm a bit sleep-deprived at the moment so I could easily be very wrong

the point of this dots-only idea was to compare it against a different encoding, which tries to minimize the number of dots by measuring the gaps between them.
so "hello world" would be encoded as 12 dots, with long distances between them

encoding algorithm:

emit('.')
for char in string:
sleep(char-32)
emit('.')

this does have the edge case that a space is encoded as no go between dots.

it could be shifted to char-31 or we could design the decoder to consider sub-1s delays as being 0

@foone if X is a pulse and _ is silence, why not do X _ _ _ for a dit and X _ X _ for a dah? timing would not have to be nearly as precise