esolang

MineStax

Six letters stack white and black blocks into a wall, and the wall is the output.

ProfNinja, 2022 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: . . . . . . . . . . . . . . . .

The idea

ProfNinja made MineStax with his daughter, to run inside Minecraft on the mc86 architecture. It made its debut in a capture the flag contest. The blocks are concrete powder, which falls under gravity, so every block lands on top of a column. A program builds a wall of black and white columns, and the specification calls that wall its output. It is not Turing complete, and the specification notes that some programs act as a black and white image encoding.

The machine

An endless row of stacks, one of them active, and a colour that starts as white.

CharDoes
iPut a block of the colour on the active stack
cSwitch the colour between white and black
dCopy the active stack into the place to its left and make the copy active
sPile the active stack onto the stack to its right and make that one active
l rMake the stack to the left or right active

Every other character is ignored. This implementation prints the wall as text, one line per row from the top. # is a black block, . a white one, and a space stands above a shorter column.

Example

Two ways to build a column of 16 white blocks.

Two ways to build a column of 16 white blocks. The second makes two blocks, then copies the column to the left and piles the copy back on it three times, doubling it each time.

Expected: . . . . . . . . . . . . . . . .

A plus sign of three columns, built from left to right.

Expected: .#. ### .#.
.#.
###
.#.

The Hello World is 2,145 characters long. It builds the wall from right to left out of 98 columns of 16 blocks, and the black blocks spell Hello World!.

..................................................................................................
..................................................................................................
..................####.....###...............................................####.........#.......
.#....##............##......##....................##.....##....................##.........#.....#.
.#....##............##.......#.....................#.....##....................##.........#.....#.
.#....##...###......##.......#.......##............#.....##...##.....#..##.....##......####.....#.
.#....##..#####.....##.......#.....#####...........#..#..#..######...######....##.....#####.....#.
.#######.##...##....##.......#.....#...##..........##.##.#..##..##...##........##....##...#.....#.
.#######.#######....##.......#....##....#..........#####.#..#....#...##........##....##...#.....#.
.#....##.#######....##.......#....##....#..........#######.##....##..#.........##....#....#.....#.
.#....##.##.........##.......#....##...##..........###.###..#....#...#.........##....##...#.......
.#....##..##........##.......#.....##..##..........###..##..##..##...#.........##....##..##.......
.#....##...#####..######..#######...####...........##...##...####....#.......######...#####.....#.
..................................................................................................
..................................................................................................
..................................................................................................

Further

Also in Jokes

Write your own in Run Convert a program from MineStax

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: minestax.

Command line

shib run minestax -e 'iidsdsds'
shib manual minestax

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/minestax.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org