start 2024, 2024-01

This commit is contained in:
2025-11-25 11:22:03 -08:00
parent ef109439e6
commit ca26da6b3b
56 changed files with 20577 additions and 22 deletions

22
2024/aoc.odin Normal file
View File

@@ -0,0 +1,22 @@
package aoc
import "core:log"
import "core:os"
import "core:strings"
Pair :: struct($T: typeid) {
a: $T,
b: $T,
}
slurp_file :: proc(path: string) -> string {
input, ok := os.read_entire_file(path)
if !ok {
log.fatal("Failed to read input")
}
return string(input)
}
slurp_lines :: proc(path: string) -> []string {
return strings.split_lines(slurp_file(path))
}