diff --git a/config/languages.json b/config/languages.json index b8a54b2..e3c0c50 100644 --- a/config/languages.json +++ b/config/languages.json @@ -39,6 +39,13 @@ "c" ] }, + { + "name": "clojure", + "aliases": [ + "clojure", + "clj" + ] + }, { "name": "crystal", "aliases": [ diff --git a/container/install_script.sh b/container/install_script.sh index 593f7e1..a4e0eb0 100644 --- a/container/install_script.sh +++ b/container/install_script.sh @@ -310,6 +310,15 @@ make echo 'export PATH=$PATH:/opt/lolcode/bin' >> /opt/.profile source /opt/.profile +# install clojure +# final binary: /opt/clojure/bin/clojure +# get version: /opt/clojure/bin/clojure -version +cd /opt && mkdir clojure && cd clojure +curl -O https://download.clojure.org/install/linux-install-1.10.2.796.sh +chmod +x linux-install-1.10.2.796.sh +./linux-install-1.10.2.796.sh --prefix /opt/clojure +echo 'export PATH=$PATH:/opt/clojure/bin' >> /opt/.profile + # create runnable users and apply limits for i in {1..150}; do useradd -M runner$i diff --git a/lxc/executors/clojure b/lxc/executors/clojure new file mode 100644 index 0000000..39689c4 --- /dev/null +++ b/lxc/executors/clojure @@ -0,0 +1,4 @@ +#!/bin/bash + +cd /tmp/$1 +timeout -s KILL 3 xargs -a args.args -d '\n' clojure -M code.code < stdin.stdin diff --git a/lxc/tests/clojure.clj b/lxc/tests/clojure.clj new file mode 100644 index 0000000..befe5c3 --- /dev/null +++ b/lxc/tests/clojure.clj @@ -0,0 +1,5 @@ +(ns clojure.examples.hello + (:gen-class)) +(defn hello-world [] + (println "good")) +(hello-world) diff --git a/lxc/util/versions b/lxc/util/versions index 6ff9d54..5fd2866 100755 --- a/lxc/util/versions +++ b/lxc/util/versions @@ -21,6 +21,10 @@ echo 'cpp' lxc-attach --clear-env -n piston -- /bin/bash -l -c "g++ --version" echo '---' +echo 'clojure' +lxc-attach --clear-env -n piston -- /bin/bash -l -c "clojure -version" +echo '---' + echo 'crystal' lxc-attach --clear-env -n piston -- /bin/bash -l -c "crystal -v" echo '---' @@ -77,6 +81,10 @@ echo 'lisp' lxc-attach --clear-env -n piston -- /bin/bash -l -c "sbcl --version" echo '---' +echo 'lolcode' +echo '1.0.0' +echo '---' + echo 'lua' lxc-attach --clear-env -n piston -- /bin/bash -l -c "lua -v" echo '---'