(*)~changed to relative file naming

This commit is contained in:
2023-06-27 23:53:16 +01:00
parent 2013cb4f5f
commit 14f428b3a3
7 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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 "~%~%"))

View File

@@ -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)

View File

@@ -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)))

View File

@@ -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)"

View File

@@ -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

View File

@@ -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)