Browse Source

Alpine wasn't that fast...

time(1) just shows fewer decimal places than bash's time, and
I didn't notice!
master
Chris Smith 5 years ago
parent
commit
f61e2149bd
3 changed files with 3 additions and 5 deletions
  1. 1
    1
      day08.nim
  2. 1
    3
      docker/Dockerfile
  3. 1
    1
      run.sh

+ 1
- 1
day08.nim View File

@@ -14,7 +14,7 @@ func readNode(input: var seq[string]): tuple[value: int, metasum: int] =
14 14
         child_values.add(res.value)
15 15
         metasum += res.metasum
16 16
 
17
-    for m in 0..meta_count-1:
17
+    for m in 0 .. meta_count - 1:
18 18
         var v = input.pop.parseInt
19 19
         if v > 0 and v <= child_count:
20 20
             value += child_values[v - 1]

+ 1
- 3
docker/Dockerfile View File

@@ -1,6 +1,4 @@
1
-FROM nimlang/nim:alpine
2
-
3
-RUN apk update && apk add bash
1
+FROM nimlang/nim:slim
4 2
 
5 3
 ADD entrypoint.sh /entrypoint.sh
6 4
 RUN chmod +x /entrypoint.sh

+ 1
- 1
run.sh View File

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-IMAGE=csmith/aoc-2018-05
3
+IMAGE=csmith/aoc-2018-06
4 4
 
5 5
 docker image inspect $IMAGE >/dev/null 2>&1
6 6
 if [ $? -ne 0 ]