diff --git a/lxc/executors/nim b/lxc/executors/nim new file mode 100644 index 0000000..8b5b1c1 --- /dev/null +++ b/lxc/executors/nim @@ -0,0 +1,5 @@ +#!/bin/bash + +cd /tmp/$2 +timeout -s KILL 10 nim --hints:off c code.code +timeout -s KILL 3 xargs -a args.args -d '\n' ./code diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index 59bba84..ef20af2 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -41,6 +41,8 @@ echo -n 'testing nasm 32 bit = ' ../../cli/execute nasm nasm.nasm echo -n 'testing nasm 64 bit = ' ../../cli/execute nasm64 nasm64.nasm +echo -n 'testing nim = ' +../../cli/execute nim nim.nim echo -n 'testing node = ' ../../cli/execute node node.js echo -n 'testing paradoc = ' diff --git a/lxc/versions b/lxc/versions index ede597e..6353569 100755 --- a/lxc/versions +++ b/lxc/versions @@ -89,6 +89,10 @@ echo 'nasm64' lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version" echo '---' +echo 'nim' +lxc-attach --clear-env -n piston -- /bin/bash -l -c "nim -v" +echo '---' + echo 'node' lxc-attach --clear-env -n piston -- /bin/bash -l -c "node --version" echo '---' diff --git a/readme.md b/readme.md index ef1859b..6515189 100644 --- a/readme.md +++ b/readme.md @@ -274,6 +274,7 @@ Content-Type: application/json `lua`, `nasm`, `nasm64`, +`nim`, `node`, `paradoc`, `perl`, diff --git a/shared/languages.json b/shared/languages.json index ffb4307..636fd84 100644 --- a/shared/languages.json +++ b/shared/languages.json @@ -136,6 +136,12 @@ "java" ] }, + { + "name": "nim", + "aliases": [ + "nim" + ] + }, { "name": "node", "aliases": [ diff --git a/var/install.txt b/var/install.txt index 071b702..307404d 100644 --- a/var/install.txt +++ b/var/install.txt @@ -252,6 +252,18 @@ rm zig-linux-x86_64-0.7.1.tar.xz echo 'export PATH=$PATH:/opt/zig/zig' >> /opt/.profile source /opt/.profile +# install nim +# final binary: /opt/nim/bin/nim +# get version: /opt/nim/bin/nim -v +cd /opt && mkdir nim && cd nim +wget https://nim-lang.org/download/nim-1.4.0-linux_x64.tar.xz +unxz nim-1.4.0-linux_x64.tar.xz +tar -xf nim-1.4.0-linux_x64.tar +cd nim-1.4.0 +./install.sh /opt +echo 'export PATH=$PATH:/opt/nim/bin' >> /opt/.profile +source /opt/.profile + # create runnable users and apply limits for i in {1..150}; do useradd -M runner$i