This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Carrot | |
the simplistic string-based esolang made for code-golfing | |
by Kritixi Lithos | |
Carrot is an esolang that is made for string-manipulation. The program starts of in a 2-dimensional tape, a sheet, and each cell on this tape contains three global variables that I call the stack: the stack-string, the stack-float and the stack-array. The program starts with the stack being the stack-string, ie string-mode. All the operators the program encounters will affect the string-mode directly, and some will change the stack-mode. Furthermore, the program is able to move across the tape via movement commands. As stated earlier, each cell on the tape will have its own stack. | |
Note: "TODO"s do not mean that they have yet to be implemented, they just mean that I still need to think about that partcular feature | |
Caret-mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int size=1; | |
PVector RIGHT=new PVector(size,0); | |
PVector UP =new PVector(0,-size); | |
PVector LEFT =new PVector(-size,0); | |
PVector DOWN =new PVector(0,size); | |
int num=0; | |
boolean isPrime(int n){for(int i=2;i<=sqrt(n);i++)if(n%i<1)return false;return n>1;} | |
PImage i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
size(600,600); | |
background(0); | |
noLoop(); | |
} | |
//radii of the circles | |
float r1=300; | |
float r2=r1*3/8; | |
float r3=r2*3/8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
size(600, 600); | |
circle(200,50,5,4); | |
} | |
void circle(float radius1, float radius2, int num1, int num2) { | |
//go to centre | |
translate(width/2, height/2); | |
float x = 0; | |
float y = -radius1; |