Commit graph

4 commits

Author SHA1 Message Date
sterni
b8afed6dd4 refactor(sterni/aoc/2022/05): rank 2 array into list of lists w/ <˘
Change-Id: Ic536908bad5bb4af860ec53bd585ed74af3117af
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7557
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-12-10 20:51:35 +00:00
sterni
17e0a74e7b refactor(sterni/aoc/2022/05): improve parsing a bit
By taking advantage of filling (ironically) we can avoid creating a spec
in an ugly way. Additionally we transpose before parsing which doesn't
really make all that much of a difference, though.

Change-Id: Ida593138654f8367d666447f2b62013e8ddff01e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7535
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-12-06 14:45:48 +00:00
sterni
3f2172556a refactor(sterni/aoc/2022/05): improve _ApplyCmd
* take advantage of block header for destructuring

* instead of ModestTake we can split the stack we are picking from into
  what we need to move and what to keep, saving us from having to repeat
  ourselves.

* remove some unnecessary parens

Change-Id: I1b81a93a27d14dcbb6bdd109e862a356f611aca9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7530
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2022-12-05 21:45:16 +00:00
sterni
736edce338 feat(sterni/aoc/2022): day05 BQN solution
First input that is genuinely fun to parse in BQN. There surely is a
nice trick for _ApplyCmd, but this works and I'm unable to think today.

Change-Id: Iefccc81f1c1db03f45e31aaf7a1703ac0f91306f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7529
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-12-05 18:58:30 +00:00