about summary refs log tree commit diff
path: root/users/sterni
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
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')
-rw-r--r--users/sterni/exercises/aoc/2022/README.md4
-rw-r--r--users/sterni/exercises/aoc/2022/default.nix24
-rw-r--r--users/sterni/exercises/aoc/2022/nix.nix30
3 files changed, 2 insertions, 56 deletions
diff --git a/users/sterni/exercises/aoc/2022/README.md b/users/sterni/exercises/aoc/2022/README.md
index 9274265305..65d51dd21f 100644
--- a/users/sterni/exercises/aoc/2022/README.md
+++ b/users/sterni/exercises/aoc/2022/README.md
@@ -3,6 +3,6 @@
 I'm trying to do it in BQN again to redeem myself for my unfinished [AoC 2021](../2021),
 but will allow myself falling back to another language if I get stuck, so I actually
 complete this one.
-I also plan to write additional solutions in Nix (when I have the time) in order to
-throw `//tvix/eval` against some new problems.
+~~I also plan to write additional solutions in Nix (when I have the time) in order to
+throw `//tvix/eval` against some new problems.~~
 We'll see how it goes, as my December promises to be quite busy.
diff --git a/users/sterni/exercises/aoc/2022/default.nix b/users/sterni/exercises/aoc/2022/default.nix
index 82d743428a..77b3372847 100644
--- a/users/sterni/exercises/aoc/2022/default.nix
+++ b/users/sterni/exercises/aoc/2022/default.nix
@@ -13,7 +13,6 @@ depot.nix.readTree.drvTargets {
     packages = [
       cbqn
       ngn-k
-      depot.tvix.eval
     ];
 
     BQNLIBS = pkgs.fetchFromGitHub {
@@ -49,27 +48,4 @@ depot.nix.readTree.drvTargets {
     ''
       find "$aoc/2022" -name '*.bqn' -exec BQN {} \; | tee "$out"
     '';
-
-  nix = import ./nix.nix { inherit lib; };
-
-  tvixed-nix = pkgs.runCommand "tvix-aoc-2022"
-    {
-      nativeBuildInputs = [
-        depot.tvix.eval
-      ];
-      solutions = builtins.path {
-        name = "nix-aoc-2022";
-        path = ./.;
-        filter = path: type:
-          type == "directory"
-          || lib.hasSuffix "nix.nix" path
-          || lib.hasSuffix "/input" path;
-      };
-
-      inherit meta;
-    }
-    ''
-      tvix-eval -E "import $solutions/nix.nix { lib = import ${pkgs.path}/lib; }" \
-        | tee "$out"
-    '';
 }
diff --git a/users/sterni/exercises/aoc/2022/nix.nix b/users/sterni/exercises/aoc/2022/nix.nix
deleted file mode 100644
index ca8bfc6e57..0000000000
--- 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;
-}