Commit Graph

18 Commits

Author SHA1 Message Date
731e991f1f Support piping data in
This allows using someone else's data to compare runtimes, behavior, etc. without having to recompile. Since it's patched into the function that all days use to read, it's incompatible with running all days, which I feel is a reasonable compromise and behavior expectation.

The Mode() check is how the internet says you can test if you should even try to look at stdin, and the Size() check ensures that there's actually data to be read instead of just an open stdin handle (running in VSCode with a debugger seems to keep the stdin handle open, for example, so it passes the Mode() check and then hangs when trying to read since there's nothing to actually read).
2022-06-10 09:42:04 -05:00
c9cfffcc1c Show timing information when running all days 2022-06-10 09:15:08 -05:00
28ea3ff6a1 Handle an empty argument
This makes it slightly easier to adjust VSCode's launch.json to hop around debugging different days. Not much, but a little. And every little bit helps!
2022-06-09 13:17:51 -05:00
bc8ebae440 Day 4 solution
Plenty of room for optimization here, but it's enough for my needs for now.
2022-06-09 08:23:34 -05:00
a53e3467fe Make the linter happy
I mean, it's right, but still...
2022-06-08 18:03:08 -05:00
8ec5aafcc2 Day 3 solution
This is horrendous and slow. But it works. I really don't like grid problems.
2022-06-08 08:23:07 -05:00
2a8384949f I kinda like this Run method on the receiver 2022-06-07 22:54:57 -05:00
092fe15b07 Fix running "all" tests out of order sometimes
Maps are unordered, so this uses an array, which is simpler overall, really.
2022-06-07 22:54:11 -05:00
e8e9eeee02 Remove unnecessary breaks
I forgot that Go doesn't require these.
2022-06-07 20:41:41 -05:00
8cd4994300 More slight streamlining 2022-06-07 10:01:29 -05:00
dd5c072730 Make opcode constants
Just planning for the future...
2022-06-07 09:54:40 -05:00
9b65c91041 Add readme 2022-06-07 09:54:20 -05:00
93c9bc7d6f Day 2 initial solution
There's room to optimize part 2, but I wanted to commit my original brute-force solution first.
2022-06-07 09:26:21 -05:00
d2fbe85a71 Set to automatically run the most recent day 2022-06-07 09:14:24 -05:00
2f5dac4487 Add new day template 2022-06-06 15:33:26 -05:00
85da090c2b Output tweaks, fix day numbering 2022-06-06 15:30:58 -05:00
131fb0f03a Remove sleep added for timing testing 2022-06-06 15:18:26 -05:00
662d76eb7c Bootstrap and day 1 solution 2022-06-06 15:14:31 -05:00