Fish Chips and Mushy Peas

From Esolang
Jump to navigation Jump to search
The title of this article is not correct because of technical limitations. The correct title is actually ><>\\.:..

><>\\.:. (pronounced as "fish chips and mushy peas") is a stack-based, reflective, two-dimensional esoteric programming language based directly off of ><>, with some inspiration from *><>. It was created by User:More-Wrong in 2022.

Concepts

In the same vein as ><> and *><>, ><>\\.:. is a two-dimensional language, meaning the code is not necessarily executed in a linear manner. Using various instructions, the direction the code is read can be changed to either up, down, left or right. It is also a stack-based language, so all operations are performed on a stack. You can also store and retrieve values in the codebox, so making a proper compiler is very hard, if not impossible. To make this even more challenging, the code can also be loaded dynamically, and then edited from outside of its own code box.

><>\\.:. is intended to allow far greater flexibility with the kinds of program which can be written, while avoiding writing such capability into the language itself. To facilitate this, the language adds 'layers', each of which is an independent 2 dimensional space, which can be loaded either from other files, or from a native library. Currently only a graphical library exists, but the structure should allow virtually any native capability to be used.

One very notable difference between ><> and ><>\\.:. is that ><>\\.:. has types of value, between bytes, 32 and 64 bit integers and single and double floating point numbers. This is in order to allow better interactions with libraries, and allow far larger spaces to be realised.


See *><>#Concepts for more information.

Code execution

Every layer is viewed as executable, and special variants of the jump and call instructions exist to go between them.

See *><>#Code Execution for more information.

With the notable changes that the fisherman instruction doesn't exist in ><>\\.:.

Stacks, errors, and basic IO are the same here as in *><>, with the notable addition that any operation working on layer which doesn't exist is regarded as an error, and the error messages are somewhat more informative.

Concurrency

><>.:. supports concurrent execution, where new executors can be created at specified locations.

Layers

When a layer is created, a value is pushed onto the stack which is the layer number. This layer is used as the 'third dimensional coordinate', but does not have any guarantees about being consecutive or not repeating. The only guarantee is that at any one time, all the layers have different numbers.

Instructions

The following is merely a draft of the instructions in ><>\\.:., and is subject to change. Instructions are case-sensitive. All instructions from ><> are kept as in the original language, and those commands kept from *><> are generally the same, with the notable exception that the . command is replaced by j. (Please note that this is work in progress, but a general description exists on the Github.).

Examples

See the ><> page for more examples (replacing . with j), and for a more detailed example, see the Snake implementation here.

Interpreters

The only known interpreter (and the official ish one) is written in Java. The latest version is available here - please note that it is currently only available as uncompiled Java.