Merge pull request #25 from engineer-man/paradoc

added the paradoc golfing language as seen on Advent of Code
This commit is contained in:
Brian Seymour 2020-11-01 19:29:31 -06:00 committed by GitHub
commit 6720282bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 0 deletions

View File

@ -89,6 +89,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
"php", "php",
"python2", "python2",
"python3", "python", "python3", "python",
"paradoc",
"ruby", "ruby",
"rust", "rust",
"swift", "swift",

2
lxc/executors/paradoc Executable file
View File

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

View File

@ -51,3 +51,5 @@ echo 'testing python2'
../execute python2 test2.py ../execute python2 test2.py
echo 'testing python3' echo 'testing python3'
../execute python3 test3.py ../execute python3 test3.py
echo 'testing paradoc'
../execute python3 test_paradoc.py

View File

@ -0,0 +1,5 @@
try:
import paradoc
print('good')
except:
pass

View File

@ -93,6 +93,10 @@ echo 'python3'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -V" lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -V"
echo '---' echo '---'
echo 'paradoc'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -m paradoc --version"
echo '---'
echo 'ruby' echo 'ruby'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "ruby --version" lxc-attach --clear-env -n piston -- /bin/bash -l -c "ruby --version"
echo '---' echo '---'

View File

@ -85,6 +85,14 @@ ln -s python python3.8
echo 'export PATH=$PATH:/opt/python3/Python-3.8.2' >> /opt/.profile echo 'export PATH=$PATH:/opt/python3/Python-3.8.2' >> /opt/.profile
source /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 # install node.js
# final binary: /opt/nodejs/node-v12.16.1-linux-x64/bin/node # 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 # get version: /opt/nodejs/node-v12.16.1-linux-x64/bin/node -v
@ -369,6 +377,7 @@ If an invalid language is supplied, a typical response will look like the follow
- php - php
- python2 - python2
- python3 - python3
- paradoc
- ruby - ruby
- rust - rust
- swift - swift