Almost all languages working in new system

This commit is contained in:
Radon Rosborough 2021-01-11 22:17:09 -08:00
parent f013f7e26c
commit f7b0b43551
45 changed files with 456 additions and 145 deletions

View File

@ -39,28 +39,42 @@ EOF
packages="
# compilation tools
clang
g++
gcc
make
# base languages
nodejs
ocaml
perl
python3
ruby
# package managers
opam
python3-pip
yarn
# packaging tools
apt-file
dctrl-tools
fakeroot
unzip
# basic utilities
git
jq
less
make
man
moreutils
nodejs
opam
perl
python3-pip
ripgrep
ruby
strace
sudo
tmux
tree
unzip
vim
yarn
"

View File

@ -92,21 +92,40 @@ libicu="$(grep-aptavail -wF Package 'libicu[0-9]+' -s Package -n | head -n1)"
packages="
apt-file
less
# compilation tools
clang
g++
gcc
make
# base languages
nodejs
ocaml
perl
python3
ruby
# project tools
yarn
# packaging tools
apt-file
dctrl-tools
# basic utilities
less
git
jq
${libicu}
make
man
nodejs
ripgrep
strace
sudo
tmux
vim
yarn
# shared dependencies
${libicu}
"

View File

@ -1,4 +1,4 @@
id: "아희"
id: "aheui"
aliases:
- "aheui"
- "aheuis"
@ -11,8 +11,19 @@ aliases:
- "rsaheui"
- "as3aheui"
- "raheui"
- "아희"
name: "아희"
install:
manual: |
install -d "${pkg}/usr/local/bin"
git clone https://github.com/aheui/caheui.git
pushd caheui
make
cp aheui "${pkg}/usr/local/bin/"
popd
main: "main.aheui"
template: |
밤밣따빠밣밟따뿌

View File

@ -7,7 +7,6 @@ install:
prepare:
apt:
- cargo
- clang
- cmake
- libssl-dev
- pkg-config
@ -20,8 +19,6 @@ install:
# error: unrecognized command-line option -Wnewline-eof.
CC=/usr/bin/clang CXX=/usr/bin/clang++ llvmenv build-entry -G Makefile -j$(nproc) 10.0.0
llvmenv global 10.0.0
apt:
- gcc
manual: |
git clone https://github.com/jfecher/ante.git
pushd ante

View File

@ -2,8 +2,6 @@ id: "antecards"
name: "Ante (Cards)"
install:
apt:
- ruby
manual: |
wget https://github.com/michaeldv/ante/raw/master/ante.rb
chmod +x ante.rb

View File

@ -26,11 +26,6 @@ info:
usage: []
install:
prepare:
apt:
- clang
apt:
- python3
scripts:
binary-to-text: |
#!/usr/bin/env python3

View File

@ -27,7 +27,6 @@ info:
install:
apt:
- beef
- python3
scripts:
brainf: |
#!/usr/bin/env python3

View File

@ -27,8 +27,6 @@ info:
usage: []
install:
apt:
- gcc
manual: |
install -d "${pkg}/opt/clean"
install -d "${pkg}/usr/local/bin"

View File

@ -1,7 +1,7 @@
id: "emacs"
id: "emacslisp"
aliases:
- "emacslisp"
- "elisp"
- "emacs"
- "gnuemacs"
- "xemacs"
- "ielm"

29
langs/ezhil.yaml Normal file
View File

@ -0,0 +1,29 @@
id: "ezhil"
aliases:
- "ezhili"
- "ezhuthi"
- "tamil"
- "எழில்"
name: "எழில்"
install:
manual: |
install -d "${pkg}/opt/ezhil"
install -d "${pkg}/usr/local/bin"
wget https://github.com/raxod502/riju-cdn/releases/download/ezhil-2017.08.19/ezhil.tar.gz
tar -xf ezhil.tar.gz -C "${pkg}/opt/ezhil" --strip-components=2
cp "${pkg}/opt/ezhil/ezhili" "${pkg}/opt/ezhil/ezhuthi/"
ln -s /opt/ezhil/ezhuthi/ezhili "${pkg}/usr/local/bin/"
repl: |
ezhili
main: "main.n"
template: |
பதிப்பி "வணக்கம், உலகமே!"
run: |
ezhili main.n; ezhili
hello: |
வணக்கம், உலகமே!

