esolang/imagemagick
Easily execute ImageMagick programming language
50
This image is a part of esolang-box 2.3.0.
esolang-box project aims to provide easy and normalized interface for many (currently 229 (!)) programming languages by Docker, especially to uncommon esoteric programming languages.
The implementation and interpreter of language ImageMagick is included in this image and
can be invoked by the simple one command imagemagick
.
(it's also an alias of script
command, so you can use either.)
This script accepts standard input as the input of program and the first argument as program code file. The output of the script will be printed into standard output. This convension is shared between all esolang-box images, so you can use another language easily.
Supposing you have hello world script hello.magick
in the current directory like this:
$ cat hello.magick
convert -size 13x1 -depth 8 canvas: -fx '(i==0?72:(i==1?101:(i==2?108:(i==3?108:(i==4?111:(i==5?44:(i==6?32:(i==7?87:(i==8?111:(i==9?114:(i==10?108:(i==11?100:(i==12?33:10)))))))))))))/256' gray:-
You can execute it with the following command:
$ docker run --rm -v "$PWD":/code:ro esolang/imagemagick imagemagick /code/hello.magick
Hello, World!
$ docker run -i --rm -v "$PWD":/code:ro esolang/imagemagick imagemagick /code/hello.magick < input.txt
$ docker run -it --rm -v "$PWD":/code:ro esolang/imagemagick sh
# imagemagick /code/hello.magick
Hello, World!
esolang-box 2.3.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/imagemagick imagemagick /code/hello.magick
Hello, World!
Some considerations:
--cap-add=SYS_PTRACE
(especially you must not use it with Xenial).docker pull esolang/imagemagick