From 57a73a13f7ae0c3ded4d94558c88ee730a6978f0 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Tue, 14 Dec 2021 22:15:50 +0100 Subject: [PATCH] auto install/update tools dependency --- aoc2018.nim | 4 ++-- aoc2018.nimble | 17 +++++++++++++++++ aoc2018.nims | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 aoc2018.nimble create mode 100644 aoc2018.nims diff --git a/aoc2018.nim b/aoc2018.nim index 7790a81..b2ccb21 100644 --- a/aoc2018.nim +++ b/aoc2018.nim @@ -3,7 +3,7 @@ import std/sequtils import tools/aoc let test: AOCDay = initAOCDay(1) -echo test.getInputInt().foldl(a + b) +printSolution(1, 1, test.getInputInt().foldl(a + b)) var seen: IntSet = initIntSet() var freq: int = 0 @@ -14,6 +14,6 @@ while not found: if freq notin seen: seen.incl(freq) else: - echo freq + printSolution(1, 2, freq) found = true break diff --git a/aoc2018.nimble b/aoc2018.nimble new file mode 100644 index 0000000..ef23efa --- /dev/null +++ b/aoc2018.nimble @@ -0,0 +1,17 @@ +import std/os + +# Package + +version = "0.1.0" +author = "Stefan Harmuth" +description = "aoc2018" +license = "GPL-3.0-or-later" +srcDir = "." +bin = @["aoc2018"] + + +# Dependencies + +rmDir(joinPath(getHomeDir(), "/.nimble/pkgs/tools-#head")) +requires "nim >= 1.6.0" +requires "ssh://git@leeloo.drock.de/nim-tools.git#head" diff --git a/aoc2018.nims b/aoc2018.nims new file mode 100644 index 0000000..2b300f4 --- /dev/null +++ b/aoc2018.nims @@ -0,0 +1 @@ +switch("define", "release")