From 34fb550be7d64e44d3b5b2249baafc38195af520 Mon Sep 17 00:00:00 2001 From: Martin Wickham Date: Tue, 23 Nov 2021 23:16:05 -0600 Subject: [PATCH] More fiddling with identifiers --- src/day01.zig | 9 +++++---- src/day02.zig | 7 ++++--- src/day03.zig | 7 ++++--- src/day04.zig | 7 ++++--- src/day05.zig | 7 ++++--- src/day06.zig | 7 ++++--- src/day07.zig | 7 ++++--- src/day08.zig | 7 ++++--- src/day09.zig | 7 ++++--- src/day10.zig | 7 ++++--- src/day11.zig | 7 ++++--- src/day12.zig | 7 ++++--- src/day13.zig | 7 ++++--- src/day14.zig | 7 ++++--- src/day15.zig | 7 ++++--- src/day16.zig | 7 ++++--- src/day17.zig | 7 ++++--- src/day18.zig | 7 ++++--- src/day19.zig | 7 ++++--- src/day20.zig | 7 ++++--- src/day21.zig | 7 ++++--- src/day22.zig | 7 ++++--- src/day23.zig | 7 ++++--- src/day24.zig | 7 ++++--- src/day25.zig | 7 ++++--- src/util.zig | 7 ++++--- 26 files changed, 105 insertions(+), 79 deletions(-) diff --git a/src/day01.zig b/src/day01.zig index ba223e9..919c34c 100644 --- a/src/day01.zig +++ b/src/day01.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; @@ -13,5 +14,5 @@ const gpa = util.gpa; const data = @embedFile("../data/day01.txt"); pub fn main() !void { - + } diff --git a/src/day02.zig b/src/day02.zig index 0b9592a..a272de9 100644 --- a/src/day02.zig +++ b/src/day02.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day03.zig b/src/day03.zig index 63d18c0..b900bf8 100644 --- a/src/day03.zig +++ b/src/day03.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day04.zig b/src/day04.zig index 09eb9cb..9d54417 100644 --- a/src/day04.zig +++ b/src/day04.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day05.zig b/src/day05.zig index c140c3a..ecff690 100644 --- a/src/day05.zig +++ b/src/day05.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day06.zig b/src/day06.zig index 1850184..93bf972 100644 --- a/src/day06.zig +++ b/src/day06.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day07.zig b/src/day07.zig index 35ae37a..ddc0ef0 100644 --- a/src/day07.zig +++ b/src/day07.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day08.zig b/src/day08.zig index b3ad817..e844618 100644 --- a/src/day08.zig +++ b/src/day08.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day09.zig b/src/day09.zig index ac6d11e..95702e7 100644 --- a/src/day09.zig +++ b/src/day09.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day10.zig b/src/day10.zig index 550f889..d0a1a5d 100644 --- a/src/day10.zig +++ b/src/day10.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day11.zig b/src/day11.zig index 5939986..774f658 100644 --- a/src/day11.zig +++ b/src/day11.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day12.zig b/src/day12.zig index 4754a18..b027d7b 100644 --- a/src/day12.zig +++ b/src/day12.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day13.zig b/src/day13.zig index b6c3459..9dbfd06 100644 --- a/src/day13.zig +++ b/src/day13.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day14.zig b/src/day14.zig index 719a6ac..3b59760 100644 --- a/src/day14.zig +++ b/src/day14.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day15.zig b/src/day15.zig index 255896c..9d50ab2 100644 --- a/src/day15.zig +++ b/src/day15.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day16.zig b/src/day16.zig index 92642b7..966970c 100644 --- a/src/day16.zig +++ b/src/day16.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day17.zig b/src/day17.zig index 1cb647d..d3048c7 100644 --- a/src/day17.zig +++ b/src/day17.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day18.zig b/src/day18.zig index aac11d7..f18f728 100644 --- a/src/day18.zig +++ b/src/day18.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day19.zig b/src/day19.zig index 90d7d75..76e3fbe 100644 --- a/src/day19.zig +++ b/src/day19.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day20.zig b/src/day20.zig index c0e7e11..3e637e4 100644 --- a/src/day20.zig +++ b/src/day20.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day21.zig b/src/day21.zig index 0241c6e..03cdde3 100644 --- a/src/day21.zig +++ b/src/day21.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day22.zig b/src/day22.zig index 820d4c8..782a434 100644 --- a/src/day22.zig +++ b/src/day22.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day23.zig b/src/day23.zig index 59cf2a9..ae7ddbf 100644 --- a/src/day23.zig +++ b/src/day23.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day24.zig b/src/day24.zig index b74efb3..5d7553f 100644 --- a/src/day24.zig +++ b/src/day24.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/day25.zig b/src/day25.zig index 3343eb0..2fc4e69 100644 --- a/src/day25.zig +++ b/src/day25.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; const util = @import("util.zig"); const gpa = util.gpa; diff --git a/src/util.zig b/src/util.zig index 09534fa..c484c05 100644 --- a/src/util.zig +++ b/src/util.zig @@ -2,10 +2,11 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const assert = std.debug.assert; const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.AutoHashMap; -const StringHashMap = std.StringHashMap; +const List = std.ArrayList; +const Map = std.AutoHashMap; +const StrMap = std.StringHashMap; const BitSet = std.DynamicBitSet; +const Str = []const u8; var gpa_impl = std.heap.GeneralPurposeAllocator(.{}){}; pub const gpa = &gpa_impl.allocator;