View File

@ -4,8 +4,6 @@ aliases:
name: "FALSE"
install:
apt:
- ruby
manual: |
install -d "${pkg}/usr/local/bin"

View File

@ -1,6 +1,6 @@
id: "><>"
id: "fishlang"
aliases:
- "fishlang"
- "><>"
name: "><>"
install:
@ -9,7 +9,7 @@ install:
sed -i 's:^#!.*:#!/usr/bin/env python3:' fish.py
chmod +x fish.py
install -d "${pkg}/usr/local/bin"
mv fish.py "${pkg}/usr/local/bin/fish-lang"
cp fish.py "${pkg}/usr/local/bin/fish-lang"
info:
year: 2009

View File

@ -4,8 +4,6 @@ aliases:
name: "GolfScript"
install:
apt:
- ruby
manual: |
install -d "${pkg}/usr/local/bin"

View File

@ -2,8 +2,6 @@ id: "grass"
name: "Grass"
install:
apt:
- ruby
manual: |
install -d "${pkg}/usr/local/bin"

View File

@ -8,7 +8,6 @@ install:
prepare:
apt:
- chezscheme
- gcc
apt:
- chezscheme
manual: |

View File

@ -2,9 +2,6 @@ id: "lazyk"
name: "Lazy K"
install:
prepare:
apt:
- gcc
manual: |
install -d "${pkg}/usr/local/bin"

View File

@ -8,7 +8,6 @@ install:
prepare:
apt:
- cmake
- python3
manual: |
git clone https://github.com/justinmeza/lci.git
pushd lci

View File

@ -4,9 +4,6 @@ aliases:
name: "Malbolge"
install:
prepare:
apt:
- clang
manual: |
install -d "${pkg}/usr/local/bin"

View File

@ -6,7 +6,6 @@ name: "Oberon"
install:
prepare:
apt:
- clang
- libgc-dev
apt:
- libgc-dev

View File

@ -7,7 +7,6 @@ name: "Objective-C++"
install:
apt:
- gcc
- gnustep-devel
- gobjc++
- clang-format

View File

@ -7,7 +7,6 @@ monacoLang: objective-c
install:
apt:
- gcc
- gnustep-devel
- clang-format
- clangd

59
langs/qalb.yaml Normal file
View File

