diff --git a/backend/src/langs.ts b/backend/src/langs.ts index 30a9d2e..9c3afb4 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -181,6 +181,18 @@ implement main0 () = () input: `PRINT x`, }, template: `PRINT "Hello, world!" +`, + }, + battlestar: { + aliases: ["battlestarc", "bts"], + name: "Battlestar", + main: "main.bts", + run: "bts main.bts", + template: `const message = "Hello, world!\n" + +fun main + syscall(1, 1, message, len(message)) +end `, }, beatnik: { diff --git a/scripts/docker-install-phase3a.bash b/scripts/docker-install-phase3a.bash index 93b9ded..2379a6e 100755 --- a/scripts/docker-install-phase3a.bash +++ b/scripts/docker-install-phase3a.bash @@ -39,6 +39,10 @@ bwbasic # Bash bash +# Battlestar +golang +yasm + # BrainF beef diff --git a/scripts/docker-install-phase6.bash b/scripts/docker-install-phase6.bash index cf2c190..eac280c 100755 --- a/scripts/docker-install-phase6.bash +++ b/scripts/docker-install-phase6.bash @@ -5,6 +5,15 @@ set -o pipefail set -x pushd /tmp >/dev/null +# Battlestar +git clone https://github.com/xyproto/battlestar.git +pushd battlestar >/dev/null +make +mv cmd/battlestarc/battlestarc /usr/local/bin/ +mv scripts/bts.sh /usr/local/bin/bts +popd >/dev/null +rm -rf battlestar + # Beatnik git clone https://github.com/catseye/Beatnik.git sed -i 's#env python#env python2#' Beatnik/script/beatnik.py