From 5c13901d441a61f4a6c24837a80de7d1318d3aac Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Sat, 25 May 2019 15:03:40 -0400 Subject: [PATCH] Add APL --- README.md | 1 + docker/apl/Dockerfile | 4 ++++ docker/apl/run.sh | 6 ++++++ src/languages/apl.js | 12 ++++++++++++ 4 files changed, 23 insertions(+) create mode 100644 docker/apl/Dockerfile create mode 100644 docker/apl/run.sh create mode 100644 src/languages/apl.js diff --git a/README.md b/README.md index 692c5b0..ca1a273 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ console.log(new Foo().bar); One of the following language codes is set in `lang`. Options are optionally set in `options`, which is a semicolon-delimited list of `flag` or `flag=value`. +- `apl` APL - `bash` Bash - `bf` Brainfuck - `c` C (GCC) diff --git a/docker/apl/Dockerfile b/docker/apl/Dockerfile new file mode 100644 index 0000000..e756f61 --- /dev/null +++ b/docker/apl/Dockerfile @@ -0,0 +1,4 @@ +FROM juergensauermann/gnu-apl +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/apl/run.sh b/docker/apl/run.sh new file mode 100644 index 0000000..48a9362 --- /dev/null +++ b/docker/apl/run.sh @@ -0,0 +1,6 @@ +mkdir "$CODEDIR" && cd "$CODEDIR" + +echo "$1" > program.apl +apl --OFF -s -f program.apl + +cd .. && rm -rf "$CODEDIR" diff --git a/src/languages/apl.js b/src/languages/apl.js new file mode 100644 index 0000000..680bc49 --- /dev/null +++ b/src/languages/apl.js @@ -0,0 +1,12 @@ +const Language = require('../struct/Language'); + +class APL extends Language { + constructor() { + super('apl', { + name: 'APL', + aliases: ['apl'] + }); + } +} + +module.exports = APL;