User:Yayimhere/NBBS

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Hi, im going to do research on NBBS, or Nikolas Bracket Braiding System. Im also gonna try and make an esolang based on it.

Syntax

NBBS uses the following system:

  • Every bracket must have a matching bracket(so every left bracket must have a corresponding right), however do not need to be correctly matched(they can weave like [(])).
  • Every "type of bracket" must be on its own line.
  • Every | must go through every line, and must be between two brackets.
  • And every pattern must be the same length.

Note that there exists the brackets (){}[]<>

Weaving

NBBS has a single operation that would be universal between all version, A ⊛ B, which represents weaving of pattern A into B. Weaving first identifies the following subsections of A and B:

The subsection of B left to its leftmost |, call it B_l
The subsection of B right to its lefmost |, call it B_r
B's leftmost |, call it B_b
The subsection of A right to its rightmost |, call it A_r
The subsection of A left to its rightmost |, calling it A_l
A's rightmost |, call it A_b

Now, to produce a new braid, replace A_b with B_l, delete B_b, and append to the new generated string B_r. On may optionally define:

A ⊙ B = A ⊛ B
A ⊚ B = B ⊛ A

which make it possible to weave to the left or right of the braids. One may also introduce the four very basic weaving functions that weave forever:

A ⩚ B = (A ⊙ B) ⩚ B
A ⩛ B = (A ⊚ B) ⩚ B
A ⩙ B,C = (A ⊙ B ⊚ C) ⩙ B,C
A ⩨ B,C = (A ⊙ B ⊚ C) ⩨ C,B

A weaving A ⊛ B is considered infinite if (A ⊛ B) ⊛ B = A ⊛ B

A simple infinite pattern

A very simple infinite pattern is:

(||) ⩨ [||],{||}

which results in:

[|(]{)|} -> {|[}(]{)[}|] -> [|{][}(]{)[}{]|} -> {|[}{][}(]{)[}{][}|]

and so on. note that I didnt follow the different lines rule, but that was for conciseness. you can visualize the last iteration as:

 |[  ][  ]  [  ][ |]
{| }{  }  {  }{  }|
 |      (  )      |

which slightly clears up how the pattern looks

A simple Esolang

A simple Esolang based on NBBS could be the following described here, called First:

A:
	B

sets A to braid pattern B. May use and such.

A * B

is A ⊛ B.

(
	code
)

is an infinite loop.

[
	code:
	code
]

is an if statement(if the uppermost piece of code is true), and also skips the code in the next [] block if true.

.

breaks a loop.

´ ` 

true and false respectively.

An%%%x

if line n of A has a shift of x from the leftmost |, then return true.

-x

not x.

im pretty sure this is TC.