+\ Advent of Code 2026 - Day 1
+
+
+
+
+\ 0 container-count+
+\ 0 container-count+
+\ 0 container-count+
+
+\ container-ids @ @ .s
+
+\ allocate a buffer
+\ read a file line by line
+\ for each line in the file
+\ parse the line into a container ID
+\ increment the container count for that id
+\ end for each line
+
+
+
+
+256 constant max-line
+
+create line-buffer
+ max-line 2 + allot
+
+create container-ids
+ 1024 cells allot
+
+: container-count+
+ cells
+ container-ids @ +
+ dup @ 1 +
+ swap !
+;
+
+
+s" 1.txt" r/o open-file
+\ line-buffer max-line fd-in read-line throw
+
+
+\ line-buffer ."
+
+\ .s
+\ bye ; *waves*