@ -0,0 +1,59 @@
id: "qalb"
aliases:
- "قلب"
name: "قلب"
install:
scripts:
qalb: |
#!/usr/bin/env node
const fs = require("fs");
const repl = require("repl");
const args = process.argv.slice(2);
if (args.length > 1) {
console.error("usage: repl.js [FILE]");
process.exit(1);
}
const program = args.length === 1 ? fs.readFileSync(args[0], "utf-8") : null;
eval(fs.readFileSync("/opt/qalb/qlb.js", "utf-8"));
eval(fs.readFileSync("/opt/qalb/parser.js", "utf-8"));
eval(fs.readFileSync("/opt/qalb/primitives.js", "utf-8"));
Qlb.init({console});
if (program !== null) {
Qlb.execute(program);
}
repl.start({prompt: "قلب> ", eval: (cmd, context, filename, callback) => callback(null, Qlb.execute(cmd))});
manual: |
install -d "${pkg}/opt/qalb"
git clone https://github.com/nasser/---.git qalb
pushd qalb
cp public/qlb/*.js "${pkg}/opt/qalb/"
popd
repl: |
qalb
input: |
(ضرب ١٢٣ ٢٣٤)
main: "main.qalb"
template: |
(قول "مرحبا يا عالم")
run: |
qalb main.qalb
hello: |
مرحبا يا عالم
scope:
code: |
(حدد خ (ضرب ١٢٣ ٢٣٤))
input: |
خ

24
langs/rapira.yaml Normal file
View File

@ -0,0 +1,24 @@
id: "rapira"
aliases:
- "rap"
- "rerap"
- "rerap2"
- "рапира"
name: "Рапира"
install:
manual: |
install -d "${pkg}/usr/local/bin"
git clone https://github.com/freeduke33/rerap2.git
pushd rerap2
make
cp rapira "${pkg}/usr/local/bin/"
popd
main: "main.rap"
template: |
вывод: "Hello, world!"
run: |
rapira main.rap

View File

@ -4,29 +4,81 @@ aliases:
name: "SageMath"
install:
prepare:
apt:
# This list was produced by running ./configure and seeing what
# packages it told me to install.
- cmake
- coinor-cbc
- coinor-libcbc-dev
- curl
- fflas-ffpack
- flintqs
- gfan
- glpk-utils
- lcalc
- libboost-dev
- libbraiding-dev
- libcdd-dev
- libcdd-tools
- libcurl4-openssl-dev
- libfile-slurp-perl
- libfreetype6-dev
- libgd-dev
- libgiac-dev
- libgivaro-dev
- libglpk-dev
- libgsl-dev
- libiml-dev
- libisl-dev
- libjson-perl
- liblfunction-dev
- liblrcalc-dev
- libm4rie-dev
- libmongodb-perl
- libmpfi-dev
- libnauty-dev
- libpcre3-dev
- libperl-dev
- libplanarity-dev
- libppl-dev
- librw-dev
- libssl-dev
- libsuitesparse-dev
- libsvg-perl
- libsymmetrica2-dev
- libterm-readkey-perl
- libterm-readline-gnu-perl
- libterm-readline-gnu-perl
- libxml-libxslt-perl
- libxml-writer-perl
- libxml2-dev
- libzmq3-dev
- libzn-poly-dev
- nauty
- ninja-build
- openssl
- palp
- pandoc
- pari-gp2c
- planarity
- ppl-dev
- r-base-dev
- r-cran-lattice
- sympow
- tachyon
- xcas
- yasm
manual: |
sudo tee -a /etc/apt/sources.list.d/focal.list >/dev/null <<EOF
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main universe
EOF
file="$(curl -fsSL https://mirrors.mit.edu/sage/src/index.html | grep -Eo 'sage-[0-9.]+\.tar\.gz' | sort -rV | head -n1)"
wget "https://mirrors.mit.edu/sage/src/${file}" -O sage.tar.gz
mkdir sage
tar -xf sage.tar.gz -C sage --strip-components=1
sudo apt-get update
for name in libflint-2.5.2 libgsl23 sagemath sagemath-common; do
apt-get download "${name}"
mv "${name}"_*.deb "${name}.deb"
done
deb:
- sagemath.deb
- sagemath-common.deb
- libflint-2.5.2.deb
- libgsl23.deb
depends:
strip:
- sagemath-common
- libflint-2.5.2
- libgsl23
unpin:
- libgslcblas0
pushd sage
./configure --prefix="${pkg}/usr/local"
make
popd
repl: |
sage

View File

@ -2,8 +2,23 @@ id: "slick"
name: "Slick"
install:
opam:
- dune
prepare:
apt:
- libgmp-dev
opam:
- dune
manual: |
install -d "${pkg}/usr/local/bin"
git clone https://github.com/kwshi/slick.git
pushd slick
deps="$(dune external-lib-deps src --display=quiet | grep -F - | sed 's/- //; s/\..*//')"
opam init -n --disable-sandboxing
opam switch create .
opam install --switch . ${deps} menhir -y
opam exec --switch . dune build
cp _build/default/src/exe/main.exe "${pkg}/usr/local/bin/slick"
popd
repl: |
slick

