summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-08-23 19:48:14 +0200
committerNicholas Clark <nick@ccl4.org>2012-08-23 19:48:14 +0200
commit24f4b7dabc89e2f15420d419caa79471a92a6143 (patch)
treeacc386997f27e676a1558b33ea71d676a80531ba
parentfd7895cf8ded27bc2c1cddf7c72c17d6bdc95df0 (diff)
downloadperl-24f4b7dabc89e2f15420d419caa79471a92a6143.tar.gz
Record the story behind the pack format specifiers H, h, B and b.
-rw-r--r--pod/perlfunc.pod22
1 files changed, 22 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 408c91572f..9358c80d32 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4480,6 +4480,28 @@ The C<< > >> and C<< < >> modifiers can also be used on C<()> groups
to force a particular byte-order on all components in that group,
including all its subgroups.
+=begin comment
+
+Larry recalls that the hex and bit string formats (H, h, B, b) were added to
+pack for processing data from NASA's Magellan probe. Magellan was in an
+elliptical orbit, using the antenna for the radar mapping when close to
+Venus and for communicating data back to Earth for the rest of the orbit.
+There were two transmission units, but one of these failed, and then the
+other developed a fault whereby it would randomly flip the sense of all the
+bits. It was easy to automatically detect complete records with the correct
+sense, and complete records with all the bits flipped. However, this didn't
+recover the records where the sense flipped midway. A colleague of Larry's
+was able to pretty much eyeball where the records flipped, so they wrote an
+editor named kybble (a pun on the dog food Kibbles 'n Bits) to enable him to
+manually correct the records and recover the data. For this purpose pack
+gained the hex and bit string format specifiers.
+
+git shows that they were added to perl 3.0 in patch #44 (Jan 1991, commit
+27e2fb84680b9cc1), but the patch description makes no mention of their
+addition, let alone the story behind them.
+
+=end comment
+
The following rules apply:
=over