Skip to content

Commit 24f4b7d

Browse files
committed
Record the story behind the pack format specifiers H, h, B and b.
1 parent fd7895c commit 24f4b7d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pod/perlfunc.pod

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4480,6 +4480,28 @@ The C<< > >> and C<< < >> modifiers can also be used on C<()> groups
44804480
to force a particular byte-order on all components in that group,
44814481
including all its subgroups.
44824482

4483+
=begin comment
4484+
4485+
Larry recalls that the hex and bit string formats (H, h, B, b) were added to
4486+
pack for processing data from NASA's Magellan probe. Magellan was in an
4487+
elliptical orbit, using the antenna for the radar mapping when close to
4488+
Venus and for communicating data back to Earth for the rest of the orbit.
4489+
There were two transmission units, but one of these failed, and then the
4490+
other developed a fault whereby it would randomly flip the sense of all the
4491+
bits. It was easy to automatically detect complete records with the correct
4492+
sense, and complete records with all the bits flipped. However, this didn't
4493+
recover the records where the sense flipped midway. A colleague of Larry's
4494+
was able to pretty much eyeball where the records flipped, so they wrote an
4495+
editor named kybble (a pun on the dog food Kibbles 'n Bits) to enable him to
4496+
manually correct the records and recover the data. For this purpose pack
4497+
gained the hex and bit string format specifiers.
4498+
4499+
git shows that they were added to perl 3.0 in patch #44 (Jan 1991, commit
4500+
27e2fb84680b9cc1), but the patch description makes no mention of their
4501+
addition, let alone the story behind them.
4502+
4503+
=end comment
4504+
44834505
The following rules apply:
44844506

44854507
=over

0 commit comments

Comments
 (0)