From 48a1b124ddb94075b802169929af531ec99e9c49 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 22 Oct 2020 23:12:47 +0100 Subject: [PATCH 1/4] added the paradoc golfing language as seen on Advent of Code --- lxc/executors/paradoc | 2 ++ lxc/versions | 4 ++++ readme.md | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100755 lxc/executors/paradoc diff --git a/lxc/executors/paradoc b/lxc/executors/paradoc new file mode 100755 index 0000000..4a7e9c5 --- /dev/null +++ b/lxc/executors/paradoc @@ -0,0 +1,2 @@ +cd /tmp/$2 +runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 python3 -m paradoc code.code" diff --git a/lxc/versions b/lxc/versions index 830e69c..c3b03fa 100755 --- a/lxc/versions +++ b/lxc/versions @@ -85,6 +85,10 @@ echo 'python3' lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -V" echo '---' +echo 'paradoc' +lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -m paradoc --version" +echo '---' + echo 'ruby' lxc-attach --clear-env -n piston -- /bin/bash -l -c "ruby --version" echo '---' diff --git a/readme.md b/readme.md index 2f6c119..d694e24 100644 --- a/readme.md +++ b/readme.md @@ -85,6 +85,14 @@ ln -s python python3.8 echo 'export PATH=$PATH:/opt/python3/Python-3.8.2' >> /opt/.profile source /opt/.profile +# install paradoc +# this is not a binary, it is a python module +# therefore it cannot be run directly as it requires python3 to be installed +cd /opt && mkdir paradoc && cd paradoc +git clone https://github.com/betaveros/paradoc.git +echo 'export PYTHONPATH=$PYTHONPATH:/opt/paradoc/paradoc' >> /opt/.profile +source /opt/.profile + # install node.js # final binary: /opt/nodejs/node-v12.16.1-linux-x64/bin/node # get version: /opt/nodejs/node-v12.16.1-linux-x64/bin/node -v @@ -357,6 +365,7 @@ If an invalid language is supplied, a typical response will look like the follow - php - python2 - python3 +- paradoc - ruby - rust - swift From 3ea5f13d4c157019bec13c140a04e9c5f95edbbf Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 22 Oct 2020 23:19:05 +0100 Subject: [PATCH 2/4] added paradoc to the go api --- api/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/main.go b/api/main.go index 446f3e4..193eba9 100644 --- a/api/main.go +++ b/api/main.go @@ -88,6 +88,7 @@ func Execute(res http.ResponseWriter, req *http.Request) { "php", "python2", "python3", "python", + "paradoc", "ruby", "rust", "swift", From 9f9af342fd4171377164b1445ae3c69e31a0bc39 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 22 Oct 2020 23:25:57 +0100 Subject: [PATCH 3/4] added paradoc test --- lxc/test_all_lxc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index f2068bd..c7f0b28 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -49,3 +49,5 @@ echo 'testing python2' ../execute python2 test2.py echo 'testing python3' ../execute python3 test3.py +echo 'testing paradoc' +../execute python3 test_paradoc.py From 3ef1e2683ed9d801e91b6a1d0bea7fd3d9a79e5f Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Mon, 2 Nov 2020 00:24:32 +0000 Subject: [PATCH 4/4] looks like I forgot to push this bad boy --- lxc/tests/test_paradoc.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lxc/tests/test_paradoc.py diff --git a/lxc/tests/test_paradoc.py b/lxc/tests/test_paradoc.py new file mode 100644 index 0000000..3acba15 --- /dev/null +++ b/lxc/tests/test_paradoc.py @@ -0,0 +1,5 @@ +try: + import paradoc + print('good') +except: + pass