Thanks, I enjoyed that article. It gives a vivid picture of the gap between the array languages niche and mainstream programming culture.
I found this too, when I tried them both, first J then APL, perhaps because:
* APL uses () [] and {} in their pairs to parenthesize things, just like other languages, while J uses the 6 symbols as standalones, harder to read the code.
* All verbs in APL are single characters, whereas J symbols might be more than one.
* J, unlike APL, uses the concepts of rank, and forks and hooks, which are both difficult to grasp and don't seem to add much to the array processing idea.
life:{3=a-x*4=a:2{+(0+':x)+1_x,0}/x}
0+':x -> "sum each element with one to the left
(0 left of the first)"
1_x,0 -> "drop first, add zero at the end"
(0+':x)+1_x,0 -> "sum each element with the one
to the left and the one to the
right (sum of previous expressions)"
a:2{+...}/x -> "do that; transpose; do that;
transpose again, and assign to a.
2{}/ means 'do twice'"
At this point, "a" has the same shape of "x", but in every element is the sum of the elements of x from that location, one above, one below, one left, and one right. 4=a -> "1 where a=4, 0 otherwise"
x*4=a -> "1 where x is 1 and a=4, 0 otherwise"
a-x*4=a -> "decrease a from 4 to 3 if x=1 in the
that place"
3=a-x*4=a -> "1 where one has 3 neighbours"
So, if x is a 1/0 matrix "life x" does one iteration of Conway's game of life. And "1000 life/ x" would seek convergence or return to first state (but no more than 1000 iterations).There is code golfing here; It would have been purely readable K code if it wasn't golfed. But it would also have been two to three times as long.
I found these on the K OS project page - http://kparc.com/os.htm. There's a great description of Arthur Whitney building a Notepad like text editor (1K) in 30 minutes or so using this system here - http://coding-is-like-cooking.info/2013/09/an-introduction-t....
Personally K is a bit too terse for my tastes - I think something like Nile achieves some of the terseness of APL without looking like line noise - http://github.com/damelang/nile/blob/master/examples/text-la....