Hacker News new | ask | show | jobs
by paperwork 2666 days ago
Those who have experience with array languages, is it fair to say that something like numpy captures most of the benefits of APL/K?

If Python allowed a reduce operator “/“, numpy will be able to get even closer to APL, correct?

1 comments

In terms of semantics, sure. However a real part of the charm of APL (and J, and K) are in the syntax, and how notating your program causes you to think about it differently. Something like or/and outer product in the game-of-life oneliner is very straightforward APL, but is much clunkier to write in numpy.
I just found that there's a Julia package for at least some APL syntax, perhaps an easy way to play. [3] is a fork updated for v1.0:

[1] https://www.youtube.com/watch?v=XVv1GipR5yU [2] https://nbviewer.jupyter.org/gist/shashi/9ad9de91d1aa12f006c...

[3] https://github.com/MasonProtter/APL.jl