merge and add clojure

This commit is contained in:
Brian Seymour 2021-03-12 13:27:06 -06:00
parent fca3488743
commit ed0a5c4f78
5 changed files with 33 additions and 0 deletions

View File

@ -39,6 +39,13 @@
"c"
]
},
{
"name": "clojure",
"aliases": [
"clojure",
"clj"
]
},
{
"name": "crystal",
"aliases": [

View File

@ -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

4
lxc/executors/clojure Normal file
View File

@ -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

5
lxc/tests/clojure.clj Normal file
View File

@ -0,0 +1,5 @@
(ns clojure.examples.hello
(:gen-class))
(defn hello-world []
(println "good"))
(hello-world)

View File

@ -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 '---'