View File

@ -9,6 +9,17 @@ install:
prepare:
apt:
- m4
manual: |
install -d "${pkg}/usr/local/bin"
file="$(curl -sSL ftp://ftp.snobol4.org/snobol/ | grep -Eo 'snobol4-.*\.tar\.gz' | sort -rV | head -n1)"
wget "ftp://ftp.snobol4.org/snobol/${file}" -O snobol.tar.gz
mkdir snobol
tar -xf snobol.tar.gz -C snobol --strip-components=1
pushd snobol
make snobol4
cp snobol4 "${pkg}/usr/local/bin/"
popd
repl: |
snobol4

View File

@ -9,6 +9,8 @@ monacoLang: sql
install:
apt:
- sqlite
riju:
- sqls
repl: |
sqlite3

View File

@ -4,6 +4,16 @@ aliases:
- "asq"
name: "Subleq"
install:
manual: |
install -d "${pkg}/usr/local/bin"
git clone https://github.com/davidar/subleq.git
pushd subleq/src
make sq
cp sq "${pkg}/usr/local/bin/"
popd
main: "main.sq"
template: |
12 12 3

View File

@ -7,6 +7,15 @@ monacoLang: swift
install:
apt:
- libpython2.7
manual: |
install -d "${pkg}/opt/swift"
install -d "${pkg}/usr/local/bin"
ver="$(latest_release apple/swift | grep -Eo '[0-9.]+')"
wget "https://swift.org/builds/swift-${ver}-release/ubuntu2004/swift-${ver}-RELEASE/swift-${ver}-RELEASE-ubuntu20.04.tar.gz" -O swift.tar.gz
tar -xf swift.tar.gz -C "${pkg}/opt/swift" --strip-components=2
ln -s /opt/swift/bin/swiftc "${pkg}/usr/local/bin/swiftc"
ln -s /opt/swift/bin/sourcekit-lsp "${pkg}/usr/local/bin/sourcekit-lsp"
main: "main.swift"
template: |

View File

@ -1,12 +1,44 @@
id: "tabloid"
name: "Tabloid"
install:
scripts:
tabloid: |
#!/usr/bin/env node
const fs = require("fs");
const args = process.argv.slice(2);
if (args.length !== 1) {
console.error("usage: run.js FILE");
process.exit(1);
}
const lang = require("/opt/tabloid/lang");
const program = fs.readFileSync(args[0], "utf-8");
const tokens = lang.tokenize(program);
const parser = new lang.Parser(tokens);
const ast = parser.parse();
const runtime = { print: (s) => console.log(s.toString().toUpperCase() + "!") };
const env = new lang.Environment(runtime);
env.run(ast);
manual: |
install -d "${pkg}/opt/tabloid"
pushd "${pkg}/opt/tabloid"
wget https://github.com/thesephist/tabloid/raw/master/static/js/lang.js
cat <<"EOF" >> lang.js
module.exports = { tokenize, Parser, Environment };
EOF
popd
main: "main.tabloid"
template: |
YOU WON'T WANT TO MISS "Hello, world"
PLEASE LIKE AND SUBSCRIBE
run: |
node /opt/tabloid/run.js main.tabloid
tabloid main.tabloid
hello: |
HELLO, WORLD!

View File

@ -3,6 +3,29 @@ aliases:
- "mung"
name: "TECO"
install:
scripts:
teco-encode: |
#!/usr/bin/env -S python3 -u
import re
import sys
for line in sys.stdin:
line = re.sub(r"\^(.)", lambda m: chr(ord(m.group(1)) ^ 0b1000000), line)
line = line.replace("$", chr(27))
print(line, end="")
manual: |
install -d "${pkg}/usr/local/bin"
git clone https://github.com/blakemcbride/TECOC.git
pushd TECOC/src
make -f makefile.linux
cp tecoc "${pkg}/usr/local/bin/tecoc"
ln -s /usr/local/bin/tecoc "${pkg}/usr/local/bin/teco"
ln -s /usr/local/bin/tecoc "${pkg}/usr/local/bin/mung"
popd
repl: |
teco
input: "123*234=\x1b\x1b"

