3 ms·
APL was designed to be taught to non-programmers. Indeed it was taught in some high school maths classrooms. I have been reading many books and other historic
by textmode 8y ago
APL was designed to be taught to non-programmers. Indeed it was taught in some high school maths classrooms.
I have been reading many books and other historical documents on APL from the 1960s/70s/80s and this one I found to be especially interesting:
http://www.softwarepreservation.org/projects/apl/Papers/ElementaryAlgebra http://www.softwarepreservation.org/projects/apl/Papers/Elem...
I would like to thank the HN user who has posted this a couple of times. I am grateful for this resource and reading it sooner rather than later.
Why I found this particular publication unique amongst all the others I have read:
It is many pages before the reader encounters any programming jargon. I believe the use of the term "primitives" may be the first slip.
It is possible the reader with absolutely no familiarity with programming would not be alienated by any of the terminology Iverson uses. That is uncommon for an expository text by an author who knows how to program, in my experience as a reader.
Perhaps terminology was carefully chosen with a view to avoiding programming jargon and letting the symbols (notation) and example input and output communicate the concepts.
Here is another question:
Matrix multiplication can play an important role in so-called "AI" or "Machine Learning". For example, Hopfield networks.
The extraordinarily popular Python language, specifically the "NumPy" library, is frequently cited on HN.
How suitable or unsuitable is APL for matrix multiplication and, by extension, "Machine Learning"?
Assuming in each case a programmer competent in her chosen language (i.e. ignoring the competencies of the programmer), which language has faster execution times, Python or APL?
- walshemj 8y agoNumPy is written in C and BLAS in Fortran so for pure technical programming which AI / ML is Fortran Or C is the best choice any interpreted language is going to be at a disadvantage. Arguably all the extra stuff C++ has doesn't really help and Fortan having built-in support for many things the c needs external libs for - Fortran would be the best.
- geocar 8y ago> How suitable or unsuitable is APL for matrix multiplication Matrix-multiply is just plus-dot-times or +.× > which language has faster execution times, Python or APL? This is tricky to answer. For most problems, I'd say APL, but this is isn't quite fair. A competent Python programmer who has made it "as fast as possible" without resorting to extensions will be creamed by a novice APL programmer, so you need to consider third-party modules like NumPy just to compete. Now NumPy is very well-optimised, but you'll really struggle to do well against k/q[1] an APLish that actually focuses on performance, and if you run into a problem where it doesn't, there are extensions you can use to eke out even more performance. At this point, you might try using Tensorflow -- which gives Python a great edge -- but are we really programming Python anymore? kdb+ can use Tensorflow as a library as well... [1]: http://tech.marksblogg.com/billion-nyc-taxi-kdb.html http://tech.marksblogg.com/billion-nyc-taxi-kdb.html fastest non-GPU
- JulianMorrison 8y agoIt's a style difference between "optimized C and ASM kernels wrapped in a slow heavyweight language" and "a very simple interpreter that fits in cache". Circumstances are probably going to drive which approach wins out.
- FractalLP 8y agoAPL is really good and fast with matrices. I mean it is an array language and a matrix is just an array with another dimension. The problem though is that it wouldn't be fast enough for actual scientific computation on non-trivial datasets.