Following is an attempt to explain +/((⌽⌈\⌽a)⌊⌈\a)-a
The functions ⌊ ⌈ find min and max values, and \ is functional programming scan operator. Combining ⌈\ gives max-scan which does this:
twentyRandoms
71 61 79 72 84 76 76 88 16 53 51 56 64 50 100 33 60 82 96 53
⌈\twentyRandoms
71 71 79 79 84 84 84 88 88 88 88 88 88 88 100 100 100 100 100 100
moving to the right, the largest value (max) seen so far is kept and carried on.
Then ⌽ reverses the values in an array so this (⌽⌈\⌽a) does the same thing going from right to left, by reversing, max-scan, then reversing the result:
twentyRandoms
71 61 79 72 84 76 76 88 16 53 51 56 64 50 100 33 60 82 96 53
(⌽⌈\⌽twentyRandoms)
100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 96 96 96 96 53
Then the ⌊ in the middle compares the two results an item at a time, taking the minimum of each pair:
(⌽⌈\⌽twentyRandoms)⌊⌈\twentyRandoms
71 71 79 79 84 84 84 88 88 88 88 88 88 88 100 96 96 96 96 53
The (...a) - a part does item by item subtraction, each number in this result array minus the number in that position from the original array.
((⌽⌈\⌽twentyRandoms)⌊⌈\twentyRandoms)-twentyRandoms
0 10 0 7 0 8 8 0 72 35 37 32 24 38 0 63 36 14 0 0
Then +/ sums them up like a sum() or foldr or reduce:
+/((⌽⌈\⌽twentyRandoms)⌊⌈\twentyRandoms)-twentyRandoms
384
Which, if I remember the talk and the code works, means that if you drew this array as a bar graph and poured water into the top middle of it, how much water would it hold before it all overflowed? The highest block on the left and the highest block on the right are the bounds of the highest points where the water can't get past. In between those, the bar heights are the depth at each position, and the water depth is from there up to the lower of the highest bar.
Yes! I believe being able to figure this out qualifies you as ⊢>+⌿÷≢
Above average, haha. Permanent beginner, I think :)
its interesting that ⌽ is used for reverse, it's phi, right? As the lesser is to the greater, the greater is to the whole? There's a vague notion of invertability to the golden ratio but I can't find the words for it. Maybe, a ratio that works in both directions.
Am I way off base? Maybe there are other meanings to the character I'm unaware of.
The line is an axis of vertical symmetry in a 2-d context (circle); compare with ⊖, which shows an axis of horizontal symmetry. When applied to a matrix, ⌽ reverses rows and ⊖ reverses columns; the elements are mirrored around the pictured axis of symmetry. (In general, when applied to a high-rank array, ⊖ reverses the first axis of its argument, and ⌽ reverses the last.)
o that's much less esoteric, thanks for the explanation
There’s also a circle with a diagonal line through it (on phone, no Unicode keyboard) which consistently with the above axes of symmetry transposes a matrix; don’t remember if it transposes first two or last two axes on higher rank arrays.
It reverses the order of the axes. There is also a dyadic variant, which provides a new order for the axes. Duplicating an axis is no problem; but there is a danger of leaving out an axis. So in j, instead, the specified axes are moved to the rear.
(Axes of horizontal and vertical symmetry, respectively, of course; I don't know why I wrote that.)