esolang

Pizza Delivery

A pointer delivering bytes around a 16 by 16 square, one of eight directions at a time.

Cortex, 2019 · Turing complete: with unbounded memory · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Hello, World!

The idea

Cortex named Pizza Delivery after the pizza theme from the Spider-Man 2 game, which has nothing to do with it. The memory is a square of 256 bytes instead of a tape, and the pointer moves like a king in chess, with the eight keys w a s d q e z c. A number is written straight into a tile as capital hex digits, so 48 puts an H under the pointer. With a fixed square and no other memory it is a finite-state machine.

The machine

CodeDoes
w a s d q e z cMove north, west, south, east, and diagonally
0-9 A-FWrite a hex number to the tile
+ - *Add 1, subtract 1, double
` | Print the tile as a character
?Read a number into the tile
:P :E :RIs it prime, is it even, rot13 it
[ ... ] ( ... ]Repeat while the tile is not 0, or while it is 0
{Turn those loops into ifs, or back
@Run the tile's character as code
.End
#...#A comment

The specification also lists . as string input. Its examples only use it to end, so that is all it does.

Example

The Hello World writes the message backwards along the top row, from 21 (!) to 48 (H), then walks west…

The Hello World writes the message backwards along the top row, from 21 (!) to 48 (H), then walks west printing, and steps back east for the second o, the r and the l.

Expected: A
Expected: 0

Further

Ideas it shows

Cell-based

Write your own in Run Convert a program from Pizza Delivery

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: pizza-delivery.

Command line

shib run pizza-delivery -e '?`.' --input '65'
shib manual pizza-delivery

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/pizza-delivery.js

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

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