Ecliptica

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
  • Ecliptica is an esoteric programming language (esolang) created by Baldibacak (talk).
  • Ecliptica uses signed 64 bit integer numbers for each memory cell.
  • Ecliptica interpreter and ecliptica to c compiler source code can be found at https://github.com/serpentis64/Ecliptica

Commands

Command Description
+ Increases the value of the current memory cell by 1.
- Decreases the value of the current memory cell by 1.
? x () Checks if the value of the current memory cell equals to x; if true, executes the code inside `()`.
i Takes input from the user and saves it into a stack; whenever used, it pops from that stack into the current memory cell.
n Checks if the current cell is negative; if so, sets it to 0; if not, sets it to 1.
> Moves the pointer to the right.
< Moves the pointer to the left.
O Outputs the current memory cell as a character.
o Outputs the current memory cell as an integer.
[ Starts a loop (unconditional).
] returns to the loop.
x Terminates the program.
t Escapes from a loop.
l Stores the length of the input stack in the current memory cell.
p x sets cell x value same as current cell value
P x sets current cell value same as cell x
'x' sets current cell value to ascii value of x
r adds 1 or 0 randomly it doesnt actualy that much random
/comment/ comments are writen inside / / but they will effect speed of the program by a lot
" "/"\n" NOP

Example Programs

  • Truth Machine
 - i?48(x)?49([1o])
 - The program begins by using `i` to get input from the user and save it into the current memory cell.
 - It then checks if the current memory cell is equal to 48 (the ASCII value for '0') using `?48`. If it is, the program executes `x`, terminating the program.
 - Next, it checks if the current memory cell is equal to 49 (the ASCII value for '1') with `?49`. If this condition is true,prints 1 in a loop.
  • Cat
 - [iO]
 - The program starts with `i`, which gets input from the user.
 - It then outputs the input as a character using the uppercase `O`.
 - And then repeats the loop `[]` .
  • hello world
 - >++++++++[<+++++++++>-?0(t)]<O>++++[<+++++++>-?0(t)]<+O+++++++OO+++O>>++++++[<+++++++>-?0(t)]<++O------------O>++++++[<+++++++++>-?0(t)]<+O<O+++O------O--------O>>>++++[<++++++++>-?0(t)]<+O
 - hello world program translated from brainfuck to ecliptica only diffrence is loops
  • Note: This language is highly case-sensitive and i input works same as brainfuck.