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
         child_values.add(res.value)
14
         child_values.add(res.value)
15
         metasum += res.metasum
15
         metasum += res.metasum
16
 
16
 
17
-    for m in 0..meta_count-1:
17
+    for m in 0 .. meta_count - 1:
18
         var v = input.pop.parseInt
18
         var v = input.pop.parseInt
19
         if v > 0 and v <= child_count:
19
         if v > 0 and v <= child_count:
20
             value += child_values[v - 1]
20
             value += child_values[v - 1]

+ 1
- 3
docker/Dockerfile View File

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

+ 1
- 1
run.sh View File

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