(...) IS 2D!!

From Esolang
Jump to navigation Jump to search

(...) IS 2D!! or bracket is 2d!!(yes i am aware of the grammar error. and also i dont care) or BI2D!! as i will refer to it. and yes BI2D!! is 2d. its made by User:yayimhere

overview

in BI2D!! there are no arrows. to move the (...) is used for movement:

([≠][=])
 [ ][ ]

here ≠ is used to say: if the top of the stack is not equal to the bottom of the stack. and = is if bottom and top is equal. if a if statement returns true it goes down that path and go down from there. if {} is used so it will go down if its false to go back to a (...) it is labelled:

(...)#A

this is labeled A to use label there is just used A:

([≠][=])#A
 [A][]

if it gets to A it goes back to the (...). the pointer goes down on the path its on until it gets to a label or another command. if a label is also a command /.../ is used. so if the label is A then it would be /A/. this is both for use and definition. when a label is jumped to the operation the (...) is binded too i ran first

basic syntax

this is all the syntax for BI2D!!

commands
symbol description
> move to the path on the right
< move to the path on the left
base 64 number add the number onto the stack. if its a word encrypted in base 64 even though its technically a number its treated like the string if there is put a (...) around the number
❲...❳ loop. goes across every path instead of being on one spesific path. loops until the bottom and/or top of the stack is equal to 0. does not pop
< but if and only if the top and bottom are equal. does not pop
≤ but with > instead of <. does not pop
+ add together the top and bottom of the stack and push it to the top. does not pop
- minus the top and bottom of the stack so A top B bottom: B-A and push that value to the top of the stack. does pop
modulo of the top and bottom of the stack written so A top B bottom: B mod A and push that value to the top of the stack. does pop
replace the top of the stack with the bottom of the stack. if there is. / in front of it it will replace bottom with top. does not pop
! NOT. if top of the stack is 0 put a 1 on stack. else put a 0. does pop
print the top of the stack as a ascii string(since base64 can decrypt into full strings). does pop
print the top of the stack as a number. does pop it
copy the top of the stack. does not pop it
\ pop top value on the stack
replace the with the bottom of the stack which makes this esolang self modifying. does not pop. if the number it was replaced with is encountered it works like a normal number. does not pop
ℤ but with top of stack instead of bottom
no op
take the top string on the stack. then cut it up in induvidual chars
replace the path cell below it with the top of the stack. does not pop
''' if the top of the stack is a string returns true else false
take the uppermost number(yes only numbers) and put it at bottom of stack
but to the top instead of bottom and lowermost. putting a / in front of it it will be the second to uppermost and second to lowermost
finds the char in the stack that corresponds with the top of the stack. if there is not a corresponding char its throws ℵ error. if there are multiple of them it takes the bottommost

using {} instead of [] means that there are multiple commands in that "block". they are separated by |. the program knows what path to take by having the center and brackets of the path always aligned(also in the (...)). this can be done with spaces.

branches

branches branch paths based on some conditional. they are listed below. none of these pop

branches
symbol description
: goto left branch if the bottom of the stack is divisible by the top else goes to the right
if the top of the stack is odd goto left else right
^ if there is a true on the stack go left else right
🔗 go back to nearest branch(backward)

branching paths are written like this:

[A]---[⊥]---[B]

you can have as many - as you want but at least 3. the - can also be used to shift a pat to the left or right:

([ₕ])
 [5]---[ℤ]
       [3]

in the example i used some spesific commands although (of course) any commands can be used. there does need to be a command beneath any shifted one so you can't do:

([ₕ])
 [5]---[ℤ]

if these wire like things are then the center does not need to be aligned. if a / is used on a branch operator it left and right is swapped

off path commands

these operations are all on paths but these commands are off paths

commands
symbol description
entrance to a (...). needs to be as long the (...)(excluding the ()'s). runs when the line above is done
[⎻] end of paths. needs to be as wide as the paths(the []'s is included in the width unless its 1 char wide). runs the line below it. if its only 1 path that goes to the [⎻] then it only needs to be as wide as that path
$ take user as a string(encrypted as base64) input and put it on the stack
& halt program
&? halt program if stack has 1 or less items on it
replace the with the bottom of the stack which makes this esolang self modifying. does not pop
* multiply the two top values on the stack
/// divide the topmost value on the stack by the second to topmost value on the stack
|...| loop whats inside the |...| until there are only 1 object on the stack
"..." toggle string mode. this text will be ignored. can be used as comments or something else. the " will technically not exist in the program(in their place there are spaces)
@  makes a square with A*B(two top values of the stack. A highest B next to highest) side length and puts its leftmost uppermost corner at A*B(A third to first values on the stack B forth to highest value on the stack. if these values are not there it will be set such that it has its center will be at the center of the code itself) and then it pushes all the text thats in that square onto the stack from upper leftmost corner to downmost right most corner. if printed as a ascii char the hole string will be printed.
! take off the top of the stack. if its a string take off it front letter and put it back on the stack
: ! but with the end of the string instead of front
<|> reverse the whole stack
pop the top string on the stack and print it as a string

if for (...)

all the ifs for path picking in (...). if there is not spesified that it pops it does not

ifs
symbol description
= is the top of the stack equal to the bottom
= but not-equal instead of equal
> is the top of the stack more than the bottom?
< is the bottom of the stack more than the top
; can the bottom of the stack be concatenated into the top of the stack
: can the top of be concatenated into the bottom of the stack
always chosen as the path to take
=== is the two top values equal. pops the top value used
≠≠≠ is the two top values not equal

ERRORS

all errors returned by BI2D!!

errors
symbol description
"" a stringmode was toggled but also empty
% modulo with 0(undefined)
the stack was empty while using a command that needs values to be on the stack
⬅⬅⬆ a invalid char is encountered
a NaN came on the stack and was used

examples

truth-machine:

 AA==$
 _________
([=] [ ≠ ])
 [‖]❲{⊗|‖}❳
 [⎻]
  &

hello, world!:

([          ₕ          ])
 [*aGVsbG8sIHdvcmxkIQ==]
 [          ‖          ]
 [⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻⎻]
  &            

more readable one:

([          ₕ          ])
 [*aGVsbG8sIHdvcmxkIQ==]---[‗]
                           [⌧]
                           [⎻]
                            &

OR even more readable:

"hello, world!"Bw==AQ==Bw==AQ==@!:‗

print user input or cat program:

$
([ₕ])
 [‗]
 [⎻]
  &

Looping counter:

 1
 _____________
([     ₕ     ])
❲{⊗|‗|AQ==|+ }❳

factorial:

 $
 ___
([    ₕ    ])
❲{⊗|AQ==|- }❳---[‗]
              [⌧]
              [⎻]
              |*|
              ___
             ([ₕ])
              [‗]
              [⎻]
               &

Quine:

Cg==AQ==@‗

deadfish enerpeter github link: [

history

  • BI2D!! was made in 16.26 friday t. 14. June 2024 (CEST)
  • deadfish enterpeter in BI2D!! was made the day after creation