Mark
Designed by | User:MeowcaTheoRange |
---|---|
Appeared in | 2022 |
Memory system | Cell-based |
Dimensions | Two-dimensional |
Computational class | Unknown |
Reference implementation | MarkEsolang editor, Mark itch.io page, Simple Mark shellpage on Replit.com |
Dialects | Mark, Markcode, Simple Mark |
File extension(s) | Markcode: .json Simple Mark: .mark , .mk |
- Not to be confused with Marz.
Mark is a cell-based fungeoid language made by User:MeowcaTheoRange. It uses a proprietary editor written in JavaScript, HTML and Kaboom to create and edit programs.
It is sometimes described as Befunge Scratch (or more accurately, ><> Scratch) by the creator due to the editor's visual nature.
Description
Mark uses two instruction pointers (called "Command Pointer"s in the Editor) named Mark (the yellow one, who is the language's namesake and seems to be program default) and Bean (the green high-quality one.)
Data is usually stored on a cell-based tape, values of which are displayed above the Editor's console. The tape is infinite, and can contain holes (that are usually patched when values are written to the tape). Data can also be stored in various elements, to make code golfing in Mark easier.
History
Mark was created for MarkJam #2, a jam which ran on itch.io that presents various media related to a character Mark. The language and its editor were created in two days.
Dialects
Mark has many (aforementioned) dialects, listed below.
- Mark
- Markcode
- Simple Mark
Mark
The Mark dialect cannot be written in text. It can only be seen using a software to screenshot images. This can make it hard to display it in places like wikis and IRC chats.
The Mark dialect is the main dialect that the Mark editor can understand. Mark boards are 48 x 48 visually, but these limits can easily be pushed with a compiler mod. Elements are displayed visually, as a sprite, or sometimes a colored square with an arrow. (The Constant element is displayed with a number over it.)
Markcode
Markcode is a little bit easier to write down on a notepad or a text editor, however, it is still not very favored, because it has a very high tendency to bloat, making it harder to store.
Markcode elements are displayed as a JSON array, with 3 values:
[ element, direction, constant ]
(Empty elements and columns are displayed as null
instead, which is why filling a column with only one element is considered extreme bloat, because the columns suddenly have one element in it, followed by rows of null
.)
Simple Mark
Simple Mark is a proposed dialect of Mark which will make it easier to write down and create Mark programs on a common piece of note paper. It is currently in development. The Simple Mark beta with examples can be found here. The format of Simple Mark elements is seen below:
element(dir?, constant?)
Elements are separated by a space, and rows are separated by a newline. Empty elements after a line do not get displayed, while empty elements within a line become "e".
Elements
Mark programs run instructions using various elements on a 48 x 48 board. Some elements can be oriented in different ways, sometimes making them run different instructions or print an output in ASCII compared to RAW. These elements listed do the following:
Command | Command In Simple Mark | ID/Reference | Description (in-editor) | Description | Color |
---|---|---|---|---|---|
Mark | Mark |
mark | Mark. You can only place him ONCE. | The first command pointer. It constantly moves as soon as the program is started. | Not shown in minimap |
Bean | Bean |
bean | Bean. You can only place him ONCE. | The second command pointer. It constantly moves as soon as the command pointer is switched to. | Not shown in minimap |
Eraser / Empty | e |
empty | An empty tile. | This tile serves no purpose other than to erase existing elements and fill the board when a program starts. | rgb(0) |
Warp | Warp |
portal | This element will move the command pointer to the opposite warp. | This element... actually does nothing. Maybe soon it will get a proper implementation. | rgb(255, 0, 0) |
Tape | Tape |
pizza | Left/Right: Move Tape Pointer, Up/Down: Change Value at Tape Pointer | This element modifies the tape and its' pointer in different ways depending on the element's orientation. | rgb(255, 204, 0) |
Console | Console |
note | This element will write the current tape pointer value to STDOUT. Depending on the direction, it will be written in 4 ways:\nLEFT: Frogblock, DOWN: CP437, UP:ASCII, RIGHT:RAW | rgb(255) | |
Golf | Golf |
egg | This element will write its\' given string to STDOUT. Good for golfing esoteric strings. | This element is like Console, except it is easier to use because it can print strings all at once. Its' name derives from code golfing, the sport of writing programs as small as possible. Depending on the language it is viewed in, it either works in golfing (Editor) or it wastes more space than a normal Mark program. (Markcode) | rgb(255) |
Switch | Switch (requires Bean ) |
heart | When a command pointer walks over this, they will switch to the other available command pointer. | rgb(255, 140, 140) | |
Turn | Turn |
jumpy | This element turns the command pointer to the direction the element is facing. | rgb(66, 227, 255) | |
Input | Input |
polygon | This element takes user input. | This element is the only one that can pause automatic stepping at runtime, because it uses the prompt() function defined in JavaScript. |
rgb(0, 85, 255) |
Conditional | Conditional |
circle | If Tape Pointer value is more than or equal to 1, the command pointer will move two spaces. If it is 0, the command pointer will move one space. | rgb(220, 145, 255) | |
Constant | Constant |
text | A constant value | This element is kind of like Golf, and it even uses the same variable as Golf to store its' value. Instead of outputting the "constant" it stores to STDOUT, it writes the constant to tape, overwriting the cell under the pointer. | rgb(255, 111, 0) |
End Program | End |
door | This door will end the program. | (cont.) Regardless of which command pointer runs over it. | rgb(0, 255, 4) |
Wall | Wall |
steel | This wall will prevent a command pointer from moving in this direction. Instead, it will flip the direction of said command pointer. | rgb(174, 189, 194) |
Differences to Befunge & features
- Official compiler written in JavaScript
- Code development is visual, akin to program builders like Scratch
- Exported/saved code is displayed using JSON arrays
- Strings (and constants) occupy one space
- Data storage is cell-based
- There are two command pointers
- Official compiler is web-based
- Cannot self-modify, although the editor is ripe to do so
- Less instructions/elements
- Similar to Brainfuck due to command sparseness
- Code is steppable
External resources
Program examples
Mark(down) Input Conditional Turn(down) Turn(right) Console(right) End Turn(right) Turn(up)
The same Truth Machine written in Simple Mark.
Mark(down) Golf(up, "Hello, World!") End
Ditto, in Simple Mark.