hills in layers
Language at a glance
Malossa reads like a sketch of a shader. Functions open with fc and close with end. The one that closes with end mf draws every pixel. The app has the full guide built in under ⌘?.
Write this · it means
fc name (int a b)(float c) … end | A function. Parameters are grouped by type. |
end mf | Marks the main function, the shader that draws each pixel. |
float a b c; | Declares several variables at once. |
loop 10 · loop i 10 | Repeat 10 times, optionally counting i through 0 to 9. |
loop i 0 to 10 · loop x > 1 | Count up, count down, or loop while a condition holds. |
array a; scan a 10; a->3 | Arrays, and reading or writing an element. |
float x = 90 ink check; · ink x check; · deink x; | Tethers x to a function, so every write to it goes through check first. deink removes it. |
-6 -bl -e | Comment out the next 6 lines, up to the next blank line, or up to the next end. |
pref 2(x) | Calls function number 2. |
wc fc lc fs gp gmf | Word count, function count, line count, function size, function number, main function name. |
print x; | Shows the value of x at the pixel under your mouse. |
time resolution pixel uv | Values the app gives every shader. |