User:Hppavilion1/UniFunge
UniFunge is a highly-advanced programming fungeoidal programming language that I'm attempting to make with a bunch of Unicode. I keep trying to make Unicodeful languages and keep failing after covering ASCII. Hopefully, this'll be the one that works.
Concept
I really like Unicode. It's an amazing character encoding. As such, I wanted to create a programming language that uses Unicode primarily. I also wanted to mix ideas I had from other languages, like Kleinfunge, into something, so I started working on this.
Syntax
UniFunge is not a traditional 2-dimensional fungeoid: Instead of just being a grid of characters, it is a grid of groups of three characters: A main class, a dot, and a command. The entire program consists of these arranged horizontally.
Semantics
UniFunge is a traditional fungeoid in semantics: A set of pointers with a position and velocity delta that execute the instruction that's currently "under" them. Though it has some additional topological commands and a different data model, it is otherwise entirely normal.
Data Model
Because I like weird and complicated data models, UniFungef's data model is weird and complicated. It is:
- A resizable binary treeng
- Both of deques
- Every node has two registry IDs, one breadth-first and the other depth-first
- A rewritable directed graph with pointer
- Nodes can hold data
- Deques, primarily. Again.
- Nodes can hold data
- A resizable accumulator tape ring
- A secondary accumulator stack
- A data stack where all new data enters and produced data exits
And it might get worse if I think of new things
Commands
All subcommands (class names and commands) are Unicode characters (NOT in the Private Use block). Command classes are representative symbols, such as Greek letters, and commands are any unicode character.
Δ Commands
Static-Δ | ||
---|---|---|
Command | Name | Default Meaning |
Δ.↑
|
Go NORTH | Set the Δ vector to (0, 1) |
Δ.↗
|
Go NORTHEAST | Set the Δ vector to (1, 1) |
Δ.→
|
Go EAST | Set the Δ vector to (1, 0) |
Δ.↘
|
Go SOUTHEAST | Set the Δ vector to (1, -1) |
Δ.↓
|
Go SOUTH | Set the Δ vector to (0, -1) |
Δ.↙
|
Go SOUTHWEST | Set the Δ vector to (-1, -1) |
Δ.←
|
Go WEST | Set the Δ vector to (-1, 0) |
Δ.↖
|
Go NORTHWEST | Set the Δ vector to (-1, 1) |
Dynamic-Δ | ||
Command | Name | Default Meaning |
Δ.↺
|
Turn ANTICLOCKWISE | Rotate the current vector by 90 degrees |
Δ.↻
|
Turn CLOCKWISE | Rotate the current vector by -90 degrees |
Δ.⇄
|
Bounce HORIZONTAL | If the current vector has a y-value of 0, negate the current vector's x-value |
Δ.⇅
|
Bounce VERTICAL | If the current vector has a x-value of 0, negate the current vector's y-value |
Random-Δ | ||
Command | Name | Default Meaning |
Δ.↔
|
Go HORIZONTAL | Set the Δ vector to (-1, 0)|(1, 0) |
Δ.↕
|
Go VERTICAL | Set the Δ vector to (0, 1)|(0, -1) |
Δ.⤢
|
Go DIAGONAL (NE/SW) | Set the Δ vector to (-1, -1)|(1, 1) |
Δ.⤡
|
Go DIAGONAL (NW/SE) | Set the Δ vector to (-1, 1)|(1, -1) |
Δ.⤧
|
Go DIAGONAL (Up) | Set the Δ vector to (-1, 1)|(1, 1) |
Δ.⤨
|
Go DIAGONAL (Right) | Set the Δ vector to (1, 1)|(1, -1) |
Δ.⤩
|
Go DIAGONAL (Down) | Set the Δ vector to (1, -1)|(-1, -1) |
Δ.⤪
|
Go DIAGONAL (Left) | Set the Δ vector to (-1, -1)|(-1, 1) |
Concurrent-Δ | ||
Command | Name | Default Meaning |
Δ.⇡
|
Fork NORTH | Create a new duplicate IP with Δ vector (0, 1) |
Δ.⇢
|
Fork EAST | Create a new duplicate IP with Δ vector (1, 0) |
Δ.⇣
|
Fork SOUTH | Create a new duplicate IP with Δ vector (0, -1) |
Δ.⇠
|
Fork WEST | Create a new duplicate IP with Δ vector (-1, 0) |
Misc-Δ | ||
Command | Name | Default Meaning |
Δ.☉
|
Accelerate | Move both delta values away from zero. If zero, do nothing |
Δ.☽
|
Decelerate | Move both delta values towards zero. If zero, do nothing |
Δ.☊
|
Accelerate and fork | Create a new pointer with both deltas equal to the current's, but moved away from zero (unaffected if equal to zero) |
Δ.☋
|
Decelerate and fork | Create a new pointer with both deltas equal to the current's, but moved towards zero (unaffected if equal to zero) |
Drift-Δ | ||
Command | Name | Default Meaning |
Δ.☝
|
Drift NORTH | Increase Δ y-value by 1 |
Δ.☞
|
Drift EAST | Increase Δ x-value by 1 |
Δ.☟
|
Drift SOUTH | Decrease Δ y-value by 1 |
Δ.☜
|
Drift WEST | Decrease Δ x-value by 1 |
μ-Commands
Static-Δ | ||
---|---|---|
Command | Name | Default Meaning |
μ.+
|
Add | POP a, b, PUSH b+a |
μ.-
|
Subtract | POP a, b, PUSH b-a |
μ.*
|
Multiply | POP a, b, PUSH b*a |
μ./
|
Divide | POP a, b, PUSH b/a |
μ.%
|
Modulus | POP a, b, PUSH b%a |