3 ms·
Quote about motivations behind J, found in Kenneth E. Iverson's Wikipedia page: """ When I retired from paid employment, I turned my attention back to this ma
by dmos62 8y ago
Quote about motivations behind J, found in Kenneth E. Iverson's Wikipedia page:
"""
When I retired from paid employment, I turned my attention back to this matter [the use of APL for teaching] and soon concluded that the essential tool required was a dialect of APL that:
• Is available as "shareware", and is inexpensive enough to be acquired by students as well as by schools
• Can be printed on standard printers
• Runs on a wide variety of computers
• Provides the simplicity and the generality of the latest thinking in APL
The result has been J, first reported in [the APL 90 Conference Proceedings]
"""
This is how you'd compute a moving average (taken from its Wikipedia page [0]):
avg=: +/ % #
avg 1 2 3 4
2.5
v=: ?. 20 $100 NB. a random vector
v
46 55 79 52 54 39 60 57 60 94 46 78 13 18 51 92 78 60 90 62
avg v
59.2
4 avg\ v NB. moving average on periods of size 4
58 60 56 51.25 52.5 54 67.75 64.25 69.5 57.75 38.75 40 43.5 59.75 70.25 80 72.5
Pretty cool.
[0] https://en.wikipedia.org/wiki/J_(programming_language) https://en.wikipedia.org/wiki/J_(programming_language)