diff options
| author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-06-27 23:53:16 +0100 | 
|---|---|---|
| committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-17 14:14:38 +0100 | 
| commit | 14f428b3a38d0fb1a04de13055e08fc2a4536397 (patch) | |
| tree | 4cf89b0b268ee34c00b6ee41eb2d6a5c71ec8fc1 /2022 | |
| parent | 2013cb4f5fbb2aae4d4e7c15491f7aa4f8fcb1a1 (diff) | |
| download | advent-of-code-14f428b3a38d0fb1a04de13055e08fc2a4536397.tar.gz advent-of-code-14f428b3a38d0fb1a04de13055e08fc2a4536397.tar.bz2 advent-of-code-14f428b3a38d0fb1a04de13055e08fc2a4536397.zip | |
(*)~changed to relative file naming
Diffstat (limited to '2022')
| -rw-r--r-- | 2022/README.org | 2 | ||||
| -rw-r--r-- | 2022/puzzle-1.lisp | 2 | ||||
| -rw-r--r-- | 2022/puzzle-2.lisp | 2 | ||||
| -rw-r--r-- | 2022/puzzle-3.lisp | 2 | ||||
| -rw-r--r-- | 2022/puzzle-4.lisp | 2 | ||||
| -rw-r--r-- | 2022/puzzle-5.lisp | 2 | ||||
| -rw-r--r-- | 2022/puzzle-6.lisp | 2 | 
7 files changed, 7 insertions, 7 deletions
| diff --git a/2022/README.org b/2022/README.org index c12fa40..34bc12b 100644 --- a/2022/README.org +++ b/2022/README.org @@ -16,7 +16,7 @@ out that Common Lisps semantics around parsing are kinda weird.  To get input, use ~uiop:read-file-string~ (comes with ASDF,  quicklisp, so in most common lisp systems).  #+begin_src lisp -(defvar input (uiop:read-file-string "2022/1-input")) +(defvar input (uiop:read-file-string "1-input"))  #+end_src  Each "bag" in the data is separated by two newlines, so let's define diff --git a/2022/puzzle-1.lisp b/2022/puzzle-1.lisp index a53b599..46fd7a0 100644 --- a/2022/puzzle-1.lisp +++ b/2022/puzzle-1.lisp @@ -1,4 +1,4 @@ -(defvar input (uiop:read-file-string "2022/1-input")) +(defvar input (uiop:read-file-string "1-input"))  (defvar *sep (format nil "~%~%")) diff --git a/2022/puzzle-2.lisp b/2022/puzzle-2.lisp index b3b0155..a17fdb2 100644 --- a/2022/puzzle-2.lisp +++ b/2022/puzzle-2.lisp @@ -1,4 +1,4 @@ -(defvar input (uiop:read-file-string "2022/2-input")) +(defvar input (uiop:read-file-string "2-input"))  ;; Each newline represents a new round, which we should parse on the go  (defun sensible-convert-input (str) diff --git a/2022/puzzle-3.lisp b/2022/puzzle-3.lisp index c5ee3d3..e2e17cc 100644 --- a/2022/puzzle-3.lisp +++ b/2022/puzzle-3.lisp @@ -1,4 +1,4 @@ -(defvar input (uiop:read-file-string "2022/3-input")) +(defvar input (uiop:read-file-string "3-input"))  (defun split-string-in-two (s)    (let ((len (length s))) diff --git a/2022/puzzle-4.lisp b/2022/puzzle-4.lisp index 04c7bfb..e0d4469 100644 --- a/2022/puzzle-4.lisp +++ b/2022/puzzle-4.lisp @@ -4,7 +4,7 @@  ;; and since we're working with integers, it's simply checking if the  ;; bounds are included i.e. c in [a,b] and d in [a,b] -(defvar input (uiop:read-file-string "2022/4-input")) +(defvar input (uiop:read-file-string "4-input"))  (defun parse-bound (str)    "Given STR=\"a-b\" return (a b)" diff --git a/2022/puzzle-5.lisp b/2022/puzzle-5.lisp index 70c6bb6..0bcbdf3 100644 --- a/2022/puzzle-5.lisp +++ b/2022/puzzle-5.lisp @@ -1,4 +1,4 @@ -(defvar input (uiop:read-file-string "2022/5-input")) +(defvar input (uiop:read-file-string "5-input"))  ;; When we get two newlines, it means the end of the initial state and diff --git a/2022/puzzle-6.lisp b/2022/puzzle-6.lisp index b3fa458..8869495 100644 --- a/2022/puzzle-6.lisp +++ b/2022/puzzle-6.lisp @@ -1,4 +1,4 @@ -(defvar input (with-input-from-string (s (uiop:read-file-string "2022/6-input")) +(defvar input (with-input-from-string (s (uiop:read-file-string "6-input"))                  (read-line s nil)))  (defun is-unique (lst) | 
