×
[Viridis Esolang]
Viridis (from Latin Bufotes viridis, "Green toad") is an interpreted statically-typed esoteric programming language in which all variables are shared between all created processes by default. The language features 6 basic data types similar to those of C and arrays containing those datatypes, which can be multidimensional.
[Inspiration]
Inspired by Python multiprocessing.Array class, which is an array of ctypes that can be accessed by multiprocessing.Process processes quickly and without the limitations of a Manager-based object. Eremias, another esolang of rpyth, uses a Manager-controlled dict for all the variables, which is easy to work with, but comes with the cost of it being painfully slow and normally mutable classes being immutable within the dict.
Viridis uses an array of unsigned chars instead, which can be altered on demand, yet requires interpretation during the time of access. Interaction with arrays can be optimized as there is no need to load the whole array to modify a value within it. The only downside to the usage of arrays so far is that it is of constant length throughout whole execution of the program, normally 2^16 unsigned chars, but can be made bigger if needed.
[Syntax]
Looks quite like an assembler, accepts kebab-case for variable names. So far there are three main operation types: variable creation, modification and usage of functions. Variables are initialized within the array while the program is running. You can either omit array shape or value, never both. Value, when omitted, is filled with zeroes of specified type according to the space in case it's an array. Modification is always written as:
>target operation= values
Operations can be +, -, *, ^, etc. The values are separated by delimiter, [but act differently if there is only two of them]. Let me show you how.
Viridis:
>target -= value1, value2
Python:
>target = value1 - value2