New language: Binary Lambda Calculus

This commit is contained in:
Radon Rosborough 2020-07-17 18:12:45 -06:00
parent ce9c968d76
commit 720acc50bb
3 changed files with 38 additions and 0 deletions

View File

@ -223,6 +223,22 @@ Nude pagoda careens.
main: "main.be",
run: "befunge-repl main.be",
template: `64+"!dlrow ,olleH">:#,_@
`,
},
blc: {
aliases: [
"binarylambdacalculus",
"lc",
"binary",
"lambdacalculus",
"lambda",
],
name: "Binary Lambda Calculus",
monacoLang: "plaintext",
main: "main.blc",
run: "cat main.blc | binary-to-text | tromp",
template: `001010100100100001100101011011000110110001101111001011000010
000001110111011011110111001001101100011001000010000100001010
`,
},
brainf: {

View File

@ -56,6 +56,23 @@ befunge.run(fs.readFileSync(args[0], { encoding: "utf-8" })).catch((err) => {
EOF
chmod +x /usr/bin/befunge-repl
# Binary Lambda Calculus
tee /usr/bin/binary-to-text >/dev/null <<"EOF"
#!/usr/bin/env python3
import re
import sys
text = re.sub(r"[^01]", "", sys.stdin.read())
out = []
for m in re.finditer(r"([01]{8})", text):
out += chr(int(m.group(0), 2))
print("".join(out), end="")
EOF
chmod +x /usr/bin/binary-to-text
# BrainF
tee /usr/bin/brainf-repl >/dev/null <<"EOF"
#!/usr/bin/env python3

View File

@ -11,6 +11,11 @@ sed -i 's#env python#env python2#' Beatnik/script/beatnik.py
mv Beatnik/script/beatnik.py /usr/bin/beatnik
rm -rf Beatnik
# Binary Lambda Calculus
wget -nv https://www.ioccc.org/2012/tromp/tromp.c
clang tromp.c -Wno-everything -DInt=long -DX=8 -DA=500000 -o /usr/bin/tromp
rm tromp.c
# Erlang
git clone https://github.com/erlang-ls/erlang_ls.git
pushd erlang_ls >/dev/null