View File

@ -8,10 +8,26 @@ name: "TeX"
install:
prepare:
apt:
# Lua 5.4 is the most recent version but seemingly it's not
# supported by luarocks.
- lua5.3
- liblua5.3
- luarocks
- $(grep-aptavail -wF Package "liblua[0-9.]+-dev" -a -XF Version "$(grep-aptavail -XF Provides lua -s Version -n | sort -Vr | head -n1)" -s Package -n | head -n1)
apt:
- lua5.3
- texlive-binaries
manual: |
install -d "${pkg}/usr/local/bin"
luarocks --tree="${pkg}/opt/digestif" install digestif
cat <<EOF > "${pkg}/usr/local/bin/digestif"
#!/usr/bin/env bash
$(luarocks --tree=/opt/digestif path)
exec /opt/digestif/bin/digestif "\$@"
EOF
chmod +x "${pkg}/usr/local/bin/digestif"
repl: |
tex

View File

@ -1,6 +1,17 @@
id: "thue"
name: "Thue"
install:
manual: |
install -d "${pkg}/usr/local/bin"
wget "$(curl -sSL https://catseye.tc/distribution/Thue_distribution | grep -Eo 'https://catseye.tc/distfiles/thue-[^"]+\.zip' | head -n1)" -O thue.zip
unzip thue.zip
pushd thue-*
./build.sh
cp bin/thue "${pkg}/usr/local/bin/"
popd
main: "main.thue"
template: |
a::=~Hello, world!

View File

@ -3,6 +3,10 @@ aliases:
- "tom"
name: "TOML"
install:
riju:
- yj
main: "main.toml"
template: |
output = "Hello, world!"

View File

