about summary refs log tree commit diff
path: root/users/sterni/exercises/aoc/2022/nix.nix
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-12-28T11·56+0100
committerclbot <clbot@tvl.fyi>2022-12-28T12·20+0000
commit6aafe2a223c00755d71cbc86bbabfe54d95611d3 (patch)
tree6840d0ae6e8b93756b0eb516bb41c00e5ee7f35b /users/sterni/exercises/aoc/2022/nix.nix
parent7163d3ad37105a97fdc7afdf4ad0da7579494fab (diff)
chore(sterni/aoc/2022): nuke Nix solutions r/5521
Didn't end up happening due to a lack of motivation. Will try to finish
the BQN AoC still, though.

Change-Id: Ib296aec9f3cfeef57c79a9ba09fc664c1a19dcff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7661
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/sterni/exercises/aoc/2022/nix.nix')
-rw-r--r--users/sterni/exercises/aoc/2022/nix.nix30
1 files changed, 0 insertions, 30 deletions
diff --git a/users/sterni/exercises/aoc/2022/nix.nix b/users/sterni/exercises/aoc/2022/nix.nix
deleted file mode 100644
index ca8bfc6e57df..000000000000
--- a/users/sterni/exercises/aoc/2022/nix.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ lib ? import <nixpkgs/lib> }:
-
-let
-  chomp = lib.removeSuffix "\n";
-  lines = s: builtins.filter builtins.isString (builtins.split "\n" (chomp s));
-  sum = builtins.foldl' builtins.add 0;
-
-  day01 =
-    let
-      input =
-        builtins.map
-          (elf:
-            sum (builtins.map builtins.fromJSON (lines elf))
-          )
-          (
-            builtins.filter builtins.isString (
-              builtins.split "\n\n" (builtins.readFile ./01/input)
-            )
-          );
-    in
-    {
-      "1" = builtins.foldl' lib.max (-1) input;
-      "2" = sum (lib.sublist 0 3 (lib.sort (a: b: a >= b) input));
-    };
-
-in
-
-{
-  inherit day01;
-}