Mineso
A tape where the first cells are the operators, and every number is written in 1s.
DeadlyFugu, 2011 · Turing complete: unknown · ●●○ moderate · esolangs.org
Tested with 5 known programs · Test method
Run it
The idea
DeadlyFugu made Mineso in 2011. It has a tape of cells and a pointer, as brainfuck does, but there is no add or print command. Instead some cells act on any value sent to them. Send 5 to cell 1 and it adds 5 to itself; send 72 to cell 6 and it prints H. The specification says this lets an implementation add new operations or I/O as new cells, without new commands.
Read the story
The only digit is 1. Each command takes the number of 1s that follow it, so >111111 sends to cell 6. Every other character is ignored, which leaves room for comments.
The machine
| Command | Does |
|---|---|
-n | Point at cell n |
<n | Send n to the cell |
>n | Send the cell's value to cell n |
=n | Set the cell to n, without its rule |
@n | Copy cell n into the cell, without its rule |
?n | Set the cell to 1 or 0 by test n against cell 5; 0 equal, 1 less, 2 greater, 3 not |
[n ]n | If the cell is not 0, jump n+1 commands forward or back |
| Cell | A value sent here |
|---|---|
| 0 | Goes to that command; the cell holds the command being run |
| 1 2 3 4 | Is added, subtracted, multiplied or divided into it |
| 6 | Is printed as a character |
| 9 10 | Shifts it left or right by that much |
| 11 | Is printed as a number |
The reference interpreter has 256 cells of 8 bits, and so does this implementation. The specification leaves the start of the pointer open; it is cell 0.
Example
The count down sets cell 2 to 6, subtracts 1 by sending it there and sends the result to cell 11 to print it.
The count down sets cell 2 to 6, subtracts 1 by sending it there and sends the result to cell 11 to print it. ]1 jumps back two commands while cell 2 is not 0.
The powers of two keep a counter in cell 2 and a value in cell 9. Sending 1 to cell 9 shifts the value left by one.
Hello World adds to cell 1 and sends it to cell 6 for each letter. It ends up at r in cell 6 and pulls that back with @111111 to reach l and d.
Patterns it teaches
- Turing tarpit: eight commands and a unary digit.
Further
See also
Cell-based
Write your own in Run Convert a program from Mineso
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: mineso.
Command line
shib run mineso -e '-11=111111<1>11111111111]1'shib manual minesoSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/mineso.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org