Skip to content

Commit c3bda58

Browse files
committed
Make "Hexdump" live
Closes #644
1 parent 7b86981 commit c3bda58

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

config/holes.toml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -755,20 +755,29 @@ preamble = '''
755755
inclusive, each on their own line.
756756
'''
757757

758-
['Hexdump']
758+
[Hexdump]
759759
category = 'Transform'
760-
experiment = 644
761-
links = []
762760
preamble = '''
763-
Given a string, output the hexdump of the string as given by the xxd utility using the default settings, as described below.
761+
<p>
762+
Given a string, output the hexdump of the string as given by the xxd
763+
utility using the default settings, as described below.
764+
765+
<p>
766+
Divide up the input string into groups of 16 bytes (16 octets). For each
767+
group, print in order:
764768
765-
Divide up the input string into groups of 16 bytes (16 octets). For each group, print in order:
766769
<ul>
767-
<li> The (hexadecimal, lowercase) index of the starting octet, padded with zeros to eight hexadecimal digits
768-
<li> A single colon (<code>:</code>), followed by a single space.
769-
<li> 8 space-separated pairs of octets, with each pair printed as 4 hexadecimal digits
770-
<li> Spaces to pad to 51 bytes
771-
<li> The original 16 bytes, except with newline replaced with full stop (<code>.</code>)
770+
<li>
771+
The (hexadecimal, lowercase) index of the starting octet, padded with
772+
zeros to eight hexadecimal digits
773+
<li>A single colon (<code>:</code>), followed by a single space.
774+
<li>
775+
8 space-separated pairs of octets, with each pair printed as 4
776+
hexadecimal digits
777+
<li>Spaces to pad to 51 bytes
778+
<li>
779+
The original 16 bytes, except with newline replaced with full stop
780+
(<code>.</code>)
772781
</ul>
773782
'''
774783

db/a-schema.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ CREATE TYPE hole AS ENUM (
2525
'catalan-numbers', 'catalans-constant', 'christmas-trees', 'css-colors',
2626
'cubes', 'diamonds', 'divisors', 'emirp-numbers', 'emojify',
2727
'evil-numbers', 'fibonacci', 'fizz-buzz', 'foo-fizz-buzz-bar',
28-
'fractions', 'happy-numbers', 'happy-numbers-long', 'intersection',
29-
'isbn', 'kolakoski-constant', 'kolakoski-sequence', 'leap-years',
30-
'levenshtein-distance', 'leyland-numbers', 'look-and-say',
28+
'fractions', 'happy-numbers', 'happy-numbers-long', 'hexdump',
29+
'intersection', 'isbn', 'kolakoski-constant', 'kolakoski-sequence',
30+
'leap-years', 'levenshtein-distance', 'leyland-numbers', 'look-and-say',
3131
'lucky-numbers', 'lucky-tickets', 'morse-decoder', 'morse-encoder',
3232
'musical-chords', 'niven-numbers', 'number-spiral', 'odious-numbers',
3333
'ordinal-numbers', 'pangram-grep', 'pascals-triangle',

0 commit comments

Comments
 (0)