Compare commits

..

No commits in common. "03c64cfecfc45650b71eba1ad75523dd2143c219" and "16f123233ba0e4f4472964ff861a2713ce41b598" have entirely different histories.

14 changed files with 16 additions and 58 deletions

View File

@ -10,7 +10,7 @@ RUN for i in $(seq 1001 1500); do \
RUN apt-get update && \
apt-get install -y libxml2 gnupg tar coreutils util-linux libc6-dev \
binutils build-essential locales libpcre3-dev libevent-dev libgmp3-dev \
libncurses6 libncurses5 libedit-dev libseccomp-dev rename && \
libncurses6 libncurses5 libedit-dev libseccomp-dev && \
rm -rf /var/lib/apt/lists/*
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen

View File

@ -21,7 +21,7 @@ class Job {
this.uuid = uuidv4();
this.runtime = runtime;
this.files = files.map((file,i) => ({
name: file.name || `file${i}.code`,
name: file.name || `file${i}`,
content: file.content
}));

View File

@ -3,13 +3,10 @@
export DOTNET_CLI_HOME=$PWD
export HOME=$PWD
rename 's/$/\.cs/' "$@" # Add .cs extension
dotnet build --help > /dev/null # Shut the thing up
dotnet new console -o . --no-restore
rm Program.cs
dotnet restore --source $DOTNET_ROOT/.nuget/packages
dotnet build --no-restore

View File

@ -5,16 +5,16 @@
case "${PISTON_ALIAS}" in
gcc | c)
rename 's/$/\.c/' "$@" # Add .c extension
gcc -std=c11 *.c -lm
gcc -std=c11 "$@" -lm
;;
g++ | c++ | cpp)
rename 's/$/\.cpp/' "$@" # Add .cpp extension
g++ -std=c++17 *.cpp
g++ -std=c++17 "$@"
;;
gccgo | go)
gccgo "$@"
;;
gdc | d)
rename 's/$/\.d/' "$@" # Add .d extension
gdc *.d
gdc "$@"
;;
*)
echo "How did you get here? (${PISTON_ALIAS})"

View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash
# Compile haskell file(s)
rename 's/$/\.hs/' "$@" # Add .hs extension
ghc -dynamic -v0 -o out *.hs
ghc -dynamic -v0 -o out "$@"
chmod +x out

View File

@ -1,7 +1,4 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
mv $1 $1.java
filename=$1.java
shift
java $filename "$@"
java "$@"

View File

@ -1,7 +1,4 @@
#!/usr/bin/env bash
# Put instructions to compile source code, remove this file if the language does not require this stage
rename 's/$/\.kt/' "$@" # Add .kt extension
kotlinc *.kt -include-runtime -d code.jar
kotlinc "$@" -include-runtime -d code.jar

View File

@ -1,5 +1,3 @@
#!/bin/bash
rename 's/$/\.ml/' "$@" # Add .ml extension
ocamlc -o out *.ml
ocamlc -o out "$@"

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash
# Compile pony file(s)
rename 's/$/\.pong/' "$@" # Add .pony extension
ponyc -b out

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
scala "$@"
scala -color never "$@"

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
AUTH_HEADER="Authorization: $API_KEY"
for test_file in */*/test.*
do
IFS='/' read -ra test_parts <<< "$test_file"
language=${test_parts[0]}
lang_ver=${test_parts[1]}
test_src=$(python3 -c "import json; print(json.dumps(open('$test_file').read()))")
json='{"language":"'$language'","version":"'$lang_ver'","files":[{"content":'$test_src'}]}'
result=$(curl -s -XPOST -H "Content-Type: application/json" -d "$json" https://emkc.org/api/v2/piston/execute -H $AUTH_HEADER)
echo "==$test_file: $language-$lang_ver=="
#jq '.' <<<"$result"
jq -r '.compile.output + .run.output' <<<$result
done

View File

@ -2,6 +2,4 @@
# Put instructions to compile source code, remove this file if the language does not require this stage
rename 's/$/\.ts/' "$@" # Add .ts extension
tsc *.ts
tsc "$@"

View File

@ -5,9 +5,4 @@ export VMODULES="$PWD"
export TMPDIR="$PWD"
# Put instructions to run the runtime
rename 's/$/\.v/' "$@" # Add .v extension
filename=$1.v
shift
v run $filename "$@"
v run "$@"

View File

@ -1,6 +1,4 @@
#!/usr/bin/env bash
# optimizing for small programs
rename 's/$/\.zig/' "$@" # Add .zig extension
zig build-exe -O ReleaseSmall --color off --cache-dir . --global-cache-dir . --name out *.zig
zig build-exe -O ReleaseSmall --color off --cache-dir . --global-cache-dir . --name out "$@"