1.1. Prologue - Setup

Standard setup for AOC solutions.

;;;; Day06.lisp
;;;; 2025 AOC Day 6 solution
;;;; Common Lisp solutions by Leo Laporte (with lots of help)
;;;; Started: 06 Dec 2025 at 11:15
;;;; Finished:

;; —————————————————————————- ;; Prologue code for setup - same every day ;; —————————————————————————-

(defpackage :aoc.2025.day06 (:use :cl :alexandria :iterate) ; no prefix for these libraries (:local-nicknames ; short prefixes for these (:re :cl-ppcre) ; regex (:5a :fiveam) ; test framework (:sr :serapeum) ; CL extensions (:tr :trivia))) ; pattern matching

(in-package :aoc.2025.day06)

(setf 5a:run-test-when-defined t) ; test as we go (setf 5a:verbose-failures t) ; show failing expression (sr:toggle-pretty-print-hash-table) ; automatic pretty print for hashes (declaim (optimize (debug 3))) ; max debugging info ;; (declaim (optimize (speed 3)) ; max speed if needed

(defparameter data-file “~/cl/AOC/2025/Day06/input.txt” “Downloaded from the AoC problem set”)