Awesome
esolang-box 2.4.0
Easy and standardized docker images for 200+ esoteric (and non-esoteric) languages.
Usage
Distributed docker images are separated for each esolangs.
For example docker image for Evil language is named as esolang/evil
, which is hosted on Docker Hub.
How to run your own esolang program
Suppose you have program in the current directory,
$ echo aeeeaeeewueuueweeueeuewwaaaweaaewaeaawueweeeaeeewaaawueeueweeaweeeueuw > program.evil
then you can run the program like the following.
$ docker run -v `pwd`:/code:ro esolang/evil evil /code/program.evil
Hello, World!
Observing usage of exec syscalls
esolang-box 2.2.0 supports tracing of execve
and execveat
syscalls by strace command.
Setting STRACE_OUTPUT_PATH
environment variables and enabling ptrace will produce strace log to the specified path.
$ docker run --cap-add=SYS_PTRACE --rm -v `pwd`:/code --env STRACE_OUTPUT_PATH=/code/strace.txt esolang/evil evil /code/program.evil
Hello, World!
Some considerations:
- Enabling ptrace breaks seccomp filter before kernel 4.8. You should be very careful to use
--cap-add=SYS_PTRACE
(especially you must not use it with Xenial). - Using strace costs a huge performance overhead and syscalls may be 10x slower.
Simple benchmark:
~ # cat benchmark.rb
sum = 0
1000.times do |i|
seq = `seq #{i}`.split.map(&:to_i)
sum = seq.sum
end
p sum
~ # echo -n "" | time ruby benchmark.rb
499500
real 0m 3.57s
user 0m 0.78s
sys 0m 0.70s
~ # echo -n "" | time strace -f -q -o strace.txt -e trace=execve,execveat ruby benchmark.rb
499500
real 0m 28.90s
user 0m 1.19s
sys 0m 13.73s
List of boxes
esolang/base
esolang/build-base
esolang/multi-reader
: multi-readeresolang/osecpu
: osecpuesolang/osecpu-aska
: osecpu-askaesolang/rescript
: ReScriptesolang/codemania
: CodeManiaesolang/3var
: 3varesolang/axo
: Axoesolang/befunge93
: Befunge-93esolang/befunge98
: Befunge-98esolang/c-gcc
: C (GCC)esolang/dis
: Disesolang/glass
: Glassesolang/r
: Resolang/ruby
: Ruby 3.2.0esolang/ruby-trunk
: Ruby trunkesolang/golfscript
: GolfScriptesolang/hexagony
: Hexagonyesolang/stackcats
: Stack Catsesolang/standback
: (?i:standback)esolang/starry
: Starryesolang/cy
: Cyesolang/labyrinth
: Labyrinthesolang/typhon
: Typhonesolang/alice
: Aliceesolang/wake
: wakeesolang/reversed-c
: reversed-cesolang/copos-rb
: copos (Ruby)esolang/golfish
: golfishesolang/pxem
: Pxemesolang/arithmetic
: Arithmeticesolang/vim
: Vimesolang/pyramid-scheme
: Pyramid Schemeesolang/brainfuck-esomer
: Brainfuck (esomer)
esolang/goruby
: gorubyesolang/ruby1
: Ruby 1.8esolang/make
: Makeesolang/bash-pure
: Bash (pure)esolang/fish-shell-pure
: Fish (pure)esolang/zsh-pure
: Zsh (pure)esolang/malbolge
: Malbolgeesolang/piet
: Pietesolang/python1
: Python 1esolang/rail
: Railesolang/simula
: Simulaesolang/snowman
: Snowmanesolang/streem
: Streemesolang/unlambda
: Unlambdaesolang/verilog
: Verilog (Icarus Verilog)esolang/wierd
: Wierdesolang/wordcpu
: Word!CPUesolang/aheui
: Aheuiesolang/beatnik
: Beatnikesolang/blc
: Binary lambda calculusesolang/spl
: Shakespeareesolang/intercal
: INTERCALesolang/lolcode
: LOLCODEesolang/minus
: Minusesolang/taxi
: Taxiesolang/adjust
: ADJUSTesolang/braille
: Brailleesolang/rust
: Rustesolang/cubically
: Cubicallyesolang/sceql
: Sceqlesolang/apl
: APLesolang/wat
: WebAssembly Text Formatesolang/lazyk
: Lazy-Kesolang/doubleplusungood
: Doubleplusungoodesolang/llvm-ir
: LLVM 10 IResolang/hanoi_stack
: Hanoi_Stackesolang/dotnet-base
esolang/fortran
: Fortran 2018esolang/ring
: Ringesolang/snobol
: SNOBOL4esolang/cobol
: COBOLesolang/fetlang
: Fetlangesolang/alphabeta
: AlphaBetaesolang/tcl
: Tclesolang/rapira
: РАПИРАesolang/vlang
: Vesolang/cyclicbrainfuck
: Cyclic Brainfuckesolang/olang
: Oesolang/wren
: Wrenesolang/clisp-sbcl
: Common LISP (SBCL)esolang/python2
: Python 2esolang/haystack
: Haystackesolang/stuck
: Stuckesolang/unicat
: Unicatesolang/unreadable
: Unreadableesolang/zombie
: ZOMBIEesolang/aubergine
: Aubergineesolang/path
: PATHesolang/recurse
: Recurseesolang/fernando
: FerNANDoesolang/gs2
: gs2esolang/logicode
: Logicodeesolang/minimal2d
: Minimal-2Desolang/i4004asm
: Intel 4004 Assemblyesolang/suzy
: Suzyesolang/snusp
: SNUSPesolang/brainfuck-esotope
: Brainfuck (esotope)
esolang/java
: Javaesolang/csharp
: C# (Mono)esolang/jq
: jqesolang/node
: Node.jsesolang/unicue
: Unicueesolang/beam
: Beamesolang/cubix
: Cubixesolang/japt
: Japtesolang/stop
: STOPesolang/htms
: htmsesolang/maybelater
: Maybe Lateresolang/nadesiko
: なでしこ3esolang/floating
: Floatingesolang/qlb
: قلبesolang/calc
: LibreOffice Calcesolang/nuts
: Nutsesolang/canvas
: Canvasesolang/wysiscript
: WysiScriptesolang/tetris
: Tetrisesolang/wenyan
: 文言esolang/hakerh-base
esolang/compile-time-typescript
: Compile-time TypeScriptesolang/emojifunge
: emojifunge
esolang/octave
: Octaveesolang/perl
: Perlesolang/php
: PHP 7.0esolang/python3
: Python 3esolang/ffb
: Foobar and Foobaz and Barbaz, oh my!esolang/ezhil
: எழில்esolang/exchangeif
: ExchangeIFesolang/ubergenes
: UberGenesesolang/2sable
: 2sableesolang/fish
: ><>esolang/arcyou
: Arcyóuesolang/bots
: Botsesolang/emoji
: Emojiesolang/zucchini
: Zucchiniesolang/cardinal
: Cardinalesolang/hbcht
: Half-Broken Car in Heavy Trafficesolang/jelly
: Jellyesolang/jellyfish
: Jellyfishesolang/width
: Widthesolang/asciidots
: AsciiDotsesolang/picfunge
: PicFungeesolang/iwashi
: Iwashiesolang/hypertorus
: HyperTorusesolang/gaia
: Gaiaesolang/triangularity
: Triangularityesolang/backhand
: Backhandesolang/mines
: Minesesolang/mao
: MAOesolang/pure-folders
: Pure Folders
esolang/cmd
: cmd.exeesolang/lua
: Luaesolang/ocaml
: OCamlesolang/haskell
: Haskellesolang/erlang
: Erlangesolang/awk
: awk (GNU awk)esolang/perl6
: Perl 6esolang/ballerina
: Ballerinaesolang/sed
: sedesolang/m4
: m4esolang/racket
: Racketesolang/gnuplot
: gnuplotesolang/golang
: Goesolang/zig
: Zigesolang/ffmpeg
: FFmpeg
esolang/ubuntu-base
esolang/ada
: Ada (GNU GNAT)esolang/crystal
: Crystalesolang/d-dmd
: D (DMD)esolang/d-gdc
: D (GDC)esolang/emojicode
: Emojicodeesolang/powershell
: PowerShellesolang/ed
: GNU edesolang/fugue
: Fugueesolang/x86asm-nasm
: x86 Assembly (nasm)esolang/swift
: Swiftesolang/cpp-clang
: C++ (Clang)esolang/moo
: mooesolang/abc
: ABCesolang/tex
: TeX (plain)esolang/egison
: Egisonesolang/sqlite3
: SQLite3esolang/imagemagick
: ImageMagickesolang/apache2-rewrite
: Apache mod_rewriteesolang/nim-lang
: Nimesolang/csound
: Csound
esolang/brainfuck-bfi
: Brainfuck (BFI)
Notes about some languages
Bash (pure)
Simulates behavior of "Bash (builtins)" in Anarchy Golf.
BibTeX
\n
in input is replaced as single space.- multiple spaces and `\n' in input are replaced as single space.
- The script should call
newline$
at tail of output. - input will be passed as
input
entry. - the style type is
source
.
Brainfuck (bfi)
Unlike Brainfuck (esotope)
, this execution simulates behavior of "brainfuck" in Anarchy Golf.
To achieve this, I have patched a tricky line to the original code.
--- BFI.c
+++ BFI.c
@@ -46,6 +46,7 @@
int pc, args, xc, prog_len, l = 0;
int x[32768];
int p[32768];
+ int xxx[1] = {'['};
FILE *stream, *fopen();
Compile-time C++ (Clang, C++11)
Write the constexpr function f
that receives the const char*
input as an argument and returns const char*
output.
Coq
You can use coq.io.
Csound
Input file is given as input.in
. You should write out to output.out
.
Note: DO NOT LISTEN TO GENERATED PROGRAM, IT MAY CONTAIN UNEXPECTEDLY LOUD SOUNDS, AND MAY CAUSE EAR DAMAGE.
FFmpeg
Input file is given as in.txt
. You should write out to out.txt
.
You can use both video and audio.
Note: DO NOT LISTEN TO out.pcm, IT MAY CONTAIN UNEXPECTEDLY LOUD SOUNDS, AND MAY CAUSE EAR DAMAGE.
Make
Input is given as STDIN
environment variable. This spec is equivalent to Anarchy Golf.
OpenOffice Calc
You can write CSV with the content below the B line.
The input is given in A1 cell.
Output the final result into B1 cell.
OSECPU and OSECPU-ASKA
Your program must follow these restrictions:
- Graphical user interface is not available
- debugging feature is not available
- On OSECPU: accept OSECPU binary
- On OSECPU-ASKA: accept OSECPU-ASKA source code
- On OSECPU-ASKA:
osecpu_ask.h
andapp.ask
are available at the same directory
The input is given in an file at first argument. You can get the input as follows (see app0129):
Int32s fsize:R01;
VPtr p:P01;
junkApi_fileRead(fsize, p, 1);
The official archive is built on Windows. To develop on GNU/Linux, follow this article: takeutch-kemeco's note
Pxem
The first line is the file name of the pxem code.
The rest is the content of the pxem code.
XSLT
The input is given as the content of tag <input/>
.
Transform that into the desired value.
Blacklisted languages
Below are the list of the languages that cannot even do the minimal jobs needed for esolang-battle.
- ArnorldC
- CodeMania (whitespace is automatically trimmed from input)
- Doubleplusungood (whitespace is automatically trimmed from input)
- Gaia (whitespace is automatically trimmed from input)
- Haystack
- LOGICODE (Can only take 0 or 1 from input)
- ModanShogi
- ~English
- Python 1
- РАПИРА (Input number/bool only)
- Seed
- STOP (Cannot input or output newlines)
- ///
- 🆒
- TrumpScript
- Velato
- ZOMBIE
Build images
Prerequires dobi.
$ cd /path/to/esolang-box
$ ruby build.rb
$ dobi
Run spec
Tested with Ruby 3.0.0
$ bundle install
$ bundle exec rspec