5 (when (args) (write-line 2 (join (map string (args)) " ")))
10 (join (map (curry format "%2x") (map char (explode STR)))))
13 ;; Print binary byte as octal or as ASCII character [32-126]
14 (define (octal-byte x)
15 (if (and (> x 31) (< x 127)) (char x) (format "\\%o" x)))
18 ;; Print string as binary octals
19 (define (octals-string S)
20 (join (map octal-byte (unpack (dup "b" (length S)) S))))
21 (global 'octals-string)
23 ;; Return byte code as printable or as code.
24 (define (human-byte B)
25 (if (and (> B 32) (< B 127)) (char B) B))
28 ;; Return a packed encoding of a list of bytes, joining string elements
29 (define (human-bytes BL)
30 (let ((OUT '()) (X nil))
31 (dolist (B (map human-byte BL))
32 (if (string? B) (if X (extend X B) (setf X B))
33 (begin (when (string? X) (push X OUT -1))
36 (when (string? X) (push X OUT -1))