Advanced Search
Search Results
3 total results found
Chapter 11: Parsing System Logs
/var/log/auth.log on a busy SSH-exposed host grows at several megabytes per day. A year's worth of auth logs on a cluster's edge node is routinely 2–10GB. The naive approach — read_file_to_string/3, then string_codes/2, then a DCG over the entire code list — a...
Chapter 12: Declarative Configuration
Every configuration management tool in production infrastructure does the same thing: it takes a template, substitutes variables, and writes a string to disk. Ansible's template module renders Jinja2. Puppet uses ERB. Terraform interpolates HCL. The output is ...
Chapter 10: Definite Clause Grammars (DCGs)
A regular expression is a finite automaton description encoded as a write-only string. The engineer who writes ^(\d{1,3}\.){3}\d{1,3}$ cannot debug it by reading it. The engineer who inherits it cannot modify it without first reverse-engineering what it was at...