Spectr

From Esolang
Jump to navigation Jump to search

Spectr is an esoteric programming language where programs are written in a "canvas" of colors. Each color represents a different command or action, which the interpreter processes to perform operations such as arithmetic, loops, and conditional moves.

Spectr was created by Spectral

Spectr operates on a two-dimensional grid (or canvas) where each cell is represented by a specific color code. The interpreter reads each color sequentially from the top left to the bottom right, executing commands based on the color encountered.

Below is a list of commands represented by their respective colors:

Red (#FF0000): Increment the current value by 1.

Blue (#0000FF): Start a loop. The number of iterations is determined by the current value when the loop starts.

Green (#00FF00): Conditional move. If the current value is less than or equal to 0, skip the next move.

White (#FFFFFF): Print the accumulated string and reset it.

As you can tell, the language isnt fully fleshed out, or even really fleshed out. I just wanted to get to the point where you can print hello world because I write the interpreter as I decide how you do things in the language

String Accumulation Commands: The following colors correspond to specific characters that are added to an output string:

#FFA500: H

#A52A2A: e

#8A2BE2: l

#6495ED: o

#D2691E: (space)

#FF7F50: W

#5F9EA0: r

#556B2F: d

Hello World in Spectr

Probably looks something like this:

#FFA500 #A52A2A #8A2BE2 #8A2BE2 #6495ED
#D2691E #FF7F50 #6495ED #5F9EA0 #8A2BE2 #556B2F
#FFFFFF