Skip to content

Commit

Permalink
corected README.md and cube.png size
Browse files Browse the repository at this point in the history
  • Loading branch information
MaroonCoffee committed Jan 17, 2024
1 parent 90e113b commit 7e741fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ information see Cube (linked above), and Befunge: https://esolangs.org/wiki/Befu

## Example

The following text file represents a simple example of Cube code:
The following text file represents a simple example of Tesseract code:

```````````````````````````````````````````````````````````````````
``````````````````````````````````````````````````````````````````````
/*3`````````````````````````````````````````````````````````````````*/
/*````````````````````````(|v```````````````````````````````````````*/
/*```````````````````````` ```````````````````````````````````````*/
Expand Down Expand Up @@ -85,12 +85,12 @@ The following text file represents a simple example of Cube code:
/*```````````````````````` ```````````````````````````````````````*/
/*```````````````````````` ```````````````````````````````````````*/
/*``````````````````````````````````````````````````````````````````*/
```````````````````````````````````````````````````````````````````
``````````````````````````````````````````````````````````````````````

This Program prints "Hello World!", "Tesseract: 8x better than Cube!", and "Debug Script"
being printed as individual characters.

Besides its unique geometry, Tesseract's main gimick is its use of dual syntax.
Besides its unique geometry, Tesseract's main gimmick is its use of dual syntax.
Depending on the mode, Tesseract swaps between Befunge syntax and Cube syntax.
The following is a list of features and commands in Tesseract:

Expand All @@ -107,18 +107,18 @@ Operation Stack: + - \ * / %
Characters placed in correct stack automatically
( Begins execution at this point
) Ends execution at this point
> Turn right
\> Turn right
< Turn left
^ Turn up
v Turn down
" Key character that swaps do operation / don't (starts on don't)
| Prints "Hello World"
; Pops num off "n" then print next n chars
, Takes input and adds characters in ordr on to stack
` Clears both stacks
\` Clears both stacks
= Pops top off and prints ascii character of it
! Switch stack that stack_modifiers modify (starts on LetNum Stack)
# Duplicate top character on stack (chosen by !)
\# Duplicate top character on stack (chosen by !)
$ Pops num off "n" then duplicates the nth character on ! stack to top
& Pops num off "n" then deletes the nth character on ! stack
@ Pops nums off "m" and "n" then swaps values on ! stack
Expand All @@ -130,14 +130,14 @@ $ Pops num off "n" then duplicates the nth character on ! stack to top
LetNum Stack: Stores numbers
Literal numbers are pushed to LetNum stack
Operations are executed immediately and not pushed onto the Operation stack
+ Addition: Pop two values a and b, then push the result of a+b
- Subtraction: Pop two values a and b, then push the result of b-a
* Multiplication: Pop two values a and b, then push the result of a*b
\+ Addition: Pop two values a and b, then push the result of a+b
\- Subtraction: Pop two values a and b, then push the result of b-a
\* Multiplication: Pop two values a and b, then push the result of a\*b
/ Integer division: Pop two values a and b, then push the result of b/a, rounded down. According to the specifications, if a is zero, ask the user what result they want.
% Modulo: Pop two values a and b, then push the remainder of the integer division of b/a.
! Logical NOT: Pop a value. If the value is zero, push 1; otherwise, push zero.
` Greater than: Pop two values a and b, then push 1 if b>a, otherwise zero.
> PC direction right
\` Greater than: Pop two values a and b, then push 1 if b>a, otherwise zero.
\> PC direction right
< PC direction left
^ PC direction up
v PC direction down
Expand All @@ -150,7 +150,7 @@ _ Horizontal IF: pop a value; set direction to right if value=0, set to left oth
$ Pop top of stack and discard
. Pop top of stack and output as integer
, Pop top of stack and output as ASCII character
# Bridge: jump over next command in the current direction of the current PC
\# Bridge: jump over next command in the current direction of the current PC
g A "get" call (a way to retrieve data in storage). Pop two values y and x, then push the ASCII value of the character at that position in the program. If (x,y) is out of bounds, push 0
p A "put" call (a way to store a value for later use). Pop three values y, x and v, then change the character at the position (x,y) in the program to the character with ASCII value v
& Get integer from user and push it
Expand All @@ -163,7 +163,7 @@ p A "put" call (a way to store a value for later use). Pop three values y, x and
Like Cube, when the cursor reaches the end of one side of a cube it wraps back around to the other side and its visual direction may appear to have changed (though it's really a change in perspective).
![cube-traversal](./imgs/cube.png)

Tesseract's equivalent wrap around gimick is with its wormhole operator, which warps the cursor from one cube face to another cube face based on the geometory of a tesseract. Each square face of a tesseract has a single corresponding face that occupies the same space as the first. For reference, here's a tesseract unfolding (Source: https://en.wikipedia.org/wiki/Tesseract)
Tesseract's equivalent wrap around gimmick is with its wormhole operator, which warps the cursor from one cube face to another cube face based on the geometry of a tesseract. Each square face of a tesseract has a single corresponding face that occupies the same space as the first. For reference, here's a tesseract unfolding (Source: https://en.wikipedia.org/wiki/Tesseract)

![tesseract-unfolding](./imgs/unfolding_tesseract.gif)

Expand Down Expand Up @@ -209,7 +209,7 @@ Befunge Wiki: https://esolangs.org/wiki/Befunge

## Additional Documentation/Links:

Check out the esolangs wiki page: (TODO)
Check out the esolangs wiki page: (https://esolangs.org/wiki/Tesseract)

## Credits

Expand Down
Binary file modified imgs/cube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7e741fa

Please sign in to comment.