File tree 4 files changed +28
-7
lines changed
4 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ have some inaccuracies in number parsing:
305
305
| C++/g++ (Boost.PropertyTree) | 2.515<sub >±0.009</sub > | 113.40<sub >±00.06</sub > + 1439.88<sub >±00.00</sub > | 107.37<sub >±01.05</sub > |
306
306
| Rust (jq) | 2.597<sub >±0.006</sub > | 113.50<sub >±00.06</sub > + 903.47<sub >±01.19</sub > | 108.44<sub >±00.97</sub > |
307
307
| C++/clang++ (Boost.PropertyTree) | 2.625<sub >±0.007</sub > | 195.14<sub >±00.06</sub > + 1232.62<sub >±00.00</sub > | 112.22<sub >±00.99</sub > |
308
+ | Odin | 2.824<sub >±0.003</sub > | 111.44<sub >±00.06</sub > + 20.00<sub >±00.00</sub > | 117.93<sub >±00.75</sub > |
308
309
| Ruby/jruby | 2.869<sub >±0.026</sub > | 469.56<sub >±03.09</sub > + 890.16<sub >±23.07</sub > | 146.96<sub >±02.03</sub > |
309
310
| Vala/gcc | 3.089<sub >±0.009</sub > | 115.31<sub >±00.06</sub > + 980.00<sub >±00.00</sub > | 131.83<sub >±00.56</sub > |
310
311
| Vala/clang | 3.094<sub >±0.006</sub > | 115.38<sub >±00.00</sub > + 980.00<sub >±00.00</sub > | 132.11<sub >±00.59</sub > |
@@ -447,6 +448,7 @@ Base Docker image: Debian GNU/Linux trixie/sid
447
448
| Nim | 2.2.0 |
448
449
| Node.js | v23.1.0 |
449
450
| OCaml | 5.2.0 |
451
+ | Odin | dev-2024-11-nightly |
450
452
| PHP | 8.2.24 |
451
453
| Perl | v5.40.0 |
452
454
| Python | 3.12.6 |
Original file line number Diff line number Diff line change @@ -286,6 +286,17 @@ RUN curl -Lo v_linux.zip \
286
286
&& rm v_linux.zip
287
287
ENV PATH="/root/bin/v/:${PATH}"
288
288
289
+ # https://github.com/odin-lang/Odin/releases
290
+ ARG ODIN=2024-11
291
+ RUN curl -Lo odin-linux-amd64-dev-$ODIN.zip \
292
+ https://github.com/odin-lang/Odin/releases/download/dev-$ODIN/odin-linux-amd64-dev-$ODIN.zip \
293
+ && unzip -q odin-linux-amd64-dev-$ODIN.zip \
294
+ && tar xf dist.tar.gz \
295
+ && rm dist.tar.gz odin-linux-amd64-dev-$ODIN.zip
296
+ # NOTE: the naming is inconsistent as resulting release archive name contains actual date
297
+ # So we may look into better ways to obtain packages, or use nightly directly
298
+ ENV PATH="/root/bin/odin-linux-amd64-nightly+$ODIN-04/:${PATH}"
299
+
289
300
# https://github.com/vlang/vsl and dependencies
290
301
# TODO - Install using specific VSL version as ARG
291
302
RUN v install vsl
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ class Test {
118
118
'Clojure' => -> { `clojure -M -e '(clojure-version)'` } ,
119
119
'Zig' => -> { `zig version` } ,
120
120
'Idris 2' => -> { `idris2 --version` . split [ -1 ] } ,
121
+ 'Odin' => -> { `odin version` . split [ -1 ] } ,
121
122
} . freeze
122
123
123
124
def pad ( num , str , padstr )
Original file line number Diff line number Diff line change @@ -26,14 +26,21 @@ calc :: proc(s: string) -> Coordinate {
26
26
panic (fmt.tprintf (" %v" , err))
27
27
}
28
28
29
- coord := Coordinate{}
30
- for c in j.coordinates {
31
- coord.x += c.x
32
- coord.y += c.y
33
- coord.z += c.z
29
+ x := 0.0
30
+ y := 0.0
31
+ z := 0.0
32
+ len := 0.0
33
+ for coord in j.coordinates {
34
+ x += coord.x
35
+ y += coord.y
36
+ z += coord.z
37
+ len += 1
38
+ }
39
+ return Coordinate{
40
+ x = x / len,
41
+ y = y / len,
42
+ z = z / len,
34
43
}
35
-
36
- return coord
37
44
}
38
45
39
46
main :: proc () {
You can’t perform that action at this time.
0 commit comments