Skip to content

Commit 9b81f25

Browse files
Use only Nim programming language.
1 parent c97aacb commit 9b81f25

File tree

5 files changed

+17
-647
lines changed

5 files changed

+17
-647
lines changed

Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
FROM judge0/api-base:0.3.0
1+
FROM judge0/api-base:nim0.20.0
22

3-
RUN echo "deb http://deb.debian.org/debian jessie main" > /etc/apt/sources.list && \
4-
echo "deb http://security.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list && \
5-
rm -rf /etc/apt/sources.list.d/* && \
3+
RUN curl -fSsL "https://deb.nodesource.com/setup_12.x" | bash - && \
64
apt-get update && \
75
apt-get install -y --no-install-recommends \
86
libpq-dev \
9-
nodejs-legacy \
10-
npm \
7+
nodejs \
118
sudo && \
129
rm -rf /var/lib/apt/lists/*
1310

14-
ENV PATH "/usr/local/ruby-2.3.3/bin:/opt/.gem/bin:$PATH"
11+
ENV PATH "/usr/local/ruby-2.6.3/bin:/opt/.gem/bin:$PATH"
1512
ENV GEM_HOME "/opt/.gem/"
1613
RUN echo "gem: --no-document" > /root/.gemrc && \
1714
gem install \
1815
rails:5.0.0 \
1916
bundler:1.15.4 \
2017
pg:0.18 && \
21-
npm install -g aglio@2.3.0
18+
npm install -g --unsafe-perm aglio@2.3.0
2219

2320
EXPOSE 3000
2421

@@ -33,4 +30,4 @@ RUN RAILS_ENV=production bundle && \
3330
CMD ["./scripts/run-server"]
3431

3532
LABEL maintainer="Herman Zvonimir Došilović, hermanz.dosilovic@gmail.com"
36-
LABEL version="1.2.0"
33+
LABEL version="1.2.0-nim0.20.0"

db/seeds.rb

Lines changed: 3 additions & 286 deletions
Original file line numberDiff line numberDiff line change
@@ -1,293 +1,10 @@
11
languages = [
22
{
3-
name: "Bash (4.4)",
4-
source_file: "script.sh",
5-
run_cmd: "/usr/local/bash-4.4/bin/bash script.sh"
6-
},
7-
{
8-
name: "Bash (4.0)",
9-
source_file: "script.sh",
10-
run_cmd: "/usr/local/bash-4.0/bin/bash script.sh"
11-
},
12-
13-
14-
{
15-
name: "Basic (fbc 1.05.0)",
16-
source_file: "main.bas",
17-
compile_cmd: "/usr/local/fbc-1.05.0/bin/fbc main.bas",
18-
run_cmd: "./main"
19-
},
20-
21-
22-
{
23-
name: "C (gcc 7.2.0)",
24-
source_file: "main.c",
25-
compile_cmd: "/usr/local/gcc-7.2.0/bin/gcc main.c -lm",
26-
run_cmd: "./a.out"
27-
},
28-
{
29-
name: "C (gcc 6.4.0)",
30-
source_file: "main.c",
31-
compile_cmd: "/usr/local/gcc-6.4.0/bin/gcc main.c -lm",
32-
run_cmd: "./a.out"
33-
},
34-
{
35-
name: "C (gcc 6.3.0)",
36-
source_file: "main.c",
37-
compile_cmd: "/usr/local/gcc-6.3.0/bin/gcc main.c -lm",
38-
run_cmd: "./a.out"
39-
},
40-
{
41-
name: "C (gcc 5.4.0)",
42-
source_file: "main.c",
43-
compile_cmd: "/usr/local/gcc-5.4.0/bin/gcc main.c -lm",
44-
run_cmd: "./a.out"
45-
},
46-
{
47-
name: "C (gcc 4.9.4)",
48-
source_file: "main.c",
49-
compile_cmd: "/usr/local/gcc-4.9.4/bin/gcc main.c -lm",
50-
run_cmd: "./a.out"
51-
},
52-
{
53-
name: "C (gcc 4.8.5)",
54-
source_file: "main.c",
55-
compile_cmd: "/usr/local/gcc-4.8.5/bin/gcc main.c -lm",
56-
run_cmd: "./a.out"
57-
},
58-
59-
60-
{
61-
name: "C++ (g++ 7.2.0)",
62-
source_file: "main.cpp",
63-
compile_cmd: "/usr/local/gcc-7.2.0/bin/g++ -Wl,-rpath,/usr/local/gcc-7.2.0/lib64 main.cpp",
64-
run_cmd: "./a.out"
65-
},
66-
{
67-
name: "C++ (g++ 6.4.0)",
68-
source_file: "main.cpp",
69-
compile_cmd: "/usr/local/gcc-6.4.0/bin/g++ -Wl,-rpath,/usr/local/gcc-6.4.0/lib64 main.cpp",
70-
run_cmd: "./a.out"
71-
},
72-
{
73-
name: "C++ (g++ 6.3.0)",
74-
source_file: "main.cpp",
75-
compile_cmd: "/usr/local/gcc-6.3.0/bin/g++ -Wl,-rpath,/usr/local/gcc-6.3.0/lib64 main.cpp",
76-
run_cmd: "./a.out"
77-
},
78-
{
79-
name: "C++ (g++ 5.4.0)",
80-
source_file: "main.cpp",
81-
compile_cmd: "/usr/local/gcc-5.4.0/bin/g++ -Wl,-rpath,/usr/local/gcc-5.4.0/lib64 main.cpp",
82-
run_cmd: "./a.out"
83-
},
84-
{
85-
name: "C++ (g++ 4.9.4)",
86-
source_file: "main.cpp",
87-
compile_cmd: "/usr/local/gcc-4.9.4/bin/g++ -Wl,-rpath,/usr/local/gcc-4.9.4/lib64 main.cpp",
88-
run_cmd: "./a.out"
89-
},
90-
{
91-
name: "C++ (g++ 4.8.5)",
92-
source_file: "main.cpp",
93-
compile_cmd: "/usr/local/gcc-4.8.5/bin/g++ -Wl,-rpath,/usr/local/gcc-4.8.5/lib64 main.cpp",
94-
run_cmd: "./a.out"
95-
},
96-
97-
98-
{
99-
name: "C# (mono 5.4.0.167)",
100-
source_file: "Main.cs",
101-
compile_cmd: "/usr/local/mono-5.4.0.167/bin/mcs Main.cs",
102-
run_cmd: "/usr/local/mono-5.4.0.167/bin/mono Main.exe"
103-
},
104-
{
105-
name: "C# (mono 5.2.0.224)",
106-
source_file: "Main.cs",
107-
compile_cmd: "/usr/local/mono-5.2.0.224/bin/mcs Main.cs",
108-
run_cmd: "/usr/local/mono-5.2.0.224/bin/mono Main.exe"
109-
},
110-
111-
112-
{
113-
name: "Clojure (1.8.0)",
114-
source_file: "main.clj",
115-
run_cmd: "/usr/bin/java -cp /usr/local/clojure-1.8.0/clojure-1.8.0.jar clojure.main main.clj"
116-
},
117-
118-
119-
{
120-
name: "Crystal (0.23.1)",
121-
source_file: "main.cr",
122-
compile_cmd: "/usr/local/crystal-0.23.1-3/bin/crystal build main.cr",
3+
name: "Nim (0.20.0)",
4+
source_file: "main.nim",
5+
compile_cmd: "/usr/local/nim-0.20.0/bin/nim compile main.nim",
1236
run_cmd: "./main"
1247
},
125-
126-
127-
{
128-
name: "Elixir (1.5.1)",
129-
source_file: "main.exs",
130-
run_cmd: "/usr/local/elixir-1.5.1/bin/elixir main.exs"
131-
},
132-
133-
134-
{
135-
name: "Erlang (OTP 20.0)",
136-
source_file: "main.erl",
137-
compile_cmd: "/bin/sed -i \"s/^/\\n/\" main.erl",
138-
run_cmd: "/usr/local/erlang-20.0/bin/escript main.erl"
139-
},
140-
141-
142-
{
143-
name: "Go (1.9)",
144-
source_file: "main.go",
145-
compile_cmd: "/usr/local/go-1.9/bin/go build main.go",
146-
run_cmd: "./main"
147-
},
148-
149-
150-
{
151-
name: "Haskell (ghc 8.2.1)",
152-
source_file: "main.hs",
153-
compile_cmd: "/usr/local/ghc-8.2.1/bin/ghc main.hs -o a.out",
154-
run_cmd: "./a.out"
155-
},
156-
{
157-
name: "Haskell (ghc 8.0.2)",
158-
source_file: "main.hs",
159-
compile_cmd: "/usr/local/ghc-8.0.2/bin/ghc main.hs -o a.out",
160-
run_cmd: "./a.out"
161-
},
162-
163-
164-
{
165-
name: "Insect (5.0.0)",
166-
source_file: "main.ins",
167-
run_cmd: "/usr/local/insect-5.0.0/insect main.ins"
168-
},
169-
170-
171-
{
172-
name: "Java (OpenJDK 9 with Eclipse OpenJ9)",
173-
source_file: "Main.java",
174-
compile_cmd: "/usr/local/openjdk9-openj9/bin/javac Main.java",
175-
run_cmd: "/usr/local/openjdk9-openj9/bin/java Main"
176-
},
177-
{
178-
name: "Java (OpenJDK 8)",
179-
source_file: "Main.java",
180-
compile_cmd: "/usr/lib/jvm/java-8-openjdk-amd64/bin/javac Main.java",
181-
run_cmd: "/usr/lib/jvm/java-8-openjdk-amd64/bin/java Main",
182-
},
183-
{
184-
name: "Java (OpenJDK 7)",
185-
source_file: "Main.java",
186-
compile_cmd: "/usr/lib/jvm/java-7-openjdk-amd64/bin/javac Main.java",
187-
run_cmd: "/usr/lib/jvm/java-7-openjdk-amd64/bin/java Main",
188-
},
189-
190-
191-
{
192-
name: "JavaScript (nodejs 8.5.0)",
193-
source_file: "main.js",
194-
run_cmd: "/usr/local/node-8.5.0/bin/node main.js"
195-
},
196-
{
197-
name: "JavaScript (nodejs 7.10.1)",
198-
source_file: "main.js",
199-
run_cmd: "/usr/local/node-7.10.1/bin/node main.js"
200-
},
201-
202-
203-
{
204-
name: "OCaml (4.05.0)",
205-
source_file: "main.ml",
206-
compile_cmd: "/usr/local/ocaml-4.05.0/bin/ocamlc main.ml",
207-
run_cmd: "./a.out"
208-
},
209-
210-
211-
{
212-
name: "Octave (4.2.0)",
213-
source_file: "file.m",
214-
run_cmd: "/usr/local/octave-4.2.0/bin/octave-cli -q --no-gui file.m"
215-
},
216-
217-
218-
{
219-
name: "Pascal (fpc 3.0.0)",
220-
source_file: "main.pas",
221-
compile_cmd: "/usr/local/fpc-3.0.0/bin/fpc -v0 main.pas",
222-
run_cmd: "./main"
223-
},
224-
225-
226-
{
227-
name: "Python (3.6.0)",
228-
source_file: "main.py",
229-
run_cmd: "/usr/local/python-3.6.0/bin/python3 main.py"
230-
},
231-
{
232-
name: "Python (3.5.3)",
233-
source_file: "main.py",
234-
run_cmd: "/usr/local/python-3.5.3/bin/python3 main.py"
235-
},
236-
{
237-
name: "Python (2.7.9)",
238-
source_file: "main.py",
239-
run_cmd: "/usr/local/python-2.7.9/bin/python main.py"
240-
},
241-
{
242-
name: "Python (2.6.9)",
243-
source_file: "main.py",
244-
run_cmd: "/usr/local/python-2.6.9/bin/python main.py"
245-
},
246-
247-
248-
{
249-
name: "Ruby (2.4.0)",
250-
source_file: "main.rb",
251-
run_cmd: "/usr/local/ruby-2.4.0/bin/ruby main.rb"
252-
},
253-
{
254-
name: "Ruby (2.3.3)",
255-
source_file: "main.rb",
256-
run_cmd: "/usr/local/ruby-2.3.3/bin/ruby main.rb"
257-
},
258-
{
259-
name: "Ruby (2.2.6)",
260-
source_file: "main.rb",
261-
run_cmd: "/usr/local/ruby-2.2.6/bin/ruby main.rb"
262-
},
263-
{
264-
name: "Ruby (2.1.9)",
265-
source_file: "main.rb",
266-
run_cmd: "/usr/local/ruby-2.1.9/bin/ruby main.rb"
267-
},
268-
269-
270-
{
271-
name: "Rust (1.20.0)",
272-
source_file: "main.rs",
273-
compile_cmd: "/usr/local/rust-1.20.0/bin/rustc main.rs",
274-
run_cmd: "./main"
275-
},
276-
277-
278-
{
279-
name: "Text (plain text)",
280-
source_file: "source.txt",
281-
run_cmd: "/bin/cat source.txt"
282-
},
283-
284-
285-
{
286-
name: "Executable",
287-
source_file: "a.out",
288-
compile_cmd: "/bin/chmod +x a.out",
289-
run_cmd: "./a.out"
290-
}
2918
]
2929

29310

docs/api/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Source code is available on [GitHub](https://github.com/judge0/api).
1212
Dummy client is available [here](/dummy-client.html) and can be used to try and test features of Judge0 API.
1313

1414
# Version
15-
This document describes Judge0 API version [`v1.2.0`](https://github.com/judge0/api/tree/v1.2.0).
15+
This document describes Judge0 API version [`v1.2.0-nim0.20.0`](https://github.com/judge0/api/tree/v1.2.0-nim0.20.0).
1616

1717
# Date and time formats
1818
[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard is used.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy