From 124a864e52605c9c7cd588739f94f979d6f188c3 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Thu, 30 Nov 2023 21:41:08 +0100 Subject: [PATCH] Update for 2023 --- .gitmodules | 3 +++ 2022/README.md | 55 +++++++++++++++++++++++++++++++++++++++++ 2023/benchmark | 20 +++++++++++++++ 2023/chvp | 1 + 2023/complete-benchmark | 30 ++++++++++++++++++++++ README.md | 22 +++++------------ 6 files changed, 115 insertions(+), 16 deletions(-) create mode 100644 2022/README.md create mode 100755 2023/benchmark create mode 160000 2023/chvp create mode 100755 2023/complete-benchmark diff --git a/.gitmodules b/.gitmodules index 79585ce..4564bbe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -161,3 +161,6 @@ [submodule "2022/iasoon"] path = 2022/iasoon url = https://github.com/iasoon/aoc2022.git +[submodule "2023/chvp"] + path = 2023/chvp + url = https://github.com/chvp/aoc2023.git diff --git a/2022/README.md b/2022/README.md new file mode 100644 index 0000000..f1c8570 --- /dev/null +++ b/2022/README.md @@ -0,0 +1,55 @@ +# De Zeus Advent of Code + +| Wie? | Waar? (Repository) | Taal? | +|:-----------|:------------------------------------------------:|-------------------:| +| chvp | https://github.com/chvp/aoc2022 | Haskell | +| hvdncamp | https://github.com/hvdncamp/adventofcode-2022 | C | +| mcbloch | https://gitlab.com/mcbloch/aoc2022 | Clojure (Babashka) | +| fbegyn | https://github.com/fbegyn/aoc2022 | Go/Ruby | +| Mraedis | https://github.com/Mraedis/AoC2022 | Ruby | +| silvius | https://github.com/ajuvercr/advent-of-code | Rust | +| robe | https://github.com/SchrodingersCat00/aoc2022.git | Rust | +| niknetniko | https://github.com/niknetniko/AdventOfCode | C | +| jaspervdj | https://github.com/jaspervdj/advent-of-code | Haskell | +| s-minoo | https://github.com/s-minoo/advent-of-code | Rust | +| iasoon | https://github.com/iasoon/aoc2022 | Rust | + + +* repo clonen: + + ```sh + git clone git@github.com:ZeusWPI/Advent-of-Code-Aggregator.git + git submodule init 2022 # just the current year + git submodule update + ``` + +* nieuwe persoon toevoegen: + + ```sh + cd 2022 + git submodule add + git commit -m 'hey guys ik heb een repo toegevoegd' + ``` + +* uw lokale kopie updaten: + + ```sh + git pull # duh + git submodule update + ``` + +* van alle submodules de nieuwste versie binnenhalen (zelfs als mensen *force push*en): + + ```sh + git submodule foreach git fetch origin + git submodule foreach git reset --hard origin/HEAD > /dev/null 2>&1 + git add * # oh no + git commit -m 'update submodules' + ``` + +* benchmarks uitvoeren: + + ```sh + cd 2022 + ./complete-benchmark + ``` diff --git a/2023/benchmark b/2023/benchmark new file mode 100755 index 0000000..681cbef --- /dev/null +++ b/2023/benchmark @@ -0,0 +1,20 @@ +#!/bin/sh +day="$(printf '%02d' ${1##0})" +part="$2" +inputfile="$PWD/../inputs/${day}.txt" + +[ -x "prepare" ] || exit 0 + +if ! ./prepare "$day" "$part" "$inputfile"; then + echo 'eh ge hebt precies niet alles geïnstalleerd staan' +else + if [ -x "run" ]; then + hyperfine "./run '$day' '$part' '$inputfile'" + fi +fi + +if [ -x "clean" ]; then + ./clean +fi + +true diff --git a/2023/chvp b/2023/chvp new file mode 160000 index 0000000..68d2ef2 --- /dev/null +++ b/2023/chvp @@ -0,0 +1 @@ +Subproject commit 68d2ef220a426d5c315049a6d834f5f27cd06591 diff --git a/2023/complete-benchmark b/2023/complete-benchmark new file mode 100755 index 0000000..7204b36 --- /dev/null +++ b/2023/complete-benchmark @@ -0,0 +1,30 @@ +#!/bin/sh +day="$(printf '%02d' ${1##0})" +part="$2" + +inputfile="$PWD/inputs/${day}.txt" + +if ! test -f "$inputfile"; then + echo "no input available" >&2 + exit 1 +fi + +for dir in *; do + if test -d "$dir"; then + cd "$dir" + if test -x ./prepare; then + echo "---------------------------------------------------------------------------------- $dir" + if ! ./prepare "$day" "$part" >&2; then + echo 'eh ge hebt precies niet alles geïnstalleerd staan' + else + if test -x run; then + hyperfine -n "$dir" "./run '$day' '$part' '$inputfile'" + fi + fi + fi + if test -x ./clean; then + ./clean "$day" "$part" "$inputfile" + fi + cd - > /dev/null 2>&1 + fi +done diff --git a/README.md b/README.md index f1c8570..7583e83 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,22 @@ # De Zeus Advent of Code -| Wie? | Waar? (Repository) | Taal? | -|:-----------|:------------------------------------------------:|-------------------:| -| chvp | https://github.com/chvp/aoc2022 | Haskell | -| hvdncamp | https://github.com/hvdncamp/adventofcode-2022 | C | -| mcbloch | https://gitlab.com/mcbloch/aoc2022 | Clojure (Babashka) | -| fbegyn | https://github.com/fbegyn/aoc2022 | Go/Ruby | -| Mraedis | https://github.com/Mraedis/AoC2022 | Ruby | -| silvius | https://github.com/ajuvercr/advent-of-code | Rust | -| robe | https://github.com/SchrodingersCat00/aoc2022.git | Rust | -| niknetniko | https://github.com/niknetniko/AdventOfCode | C | -| jaspervdj | https://github.com/jaspervdj/advent-of-code | Haskell | -| s-minoo | https://github.com/s-minoo/advent-of-code | Rust | -| iasoon | https://github.com/iasoon/aoc2022 | Rust | +| Wie? | Waar? (Repository) | Taal? | +|:-----|:-------------------------------:|------:| +| chvp | https://github.com/chvp/aoc2023 | C | * repo clonen: ```sh git clone git@github.com:ZeusWPI/Advent-of-Code-Aggregator.git - git submodule init 2022 # just the current year + git submodule init 2023 # just the current year git submodule update ``` * nieuwe persoon toevoegen: ```sh - cd 2022 + cd 2023 git submodule add git commit -m 'hey guys ik heb een repo toegevoegd' ``` @@ -50,6 +40,6 @@ * benchmarks uitvoeren: ```sh - cd 2022 + cd 2023 ./complete-benchmark ```