use package core
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day1.txt");
contents_orig := contents;
defer cfree(contents_orig.data);
while num := 1; num > 0 {
// This sets num to be 0 if there is no number
- str.read_u32(^contents, ^num);
+ string.read_u32(^contents, ^num);
if num != 0 do array.push(^nums, num);
}
#include_file "core/std/wasi"
use package core
-use package core.str.reader as reader
+use package core.string.reader as reader
count_ending_paths :: proc (nums: [..] u32) -> u64 {
tally: [..] u64;
return tally[0];
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day10.txt");
defer cfree(contents.data);
--- /dev/null
+#include_file "core/std/wasi"
+
+use package core
+use package core.string.reader as reader
+
+GameOfSeats :: struct {
+ width : u32;
+ height : u32;
+ seats : [..] SeatState;
+ temp : [..] SeatState;
+}
+
+SeatState :: enum (u8) { OOB; Floor; Empty; Occupied; }
+
+gos_get_seat :: proc (use gos: ^GameOfSeats, x: i32, y: i32) -> SeatState {
+ if x < 0 || y < 0 || x >= width || y >= height do return SeatState.OOB;
+ return seats[x + y * width];
+}
+
+gos_set_temp :: proc (use gos: ^GameOfSeats, x: i32, y: i32, state: SeatState) {
+ if x < 0 || y < 0 || x >= width || y >= height do return;
+ temp[x + y * width] = state;
+}
+
+gos_neighbors :: proc (use gos: ^GameOfSeats, x: i32, y: i32, state := SeatState.Occupied) -> u32 {
+ count := 0;
+
+ for dy: -1 .. 2 {
+ for dx: -1 .. 2 {
+ if dy == 0 && dx == 0 do continue;
+
+ t := 1;
+ seat := gos_get_seat(gos, x + dx, y + dy);
+ while seat == SeatState.Floor {
+ t += 1;
+ seat = gos_get_seat(gos, x + dx * t, y + dy * t);
+ }
+
+ if seat == state do count += 1;
+ }
+ }
+
+ return count;
+}
+
+gos_iter :: proc (use gos: ^GameOfSeats) -> bool {
+ for i: 0 .. seats.count do temp[i] = seats[i];
+
+ changed := false;
+ for y: 0 .. height {
+ for x: 0 .. width {
+ occ_neighbors := gos_neighbors(gos, x, y);
+
+ switch gos_get_seat(gos, x, y) {
+ case SeatState.Empty do if occ_neighbors == 0 {
+ gos_set_temp(gos, x, y, SeatState.Occupied);
+ changed = true;
+ }
+
+ case SeatState.Occupied do if occ_neighbors >= 5 {
+ gos_set_temp(gos, x, y, SeatState.Empty);
+ changed = true;
+ }
+ }
+ }
+ }
+
+ for i: 0 .. seats.count do seats[i] = temp[i];
+
+ return changed;
+}
+
+main :: proc (args: [] cstr) {
+ contents := file.get_contents("input/day11.txt");
+ defer cfree(contents.data);
+
+ file := reader.make(contents);
+
+ gos : GameOfSeats;
+ array.init(^gos.seats, 32);
+ defer array.free(^gos.seats);
+
+ gos.height = 0;
+
+ while !reader.empty(^file) {
+ line := reader.read_line(^file);
+ for ch: line do switch ch {
+ case #char "." do array.push(^gos.seats, SeatState.Floor);
+ case #char "L" do array.push(^gos.seats, SeatState.Empty);
+ case #char "#" do array.push(^gos.seats, SeatState.Occupied);
+ }
+
+ gos.width = line.count;
+ gos.height += 1;
+ }
+
+ array.init(^gos.temp, gos.seats.count);
+ defer array.free(^gos.temp);
+
+ while gos_iter(^gos) ---
+
+ occupied := 0;
+ for s: gos.seats do if s == SeatState.Occupied do occupied += 1;
+
+ printf("Occupied: %i\n", occupied);
+}
+
use package core
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day2.txt");
contents_orig := contents;
defer cfree(contents_orig.data);
lo : u32;
hi : u32;
ch : u8;
- pw : string = "";
+ pw : str = "";
while true {
- str.read_u32(^contents, ^lo);
+ string.read_u32(^contents, ^lo);
if lo == 0 do break;
- str.discard_chars(^contents);
- str.read_u32(^contents, ^hi);
- str.discard_chars(^contents);
- str.read_char(^contents, ^ch);
- str.discard_chars(^contents, 2);
- str.read_line(^contents, ^pw);
+ string.discard_chars(^contents);
+ string.read_u32(^contents, ^hi);
+ string.discard_chars(^contents);
+ string.read_char(^contents, ^ch);
+ string.discard_chars(^contents, 2);
+ string.read_line(^contents, ^pw);
// Part 1
// count := 0;
return Point.{ ox + dx * t, oy + dy * t };
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day3.txt");
contents_orig := contents;
defer cfree(contents_orig.data);
width := 0;
height := 0;
while true {
- line: string = "";
- str.read_line(^contents, ^line);
+ line := "";
+ string.read_line(^contents, ^line);
if line.count == 0 do break;
width = line.count;
use package core
// Returns the number of fields
-process_passport :: proc (contents: ^string) -> u32 {
+process_passport :: proc (contents: ^str) -> u32 {
field_count := 0;
while true {
- line: string;
- str.read_line(contents, ^line);
+ line: str;
+ string.read_line(contents, ^line);
if line.count == 0 do break;
- fields := str.split(line, #char " ");
+ fields := string.split(line, #char " ");
defer cfree(fields.data);
for field: fields {
- data := str.split(field, #char ":");
+ data := string.split(field, #char ":");
defer cfree(data.data);
- if !str.equal(data[0], "cid") {
+ if !string.equal(data[0], "cid") {
field_count += 1;
}
}
// This does not include part 2 because it is gross and
// not worth the effort to implement it.
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day4.txt");
contents_data := contents.data;
defer cfree(contents_data);
use package core
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day5.txt");
contents_data := contents.data;
defer cfree(contents_data);
max_val := 0;
while true {
- line: string;
- str.read_line(^contents, ^line);
+ line: str;
+ string.read_line(^contents, ^line);
if line.count == 0 do break;
val := 0;
use package core
-part_1 :: proc (contents: ^string) -> u32 {
+part_1 :: proc (contents: ^str) -> u32 {
chars : [26] bool;
for ^ch: chars do *ch = false;
while true {
- line: string;
- str.read_line(contents, ^line);
+ line: str;
+ string.read_line(contents, ^line);
if line.count == 0 do break;
for ch: line do chars[~~ch - cast(u32) #char "a"] = true;
return sum;
}
-part_2 :: proc (contents: ^string) -> u32 {
+part_2 :: proc (contents: ^str) -> u32 {
chars : [26] u32;
for ^ch: chars do *ch = 0;
person_count := 0;
while true {
- line: string;
- str.read_line(contents, ^line);
+ line: str;
+ string.read_line(contents, ^line);
if line.count == 0 do break;
person_count += 1;
return sum;
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day6.txt");
contents_data := contents.data;
defer cfree(contents_data);
#include_file "core/std/wasi"
use package core
+use package core.string.reader as reader
BagGraph :: struct {
nodes : [..] ^BagNode;
}
BagNode :: struct {
- color : string;
+ color : str;
// Part 1
// contained_in : [..] BagContainment;
strmap.free(^node_map);
}
-bg_get_node :: proc (use graph: ^BagGraph, name: string) -> ^BagNode {
+bg_get_node :: proc (use graph: ^BagGraph, name: str) -> ^BagNode {
node := strmap.get(^node_map, name);
if node == null {
node.color = name;
array.push(^nodes, node);
- strmap.put(^node_map, name, node);
+ strmap.put(^node_map, node.color, node);
}
return node;
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day7.txt");
- contents_data := contents.data;
- defer cfree(contents_data);
+ defer cfree(contents.data);
+
+ file := reader.make(contents);
graph : BagGraph;
bg_init(^graph);
defer bg_free(^graph);
while true {
- name := str.read_until(^contents, #char " ", 1);
+ name := reader.read_until(^file, 1, #char " ");
if name.count == 0 do break;
container := bg_get_node(^graph, name);
- str.read_until(^contents, #char " ", 2);
+ reader.read_until(^file, 2, #char " ");
while true {
- if str.starts_with(contents, " no") do break;
+ if reader.starts_with(^file, " no") do break;
- count : u32;
- str.read_u32(^contents, ^count);
- str.discard_chars(^contents, 1);
+ count := reader.read_u32(^file);
+ reader.skip_bytes(^file, 1);
- contained_name := str.read_until(^contents, #char " ", 1);
+ contained_name := reader.read_until(^file, 1, #char " ");
contained := bg_get_node(^graph, contained_name);
// Part 1
count = count
});
- bag_word := str.read_until_either(^contents, 1, #char " ", #char "\n");
+ bag_word := reader.read_until(^file, 1, #char " ", #char "\n");
if bag_word[bag_word.count - 1] == #char "." do break;
}
- str.advance_line(^contents);
+ reader.advance_line(^file);
}
-
+
// Part 1
// to_process_bags : [..] ^BagNode;
// processed_bags: [..] ^BagNode;
#include_file "core/std/wasi"
use package core
-use package core.str.reader as reader
+use package core.string.reader as reader
OpCode :: enum (u16) {
Nop; Acc; Jmp;
return succ;
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day8.txt");
defer cfree(contents.data);
if sign == #char "-" do val *= -1;
opcode : OpCode;
- if str.equal(word, "nop") do opcode = OpCode.Nop;
- elseif str.equal(word, "acc") do opcode = OpCode.Acc;
- elseif str.equal(word, "jmp") do opcode = OpCode.Jmp;
+ if string.equal(word, "nop") do opcode = OpCode.Nop;
+ elseif string.equal(word, "acc") do opcode = OpCode.Acc;
+ elseif string.equal(word, "jmp") do opcode = OpCode.Jmp;
array.push(^instrs, Instruction.{
opcode = opcode,
#include_file "core/std/wasi"
use package core
-use package core.str.reader as reader
+use package core.string.reader as reader
StartEnd :: struct { start: i32; end: i32; }
return StartEnd.{ start, end };
}
-main :: proc (args: [] cstring) {
+main :: proc (args: [] cstr) {
contents := file.get_contents("input/day9.txt");
defer cfree(contents.data);
--- /dev/null
+LLLLL.LLLLLL.LLLLLLLLL.LLL.LL.LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLL.LLLLLLLLLL.LLLLLLL
+LLLLL.LLLLLL.LLLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLL.LLLLLL.LLLL.LLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLLLLLL
+LLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLL.LLLLLL.LLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLLLL
+LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLL.LLLL.L.LLLLLLLLLLLLLLLLLLLLLLLLL.LLL.LLLL
+LLLLL.L.LLLL.LLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLL.LLLL.L.LLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLLLL
+L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