Dimensional

From Esolang
Jump to navigation Jump to search
Dimensional
Paradigm(s) procedural, imperative
Designed by User:NutronStar45
Appeared in 2022
Type system bytes
Memory system cell-based
Dimensions theoretically infinite-dimensional
Computational class Unknown
Reference implementation Unimplemented
File extension(s) .dim

Dimensional is an esoteric programming language created by User:NutronStar45, where you can have infinite dimensions of infinite dimensions.

Concept

Structure

  • Board
    • Metapointer -> Worlds
      • Pointer -> Slots
        • Pointer value

Meta

"Meta" describes all things that belong between the board and the worlds.

A meta-"something" describes a "something" on a meta scale.

Notation of a slot

(-3:1, -2:-20, 0:123, 10:2) (-6:3, 1:20, 6:-5) means:

  • Coordinates of the metapointer
    • Axis -3: 1
    • Axis -2: -20
    • Axis 0: 123
    • Axis 10: 2
    • Other axes: 0
  • Coordinates of the pointer of the world the metapointer is currently pointing at
    • Axis -6: 3
    • Axis 1: 20
    • Axis 6: -5
    • Other axes: 0

A () means that the coordinates on all axes are 0.

Terminology

Board

An infinite-dimensional board with each world slot containing a world.

World

An infinite-dimensional world with each slot containing a byte. Each slot defaults to 0.

Metapointer

The metapointer is defined through a set of coordinates on the board.

The metapointer can move 1 world slot at a time.

Pointer

A pointer is defined through a set of coordinates in a world. The pointer value can be modified.

The pointer can move 1 slot at a time.

Every world has its unique pointer with potentially different values.

World slot

A world slot is defined through a set of coordinates on the board.

A world slot contains a world.

Slot

A slot is defined through a set of coordinates in a world.

A slot can contain a byte.

Pointer value

The pointer value is the value pointed by the pointer.

Syntax

Non-meta state is the default state.

Negative dimensions are prefixed with an underscore (_) instead of a hyphen (-).

There 18 instructions in Dimensional:

Syntax Action (non-meta) Example (non-meta) Action (meta) Example (meta)
>DIMENSION Increase the pointer's coordinate on the DIMENSION axis by 1. >3 increases the pointer's 3rd axis by 1. Increase the metapointer's coordinate on the DIMENSION axis by 1. m>3 increases the metapointer's 3rd axis by 1.
<DIMENSION Decrease the pointer's coordinate on the DIMENSION axis by 1. <_3 decreases the pointer's -3rd axis by 1. Decrease the metapointer's coordinate on the DIMENSION axis by 1. m<_3 decreases the metapointer's -3rd axis by 1.
> Increase the pointer's coordinate on "the pointer value" axis by 1. > increases the pointer's 0th axis by 1. Increase the metapointer's coordinate on "the pointer value" axis by 1. m> increases the metapointer's 0th axis by 1.
< Decrease the pointer's coordinate on "the pointer value" axis by 1. -< decreases the pointer's -1st axis by 1. Decrease the metapointer's coordinate on "the pointer value" axis by 1. m-< decreases the metapointer's -1st axis by 1.
+ Increase the pointer value by 1. Same
- Decrease the pointer value by 1. Same
:CHAR Set the pointer value to the equivalent ascii/unicode. :" sets the pointer value to 0x22 (34). Same
=HEX Set the pointer value to the specified value, case-insensitive. =5b sets the pointer value to 0x5B (91). Same
. Output the pointer value in ASCII/Unicode ++++++++++. outputs \x0A (\n). Same
, Accept a character between \x00 and \xff and store it as the pointer value. ,. defines a cat program. Same
[ Continue if the pointer value isn't 0, or skip past the matching ] otherwise. +[,.] defines a repeating cat program. Same
] Jump back to the matching [. Same
{DIMENSION Continue if the pointer's coordinate on the DIMENSION axis isn't 0, or skip past the matching } otherwise. Continue if the metapointer's coordinate on the DIMENSION axis isn't 0, or skip past the matching } otherwise.
} Jump back to the matching {. Same
?DIMENSION Get the remainder of the pointer's coordinate on the DIMENSION axis divided by 256 and store it as the pointer value. Get the remainder of the metapointer's coordinate on the DIMENSION axis divided by 256 and store it as the pointer value.
!DIMENSION Set the pointer's coordinate on the DIMENSION axis to 0. !_1 sets the pointer's -1st axis to 0. Set the metapointer's coordinate on the DIMENSION axis to 0. m!_1 sets the metapointer's -1st axis to 0.
m or M Switch to "meta" state Switch to "non-meta" state
* Toggle comment mode. Same

Implementations

A C++ interpreter of version 1.0 by User:Bangyen.

Changelog

2.0

  • Added the concept of "meta"
  • Added the metapointer
  • Added the new board and changed the original board to worlds
  • Added notation
  • Added meta/non-meta state
  • Added negative dimensions
  • Added the m instruction