@ -3,8 +3,27 @@ aliases:
- "ucm"
name: "Unison"
install:
prepare:
apt:
- haskell-stack
manual: |
mkdir -p "${pkg}/opt/unison/skel"
install -d "${pkg}/usr/local/bin"
git clone https://github.com/unisonweb/unison.git
pushd unison
stack build
cp "$(stack exec which unison)" "${pkg}/usr/local/bin/"
popd
pushd "${pkg}/opt/unison/skel"
"${pkg}/usr/local/bin/unison" -codebase . init
LESS="+q" "${pkg}/usr/local/bin/unison" -codebase . <<< 'pull https://github.com/unisonweb/base:.trunk .base'
popd
setup: |
shopt -s dotglob && cp -R /opt/unison/project-template/* ./
shopt -s dotglob && cp -R /opt/unison/skel/* ./
repl: |
unison -codebase .

View File

@ -6,6 +6,32 @@ name: "Unlambda"
install:
apt:
- unlambda
scripts:
unlambda-repl: |
#!/usr/bin/env python3
import argparse
import readline
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("file", nargs="?")
args = parser.parse_args()
if args.file:
with open(args.file) as f:
subprocess.run(["unlambda"], input=f.read(), encoding="utf-8")
while True:
try:
code = input("λ> ")
except KeyboardInterrupt:
print("^C")
continue
except EOFError:
print("^D")
break
if not code:
continue
subprocess.run(["unlambda"], input=code, encoding="utf-8")
repl: |
unlambda-repl

View File

@ -3,6 +3,20 @@ aliases:
- "vlt"
name: "Velato"
install:
apt:
- mono-runtime
manual: |
install -d "${pkg}/opt/velato"
install -d "${pkg}/usr/local/bin"
file="$(curl -fsSL http://velato.net/ | grep -Eo 'Velato[0-9_]+.zip')"
wget "http://velato.net/Content/Velato/${file}" -O velato.zip
unzip -d "${pkg}/opt/velato" velato.zip
wget http://www.archduke.org/midi/asc2mid.c
clang asc2mid.c -o "${pkg}/usr/local/bin/asc2mid"
main: "main.asc"
template: |
format=1 tracks=2 division=2880

View File

@ -1,7 +1,7 @@
id: "vim"
id: "vimscript"
aliases:
- "vim"
- "viml"
- "vimscript"
name: "Vimscript"
install:

View File

@ -10,6 +10,7 @@ monacoLang: vb
install:
apt:
- mono-vbnc
- mono-runtime
main: "main.vb"
template: |

View File

@ -8,7 +8,7 @@ install:
- whitespace
main: "main.ws"
template: "Hello, world \t \t \n\t\n \t\t \t \t\n\t\n \t\t \t\t \n\t\n \t\t \t\t \n\t\n \t\t \t\t\t\t\n\t\n \t \t\t \n\t\n \t \n\t\n \t\t\t \t\t\t\n\t\n \t\t \t\t\t\t\n\t\n \t\t\t \t \n\t\n \t\t \t\t \n\t\n \t\t \t \n\t\n \n\n\n"
template: "Hello, world \t \t \n\t\n \t\t \t \t\n\t\n \t\t \t\t \n\t\n \t\t \t\t \n\t\n \t\t \t\t\t\t\n\t\n \t \t\t \n\t\n \t \n\t\n \t\t\t \t\t\t\n\t\n \t\t \t\t\t\t\n\t\n \t\t\t \t \n\t\n \t\t \t\t \n\t\n \t\t \t \n\t\n \n\n"
run: |
whitespace main.ws

View File

@ -6,10 +6,6 @@ aliases:
- "x86-64"
name: "x86"
install:
apt:
- clang
main: "main.S"
template: |2
.text

View File

@ -1,19 +0,0 @@
id: "рапира"
aliases:
- "rap"
- "rerap"
- "rerap2"
- "rapira"
name: "Рапира"
install:
prepare:
apt:
- clang
main: "main.rap"
template: |
вывод: "Hello, world!"
run: |
rapira main.rap

View File

@ -1,24 +0,0 @@
id: "قلب"
aliases:
- "qalb"
name: "قلب"
repl: |
node /opt/qalb/repl.js
input: |
(ضرب ١٢٣ ٢٣٤)
main: "main.qalb"
template: |
(قول "مرحبا يا عالم")
run: |
node /opt/qalb/repl.js main.qalb
hello: |
مرحبا يا عالم
scope:
code: |
(حدد خ (ضرب ١٢٣ ٢٣٤))
input: |
خ

View File

@ -1,19 +0,0 @@
id: "எழில்"
aliases:
- "ezhil"
- "ezhili"
- "ezhuthi"
- "tamil"
name: "எழில்"
repl: |
ezhili
main: "main.n"
template: |
பதிப்பி "வணக்கம், உலகமே!"
run: |
ezhili main.n; ezhili
hello: |
வணக்கம், உலகமே!

View File

@ -48,7 +48,7 @@ sudo apt-get update`);
deb,
} = install;
if (prepare) {
const { apt, npm, manual } = prepare;
const { apt, npm, opam, manual } = prepare;
if (apt && apt.length > 0) {
parts.push(`\
sudo apt-get install -y ${apt.join(" ")}`);
@ -56,6 +56,12 @@ sudo apt-get install -y ${apt.join(" ")}`);
if (npm && npm.length > 0) {
parts.push(`\
sudo npm install -g ${npm.join(" ")}`);
}
if (opam && opam.length > 0) {
parts.push(`\
sudo opam init -n --disable-sandboxing --root /opt/opam
sudo opam install "${opam.join(" ")}" -y --root /opt/opam
sudo ln -s /opt/opam/default/bin/* /usr/local/bin/`);
}
if (manual) {
parts.push(manual);