Install distutils for Hy, fix 'set -e' usage

This commit is contained in:
Radon Rosborough 2021-01-17 21:09:35 -08:00
parent 537f4bda53
commit a29329f71c
19 changed files with 112 additions and 26 deletions

View File

@ -296,7 +296,7 @@ export class Session {
if (code) {
cmdline = run;
if (compile) {
cmdline = `( ${compile} ) && ( ${run} )`;
cmdline = `( ${compile} ) && ( set +e; ${run} )`;
}
} else if (repl) {
cmdline = repl;

View File

@ -40,7 +40,8 @@ install:
ln -s /usr/local/lib/boo/booc /usr/local/lib/boo/booish "${pkg}/usr/local/bin/"
setup: |
mkdir -p "$HOME/.local/share" && touch "$HOME/.local/share/booish_history"
mkdir -p "$HOME/.local/share"
touch "$HOME/.local/share/booish_history"
repl: |
booish

View File

@ -50,6 +50,11 @@ template: |
compile: |
export LD_LIBRARY_PATH=/usr/local/lib/ec
ecp -c main.ec -o main.sym && ecc -c main.ec -o main.c && ecs -console main.sym main.imp -o main.main.ec && ecp -c main.main.ec -o main.main.sym && ecc -c main.main.ec -o main.main.c && clang main.c main.main.c -lecereCOM -o main
ecp -c main.ec -o main.sym
ecc -c main.ec -o main.c
ecs -console main.sym main.imp -o main.main.ec
ecp -c main.main.ec -o main.main.sym
ecc -c main.main.ec -o main.main.c
clang main.c main.main.c -lecereCOM -o main
run: |
./main

View File

@ -32,7 +32,10 @@ template: |
output = "Hello, world!"
run: |
cp /opt/elm/elm.json elm.json && run-elm Main.elm; elm repl
cp /opt/elm/elm.json elm.json || exit
run-elm Main.elm
elm repl
scope:
code: |

View File

@ -35,4 +35,4 @@ pkg:
ls ~/.emacs.d/elpa | grep -- - | grep '^NAME-[0-9]' | while read pkg; do emacs -Q --batch --eval "(progn (require 'package) (push '(\"melpa" . "https://melpa.org/packages/\") package-archives) (package-initialize) (unless (ignore-errors (>= (length (directory-files \"~/.emacs.d/elpa/archives\")) 4)) (package-refresh-contents)) (call-interactively 'package-delete))" <<< "$pkg"; done
all: |
set -o pipefail; (curl -sS https://elpa.gnu.org/packages/ | grep '<td>' | grep -Eo '[^>]+</a>' | grep -Eo '^[^<]+' && curl -sS https://melpa.org/archive.json | jq -r 'keys | .[]') | sort | uniq
(curl -sS https://elpa.gnu.org/packages/ | grep '<td>' | grep -Eo '[^>]+</a>' | grep -Eo '^[^<]+' && curl -sS https://melpa.org/archive.json | jq -r 'keys | .[]') | sort | uniq

View File

@ -22,7 +22,8 @@ template: |
]
compile: |
mono /opt/entropy/entc.exe main.vge | grep -Ev 'WARNING:|Using default' > main.cs && mcs -lib:/opt/entropy -r:Rottytooth.Esolang.Entropy main.cs
mono /opt/entropy/entc.exe main.vge | grep -Ev 'WARNING:|Using default' > main.cs
mcs -lib:/opt/entropy -r:Rottytooth.Esolang.Entropy main.cs
run: |
MONO_PATH=/opt/entropy mono main.exe
hello: |

View File

@ -28,8 +28,10 @@ template: |
}
compile: |
lex -o main.c main.lex && clang main.c -o main
lex -o main.c main.lex
clang main.c -o main
run: |
echo 'Reading from stdin, ctrl+D to end input...' >&2 && ./main
echo 'Reading from stdin, ctrl+D to end input...' >&2
./main
helloInput: |
EOF

View File

@ -35,7 +35,8 @@ install:
popd
repl: |
rm -f .ghci && ghci
rm -f .ghci
ghci
main: "Main.hs"
template: |

View File

@ -2,6 +2,8 @@ id: "hy"
name: "Hy"
install:
apt:
- python3-distutils
pip:
- hy

View File

@ -11,7 +11,8 @@ install:
- j.deb
repl: |
echo 'ijconsole:' && ijconsole
echo 'ijconsole:'
ijconsole
main: "main.ijs"
template: |

View File

@ -6,7 +6,10 @@ install:
- jq
repl: |
echo 'Reading from stdin...' >&2 && while true; do jq .; done
echo 'Reading from stdin...' >&2
while true; do
jq .
done
input: |
{"foo":"bar"}
output: |
@ -17,7 +20,10 @@ template: |
"Hello, world!"
run: |
echo 'Reading from stdin...' >&2 && while true; do jq "$(< main.jq)"; done
echo 'Reading from stdin...' >&2
while true; do
jq "$(< main.jq)"
done
helloInput: |
{}
runReplOutput: |

View File

@ -25,7 +25,13 @@ install:
chmod a=rx,u=rwxs "${pkg}/opt/mariadb/lib/plugin/auth_pam_tool_dir/auth_pam_tool"
repl: |
rm -rf data && /opt/mariadb/scripts/mariadb-install-db --user="$(id -un)" && (/opt/mariadb/bin/mysqld --datadir="$PWD/data" --socket="$PWD/socket" --skip-networking &) && until [[ -e socket ]]; do sleep 0.01; done && mysql --socket=socket
rm -rf data
/opt/mariadb/scripts/mariadb-install-db --user="$(id -un)"
(/opt/mariadb/bin/mysqld --datadir="$PWD/data" --socket="$PWD/socket" --skip-networking &)
until [[ -e socket ]]; do
sleep 0.01
done
mysql --socket=socket
input: |
SELECT 123 * 234;
@ -34,11 +40,19 @@ template: |
SELECT 'Hello, world!';
run: |
rm -rf data && /opt/mariadb/scripts/mariadb-install-db --user="$(id -un)" && (/opt/mariadb/bin/mysqld --datadir="$PWD/data" --socket="$PWD/socket" --skip-networking &) && until [[ -e socket ]]; do sleep 0.01; done && (mysql --socket=socket < main.sql; mysql --socket=socket)
set -e
rm -rf data
/opt/mariadb/scripts/mariadb-install-db --user="$(id -un)"
(/opt/mariadb/bin/mysqld --datadir="$PWD/data" --socket="$PWD/socket" --skip-networking &)
until [[ -e socket ]]; do
sleep 0.01
done
(mysql --socket=socket < main.sql; mysql --socket=socket)
lsp:
start: |
sleep 5 && sqls -config /opt/mariadb/sqls.yml
sleep 5
sqls -config /opt/mariadb/sqls.yml
skip:
- lsp

View File

@ -29,11 +29,30 @@ install:
- mongodb-server-core
repl: |
while ps -u "$(id -un)" -o comm | grep -q mongod; do sleep 0.01; done && rm -rf data && mkdir data && (mongod --dbpath=data --unixSocketPrefix="$PWD" --bind_ip=, &) && until mongo --host "$PWD/mongodb-27017.sock" --eval ' ' &>/dev/null; do sleep 0.01; done && mongo --host "$PWD/mongodb-27017.sock"
while ps -u "$(id -un)" -o comm | grep -q mongod; do
sleep 0.01
done
rm -rf data
mkdir data
(mongod --dbpath=data --unixSocketPrefix="$PWD" --bind_ip=, &)
until mongo --host "$PWD/mongodb-27017.sock" --eval ' ' &>/dev/null; do
sleep 0.01
done
mongo --host "$PWD/mongodb-27017.sock"
main: "main.js"
template: |
print("Hello, world!")
run: |
while ps -u "$(id -un)" -o comm | grep -q mongod; do sleep 0.01; done && rm -rf data && mkdir data && (mongod --dbpath=data --unixSocketPrefix="$PWD" --bind_ip=, &) && until mongo --host "$PWD/mongodb-27017.sock" --eval ' ' &>/dev/null; do sleep 0.01; done && mongo --host "$PWD/mongodb-27017.sock" --shell main.js
set -e
while ps -u "$(id -un)" -o comm | grep -q mongod; do
sleep 0.01
done
rm -rf data
mkdir data
(mongod --dbpath=data --unixSocketPrefix="$PWD" --bind_ip=, &)
until mongo --host "$PWD/mongodb-27017.sock" --eval ' ' &>/dev/null; do
sleep 0.01
done
mongo --host "$PWD/mongodb-27017.sock" --shell main.js

View File

@ -11,7 +11,13 @@ install:
- sqls
repl: |
rm -rf data && mysqld -h "$PWD/data" --initialize-insecure && (mysqld -h "$PWD/data" --socket="$PWD/socket" --pid-file="$PWD/pid-file" --mysqlx=OFF --skip-networking &) && until [[ -e socket ]]; do sleep 0.01; done && mysql --socket="$PWD/socket" -u root
rm -rf data
mysqld -h "$PWD/data" --initialize-insecure
(mysqld -h "$PWD/data" --socket="$PWD/socket" --pid-file="$PWD/pid-file" --mysqlx=OFF --skip-networking &)
until [[ -e socket ]]; do
sleep 0.01
done
mysql --socket="$PWD/socket" -u root
input: |
SELECT 123 * 234;
@ -20,7 +26,14 @@ template: |
SELECT 'Hello, world!';
run: |
rm -rf data && mysqld -h "$PWD/data" --initialize-insecure && (mysqld -h "$PWD/data" --socket="$PWD/socket" --pid-file="$PWD/pid-file" --mysqlx=OFF --skip-networking &) && until [[ -e socket ]]; do sleep 0.01; done && (mysql --socket="$PWD/socket" -u root < main.sql; mysql --socket="$PWD/socket" -u root)
set -e
rm -rf data
mysqld -h "$PWD/data" --initialize-insecure
(mysqld -h "$PWD/data" --socket="$PWD/socket" --pid-file="$PWD/pid-file" --mysqlx=OFF --skip-networking &)
until [[ -e socket ]]; do
sleep 0.01
done
(mysql --socket="$PWD/socket" -u root < main.sql; mysql --socket="$PWD/socket" -u root)
lsp:
start: |

View File

@ -15,7 +15,11 @@ install:
- sqls
repl: |
rm -rf data && /usr/lib/postgresql/*/bin/initdb -D data && (echo "listen_addresses = ''" && echo "unix_socket_directories = '.'") >> data/postgresql.conf && /usr/lib/postgresql/*/bin/pg_ctl -D data -w start && psql -h "$PWD/data" postgres
rm -rf data
/usr/lib/postgresql/*/bin/initdb -D data
(echo "listen_addresses = ''"; echo "unix_socket_directories = '.'") >> data/postgresql.conf
/usr/lib/postgresql/*/bin/pg_ctl -D data -w start
psql -h "$PWD/data" postgres
input: |
SELECT 123 * 234;
@ -24,7 +28,16 @@ template: |
SELECT 'Hello, world!';
run: |
rm -rf data && /usr/lib/postgresql/*/bin/initdb -D data && (echo "listen_addresses = ''" && echo "unix_socket_directories = '.'") >> data/postgresql.conf && /usr/lib/postgresql/*/bin/pg_ctl -D data -w start && (psql -h "$PWD/data" postgres -f main.sql; psql -h "$PWD/data" postgres)
set -e
rm -rf data
/usr/lib/postgresql/*/bin/initdb -D data
(echo "listen_addresses = ''"; echo "unix_socket_directories = '.'") >> data/postgresql.conf
/usr/lib/postgresql/*/bin/pg_ctl -D data -w start
set +e
psql -h "$PWD/data" postgres -f main.sql
psql -h "$PWD/data" postgres
lsp:
start: |

View File

@ -14,6 +14,7 @@ template: |
END
compile: |
ratfor main.r -o main.f && gfortran main.f -o main
ratfor main.r -o main.f
gfortran main.f -o main
run: |
./main

View File

@ -23,7 +23,8 @@ install:
popd
setup: |
shopt -s dotglob && cp -R /opt/unison/skel/* ./
shopt -s dotglob
cp -R /opt/unison/skel/* ./
repl: |
unison -codebase .
@ -42,7 +43,8 @@ template: |
printLine "Hello, world!"
run: |
echo "Type 'run main' to run the code." && unison -codebase .
echo "Type 'run main' to run the code."
unison -codebase .
helloInput: |
DELAY: 3
run main

View File

@ -237,7 +237,8 @@ template: |
BA 67 CR 7/10 TR 1 CH 16 End of track
compile: |
asc2mid main.asc > main.mid && mono /opt/velato/Vlt.exe /s main.mid
asc2mid main.asc > main.mid
mono /opt/velato/Vlt.exe /s main.mid
run: |
mono main.exe
hello: |

View File

@ -14,7 +14,8 @@ template: |
write, "Hello, world!"
run: |
echo "Type '#include \"main.i\"' to run the code." && rlwrap yorick
echo "Type '#include \"main.i\"' to run the code."
rlwrap yorick
helloInput: |
#include "main.i"