From 295e73d4d977d0e97897d4918bf9ac9a5a681047 Mon Sep 17 00:00:00 2001
From: Thomas <thomas@hexf.me>
Date: Mon, 8 Feb 2021 20:05:14 +1300
Subject: [PATCH 1/3] Disable color output for deno

By default Deno has color output, we don't need this - and it also makes challenges on emkc.org not give the correct results.
---
 lxc/executors/deno | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxc/executors/deno b/lxc/executors/deno
index f55e1f4..8ec4c14 100755
--- a/lxc/executors/deno
+++ b/lxc/executors/deno
@@ -1,4 +1,4 @@
 #!/bin/bash
 
 cd /tmp/$1
-timeout -s KILL 3 xargs -a args.args -d '\n' deno run code.code < stdin.stdin
+timeout -s KILL 3 xargs -a args.args -d '\n' NO_COLOR=true deno run code.code < stdin.stdin

From 1305dc9e3ff5086abd17097534ae1bbbf3f22647 Mon Sep 17 00:00:00 2001
From: TitouanT <titouan.teyssier@gmail.com>
Date: Tue, 23 Feb 2021 10:43:44 +0100
Subject: [PATCH 2/3] call main\1 predicate with arguments list if any

---
 lxc/executors/prolog | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxc/executors/prolog b/lxc/executors/prolog
index ec6aeda..d9a6211 100755
--- a/lxc/executors/prolog
+++ b/lxc/executors/prolog
@@ -5,4 +5,9 @@ cd /tmp/$1
 sed 's/^.*$/:- forall((Goal = (\0), call(Goal)), (write(Goal), nl))./' stdin.stdin |
     cat code.code - > code.pl
 
+if [ -s args.args ]
+then
+    echo ":- main($(jq --raw-input -c --slurp 'split("\n")' args.args))." >> code.pl
+fi
+
 timeout -s KILL 3 swipl -g true -t halt code.pl

From 2ad9829fc6b476aa659c40eec418e292179b4241 Mon Sep 17 00:00:00 2001
From: Sirius902 <3645979-Sirius902@users.noreply.gitlab.com>
Date: Tue, 23 Feb 2021 19:43:26 -0800
Subject: [PATCH 3/3] Disable color output for scala

---
 lxc/executors/scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxc/executors/scala b/lxc/executors/scala
index be9c27d..7221451 100755
--- a/lxc/executors/scala
+++ b/lxc/executors/scala
@@ -2,4 +2,4 @@
 
 cd /tmp/$1
 cp code.code interim.scala
-timeout -s KILL 10 xargs -a args.args -d '\n' scala interim.scala < stdin.stdin
+timeout -s KILL 10 xargs -a args.args -d '\n' scala -color never interim.scala < stdin.stdin