Idiomdrottning’s homepage

salparse

Chicken Scheme’s egg tester (disgustingly named “salmonella”) creates log files that are sometimes difficult to parse.

Here’s a dumb li’l Unix filter, I’m not even making a repo or egg for it yet, that prints the output of the test step (or if install failed, the install step) of the log file.

(print
 ((?-> list? (c find string?))
  (find (fn (and (list? x)
                 (> (length x) 2)
                 (memq (second x) '(install test))))
        (reverse (read-list)))))