Get the code
git clone <the repository> esolang
cd esolang
node tools/cli/shib.js serve # the site on port 4173, pages built on first start
node tools/cli/shib.js run brainfuck -e "++++++++[>++++++++<-]>+.+.+."
ABC- Call the site over HTTP, every public route with a curl.
- The kernel, its 49 instructions and the
.shibformat. - Add a language, from an empty file to its page, its checks and a pull request.
- Checks, how each interpreter is tested.
- Watch a run, the machine after every step.
- Self-host and data downloads.
The shib command
shib is node tools/cli/shib.js, run from the project root, or one word with an alias.
alias shib='node tools/cli/shib.js' # bash, zsh
function shib { node tools/cli/shib.js @args } # PowerShell
| command | does |
|---|---|
shib langs [--family x] | list every language with its family, then the .shib language files |
shib run <lang|file.shib> <program file|-|-e text> [--input text] [--steps n] [--mode name] | run a program written in a language (-e gives the program itself) |
shib manual <lang|file.shib> | what each command or word of a language does |
shib convert <from> <to> <file|-> [--input text] [--via route] [--quiet] | translate a program between languages (tools/convert/convert.js) |
shib build | build every page from the tracked sources |
shib check [--only a,b] [--jobs n] [--full] | build, then run every */check.js one at a time (--jobs n runs n at once) and print a summary table |
shib evolve <seed> <generations> [--out folder] | grow a language in world <seed> for that many generations (shibboleth/base/play.js) |
shib bank | challenge counts per source (compete/bank/) |
shib serve [--port n] [--online] | start the site (museum/server/server.js); --online leaves out what online.json keeps internal |
shib help [command] | this list |
The exit codes are 0 ok, 1 failed, 2 unknown name (with suggestions), 3 a part this copy of the project does not have. Add --json to any command for one line of JSON, {"ok": true, ...} or {"ok": false, "error": ..., "hint": ...}.
Run a program
shib run brainfuck -e "++++++++[>++++++++<-]>+.+.+."
ABC
shib run brainfuck -e ",[.,]" --input hello
hello
shib run deadfish -e "iisiiiisiiiiiiiio"
72A program can also come from a file, or from stdin with -.
shib run befunge hello.bf
echo ',[.,]' | shib run brainfuck - --input hi
--steps n sets the step budget (1,000,000 by default). A program that runs out stops and says so on stderr.
Run has the same interpreters, brainfuck and Deadfish among them, in one editor.
Find a language
shib langs
brainfuck brainfuck brainfuck
ook brainfuck Ook! (version 1)
deadfish deadfish Deadfish (version 1)
fuck brainfuck !!Fuck
aaa brainfuck AAA
almbarc12yo brainfuck ALMBARC12YO
alphuck brainfuck Alphuck
angelfrick brainfuck Angelfrick
…
1734 languages: 96 brainfuck, 12 deadfish, 1606 handport, 13 shibboleth-3, 4 shibboleth-2, 3 shibboleth-1
shib langs --family deadfish
deadfish deadfish Deadfish (version 1)
sakana deadfish Sakana
pes-te-mort deadfish Pește mort
numbered-deadfish deadfish Numbered DeadFish
xkcd deadfish XKCD
usnnzge deadfish f()
u19zbpjq deadfish F!--
u1i9okyo deadfish 嘭!哐!叮!呲!咣!
…
12 languages: 12 deadfish
shib manual ook
Ook! (version 1) (ook), brainfuck family, version 1 teacher
words
"Ook. Ook." means brainfuck +
"Ook! Ook!" means brainfuck -
"Ook? Ook." means brainfuck <
"Ook. Ook?" means brainfuck >
"Ook! Ook." means brainfuck .
…
"Ook? Ook!" means brainfuck ]A misspelt name gets suggestions.
shib run brainfack -e "+" # exit 2
shib run: no language called "brainfack"
did you mean: brainf-ck, brainfuck, brainflak?All languages lists every language page, with a search.
JSON
shib run brainfuck -e ",[.,]" --input hi --json
{"ok":true,"command":"run","language":"brainfuck","kind":"registry","family":"brainfuck","output":"hi","bytes":[104,105],"halted":true,"why":"","steps":8,"base":",[.,]"}Convert between languages
shib convert brainfuck ook museum/docs/abc.b --quiet
The converter runs both programs and stops when they disagree, or when the target cannot say it.
shib convert brainfuck deadfish museum/docs/abc.b --quiet # exit 1
shib convert: tools/convert/convert.js failed: impossible: Deadfish (version 1) cannot print this output ("ABC"): Deadfish prints only decimal numbers from 0 to 2147483647 but 256, each with a line feedConvert shows which languages a program converts into, and how well each route holds up.
Build, check, serve
shib build # every page, from the tracked sources
shib check # build, then every */check.js, with a table (minutes)
shib check --only langs # one part
shib serve # the site on port 4173
shib serve --online # as a visitor sees it: internal parts left out, nothing written
shib serve --port 8080
Grow a language
shib evolve 1 300 --out runs # world 1, 300 generations, into runs/world-1
Kernel lists what it prints and writes. Shibboleth describes a language grown this way; Train grows one in the browser.
What is where
| folder | holds |
|---|---|
langs/ | the interpreters |
museum/ | the language pages, the lessons, the server, the page shell, these docs |
shibboleth/ | the evolving language, its kernel, worlds and learning |
compete/ | the challenge bank, golf, quines, the arena |
tools/ | shib, the converter, the detector, the esolangs.org catalog |
lab/ | experiments as specs, with their results |