From 3603c93eecc3d436e513442c708393c75b32d406 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 4 Oct 2020 10:47:48 -0700 Subject: [PATCH] [#24] New language: Limbo Hooooo boy that was a wild one. --- backend/src/langs.ts | 23 +++++++++++++++++++++++ scripts/docker-install-phase3b.bash | 6 ++++++ scripts/docker-install-phase6.bash | 11 +++++++++++ 3 files changed, 40 insertions(+) diff --git a/backend/src/langs.ts b/backend/src/langs.ts index 6743fd6..3d5526c 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -2042,6 +2042,29 @@ PLEASE GIVE UP template: `body:before { content: "Hello, world!"; } +`, + }, + limbo: { + aliases: ["inferno"], + name: "Limbo", + setup: "ln -s /usr/local/inferno/* ./", + main: "riju/main.b", + compile: "limbo -o riju/main.dis riju/main.b", + run: `emu -r . riju/main.dis`, + template: `implement Cmd; + +include "sys.m"; +include "draw.m"; + +Cmd : module { + init : fn (ctxt : ref Draw->Context, args : list of string); +}; + +init(nil : ref Draw->Context, nil : list of string) +{ + sys := load Sys Sys->PATH; + sys->print("Hello, world!\\n"); +} `, }, lisaac: { diff --git a/scripts/docker-install-phase3b.bash b/scripts/docker-install-phase3b.bash index 1cd0b59..6913e4a 100755 --- a/scripts/docker-install-phase3b.bash +++ b/scripts/docker-install-phase3b.bash @@ -98,6 +98,12 @@ julia # Ksh ksh +# Limbo +gcc +libc6-dev-i386 +libx11-dev:i386 +libxext-dev:i386 + # Lisaac lisaac diff --git a/scripts/docker-install-phase6.bash b/scripts/docker-install-phase6.bash index c2d553a..f0859ce 100755 --- a/scripts/docker-install-phase6.bash +++ b/scripts/docker-install-phase6.bash @@ -81,6 +81,17 @@ mv lazyk /usr/local/bin/ popd >/dev/null rm -rf lazyk +# Limbo +wget -nv "$(curl -sSL http://www.vitanuova.com/inferno/downloads.html | grep -E 'inferno-[0-9]+\.tgz' | grep -Eo 'http://[^"]+')" +tar -xf inferno-*.tgz -C /usr/local +pushd /usr/local/inferno >/dev/null +sed -i 's/gcc/gcc -m32/g' makemk.sh +./makemk.sh +PATH="$PWD/Linux/386/bin:$PATH" mk install +ln -s "$PWD/Linux/386/bin/emu" "$PWD/Linux/386/bin/limbo" /usr/local/bin/ +popd >/dev/null +rm inferno-*.tgz + # LOLCODE git clone https://github.com/justinmeza/lci.git pushd lci >/dev/null