New language: Dylan

This commit is contained in:
Radon Rosborough 2020-08-23 10:20:00 -06:00
parent fb2334750c
commit 109079ed3e
4 changed files with 50 additions and 0 deletions

View File

@ -727,6 +727,24 @@ void main()
compile: "pandoc main.txt -f dokuwiki -o main.html",
run: "prettier --no-config main.html",
template: `Hello, world!
`,
},
dylan: {
aliases: ["opendylan"],
name: "Dylan",
setup: "cp -R /opt/dylan/project-template/* ./",
main: "main.dylan",
compile: "dylan-compiler -build main.lid",
run: "_build/bin/main",
template: `Module: main
define function main
(name :: <string>, arguments :: <vector>)
format-out("Hello, world!\\n");
exit-application(0);
end function main;
main(application-name(), application-arguments());
`,
},
elixir: {

View File

@ -82,6 +82,9 @@ dart
# Dhall
dhall
# Dylan
libunwind-dev
"
apt-get install -y $(grep -v "^#" <<< "$packages")

View File

@ -66,6 +66,14 @@ tar -xf dhall-json-*-x86_64-linux.tar.bz2 -C dhall-json
mv dhall-json/bin/dhall-to-json dhall-json/bin/json-to-dhall /usr/local/bin/
rm -rf dhall-json dhall-json-*-x86_64-linux.tar.bz2
# Dylan
ver="$(latest_release dylan-lang/opendylan)"
wget -nv "https://github.com/dylan-lang/opendylan/releases/download/${ver}/opendylan-$(grep -Eo '[0-9]+\.[0-9]+' <<< "$ver")-x86_64-linux.tar.bz2"
tar -xf opendylan-*-x86_64-linux.tar.bz2
rm opendylan-*-x86_64-linux.tar.bz2
mv opendylan-* /opt/dylan
ln -s /opt/dylan/bin/dylan-compiler /opt/dylan/bin/make-dylan-app /usr/local/bin/
# Elixir
ver="$(latest_release elixir-lsp/elixir-ls)"
wget -nv "https://github.com/elixir-lsp/elixir-ls/releases/download/${ver}/elixir-ls.zip"

View File

@ -12,6 +12,27 @@ mkdir -p /opt/cmd/home-template
mv /home/build/.wine /opt/cmd/home-template/
chmod -R a=u,go-w /opt/cmd/home-template
# Dylan
pushd /opt/dylan
make-dylan-app main
mv main project-template
pushd project-template >/dev/null
cat <<"EOF" > main.dylan
Module: main
define function main
(name :: <string>, arguments :: <vector>)
format-out("Hello, world!\n");
exit-application(0);
end function main;
main(application-name(), application-arguments());
EOF
dylan-compiler -build main.lid
rm main.dylan
popd >/dev/null
popd >/dev/null
# Elm
mkdir -p /opt/elm
mkdir elm-project