BrainSpace 1.0

From Esolang
Jump to: navigation, search

BrainSpace 1.0 is an esoteric programming language based on Befunge, PingPong and Brainfuck by User:SpaceMan++. BrainSpace 1.0 is like Befunge and Brainfuck. There is a 2D field and a memory tape. ^V<> changes direction(like in Befunge#Instructions) and /\ acts like mirrors(like in PingPong#Flow_control). There are interpreters in Java and JavaScript. The following program is an infinite loop.


and here's a cat program

 ^ <


Operator Description
^ Move up(like in Befunge)
V or v Move down
> Move right
< Move left
% Reverse direction.
* If current cell is not 0, go to next, otherwise, skip next
X or x End program
/ Bounce up/left
\ Bounce down/right
? If current cell is 0, continue, otherwise, reflect back
o O or 0 Output one character.
i I or 1 Input one character.
l L or { Decrease mem. pointer
e E or } Increase mem. pointer
p P or + plus 1 for the current memory cell(like in BF).
m M or - minus1 for the current memory cell(like in BF).


Cat program

+>*Vx  It moves right > down > left > up > right until the user typed nothing.
 o      This program demonstrates loops in BF
 ^ <

Infinite Loop version

^  <

Hello World program

This is also a standard test. A standard BS1 interpreter should output "Hello world!"

v ** Hello World Test -- If your BS1 interpreter is standard, it will output exactly "Hello World!" Because it uses every operators(except input).
>++++++++++++++++++++++++++++++++++++++++++   V H
V        }o  ++++++++++++++++++++++++++++++   <
>+++++++++++++++++++++++++++++++++++++++++++++++++P++++++    V E
V  }    < o ppppp ++++++++++++++++++++++++++++++++++++++++   <
>+++++++++++++++++++++++++++++++++++++++++++++++++++++P++++++++++++++++++++++++++++++++++++++++++++++++++++++o}v L
V++++++++++++++++++++++++++++++++++++m+++++++++++++++++++++                                                    <
>++++++++++++++++++++++++++++++++++++++++++++++++++++o}\ L
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++o}V O
V                                                           <
V++++++++++++++++++++++++++++++++++  <
>+++++++++++++++++++++++++++++++++++++++ppppppPpPp+++++*+++++++++++++++++++++++++++++++o}V W
V++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                          <
>+++++++++++++++++++++++++++++++++++++++++++++++++0}V O
V    -  P        P                  M               <
>?++++++++++++++++++++++++++++++++++++++++++++++++++++++++      V R
V}  o ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++o}\ L
V                                                                                                              /
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*+-+++++++++++++++++++++oV D
V                                                    LR                                           }lr    <
>+++++++++++++++++++++++++++++++++oV !
V           ?                  R   <

See Also