-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathrun-all.sh
executable file
·110 lines (81 loc) · 1.97 KB
/
run-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh
[ $# -gt 0 ] || { echo "First arg (0 - 2000000000) is required."; exit 1; }
[ "$1" -eq "$1" ] 2>/dev/null || { echo "Must be a positive number not exceeding 2 billion."; exit 1; }
echo "The results are elapsed time in milliseconds"
echo "============================================"
if [ "$2" = "scoped" ]; then
echo "\nnode scoped:"
node hello.js $@ && \
node hello.js $@
echo "\ndart scoped:"
dart hello.dart $@ && \
dart hello.dart $@
exit 0
fi
echo "\nluajit:"
luajit hello.lua $@ && \
luajit hello.lua $@
echo "\nc:"
./c_hello $@ && \
./c_hello $@
echo "\ncpp:"
./cpp_hello $@ && \
./cpp_hello $@
echo "\nCommon Lisp via SBCL:"
./hello.lisp $@ && \
./hello.lisp $@
echo "\nzig:"
./zig_hello/zig_hello $@ && \
./zig_hello/zig_hello $@
echo "\nnim:"
./nim_hello $@ && \
./nim_hello $@
echo "\nv:"
./v_hello $@ && \
./v_hello $@
echo "\nrust:"
./rust_hello $@ && \
./rust_hello $@
echo "\nd:"
./d_hello $@ && \
./d_hello $@
echo "\nd ldc2:"
./d_ldc2_hello $@ && \
./d_ldc2_hello $@
echo "\nhaskell:"
./ghc_hello $@ && \
./ghc_hello $@
echo "\nocamlopt:"
./ocaml/test.nat $@ && \
./ocaml/test.nat $@
echo "\nocamlc:"
./ocaml/test.bc $@ && \
./ocaml/test.bc $@
# TODO: CoreCLR and natively running on Windows
echo "\ncsharp mono:"
mono ./csharp_hello.exe $@ && \
mono ./csharp_hello.exe $@
echo "\njava7:"
/usr/lib/jvm/java-7-oracle/bin/java -cp . jhello.Hello $@ && \
/usr/lib/jvm/java-7-oracle/bin/java -cp . jhello.Hello $@
echo "\njava8:"
/usr/lib/jvm/java-8-oracle/bin/java -cp . jhello.Hello $@ && \
/usr/lib/jvm/java-8-oracle/bin/java -cp . jhello.Hello $@
echo "\nnode:"
node hello.js $@ && \
node hello.js $@
echo "\ngo:"
./go_hello $@ && \
./go_hello $@
echo "\ndart:"
dart hello.dart $@ && \
dart hello.dart $@
echo "\nwren:"
./wren_hello hello.wren $@ && \
./wren_hello hello.wren $@
echo "\nelixir:"
elixir -r hello.ex -e "S.start" $@ && \
elixir -r hello.ex -e "S.start" $@
echo "\njulia:"
julia hello.jl $@ && \
julia hello.jl $@