summaryrefslogtreecommitdiff
path: root/password-philosophy/main.scm
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-06-09 20:28:10 -0600
committerbd <bdunahu@operationnull.com>2024-06-09 20:28:10 -0600
commitf3ae22b302a298984df62a4aaba275c15d010072 (patch)
tree099398ef5ca7b1f462d54ba78b02e0999bdf2078 /password-philosophy/main.scm
parent2c85332e1e402653ed44ea1a5248cb7d11259389 (diff)
AoC 2020.2 p1
Diffstat (limited to 'password-philosophy/main.scm')
-rw-r--r--password-philosophy/main.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/password-philosophy/main.scm b/password-philosophy/main.scm
new file mode 100644
index 0000000..fd62ba8
--- /dev/null
+++ b/password-philosophy/main.scm
@@ -0,0 +1,16 @@
+;; -*- compile-command: "guile -L . -e main -s main.scm < input.txt"; -*-
+(use-modules (pp)
+ ((ice-9 rdelim))
+ (ice-9 binary-ports))
+
+
+(define (stdin-to-str)
+ (let loop ((result ""))
+ (let ((line (read-line)))
+ (if (eof-object? line)
+ result
+ (loop (string-append result line "\n"))))))
+
+(define (main args)
+ (display (pp (stdin-to-str)))
+ (newline))