

APL in JavaScript - smanuel
http://ngn.github.io/apl/web/

======
beagle3
Live Coding example showing Life in APL:
[http://www.youtube.com/watch?v=a9xAKttWgP4](http://www.youtube.com/watch?v=a9xAKttWgP4)

I generally hate videos, but this one is well worth the few minutes it takes
(assuming you are not familiar with APL; read the examples on the linked page
first, it will save you a couple of reviews of the videos until you get it
all)

------
DonGateley
Quibble. The demo should allow use of the computer's keyboard and Alt key.
Point and click with a graphical keyboard is nuts. It should support
overstrike for APL's composite symbols. I did a whole lot of APL programming
in the '60s and '70s at IBM and consider it IBM's bastard child. There need
not have been Matlab.

I'm appalled by the authors enforcement of 1-origin indexing.

~~~
LfLxfxxLxfxx
Try typing backquote followed by another character. I believe mapping alt+key
in the browser might be difficult.

It's 0-origin indexing.

~~~
DonGateley
"Try typing backquote followed by another character."

Sorry, I don't follow?

"It's 0-origin indexing."

Oops. Then I'm ecstatic rather than appalled. :-)

~~~
LfLxfxxLxfxx
"Try typing backquote followed by another character." I mean the text box at
[http://ngn.github.io/apl/web/index.html](http://ngn.github.io/apl/web/index.html)
If you type for instance `r in it, you will get a rho symbol, `i for iota, `a
`w for alpha and omega, etc

------
mikeryan
For those (like me) who didn't know, APL is a programming language...

[http://en.wikipedia.org/wiki/APL_(programming_language)](http://en.wikipedia.org/wiki/APL_\(programming_language\))

~~~
ctdonath
Correction: APL is _A_ _P_ rogramming _L_ anguage.

And one so dense/obscure/efficient that obfuscation is not a contest, it's an
inherent philosophy.

Edit: corrected misuse of "obtuse".

~~~
gruseom
APL isn't obtuse—just unfamiliar to people who aren't familiar with it.

By the dictionary meaning of 'obtuse', in fact, APL is the opposite: a sharp
tool and a masterpiece of design.

~~~
Locke1689
I wouldn't describe it as obtuse, but I would describe it as concise.

I think that even people who are familiar with it could feel that its
concision hurts readability. It's not such an unfair criticism as you may
suggest.

~~~
doublec
Ken Iverson wrote an interesting document, "Notation as a tool of thought",
which covers his thoughts on what a concise/efficient notation provides:
[http://www.jsoftware.com/papers/tot.htm](http://www.jsoftware.com/papers/tot.htm)

~~~
Locke1689
Really, interesting, thank you!

The one worry I have with APL and its descendants is that its conciseness will
encourage people to make overly long expressions.

One possibly beneficial side-effect of more verbose languages is that it tends
to encourage the use of additional identifiers to hold sub-expressions. The
act of naming things is often a good thing for both the authors and readers of
a program. More abstractly, it allows the program to carry intentional
semantics alongside operational semantics.

This is also a problem I have with mathematics -- mathematical notation often
uses context-dependent single-letter variable names for semantic information,
which is terrible from an outsider's perspective (and by outsider I really
mean anyone who isn't working in the _exact_ field of the mathematician).

Edit: I should mention that I'm still pretty enamored with J for numerical
computation, even though I never do any of it :)

~~~
gruseom
If you like the Iverson, don't miss the famous piece of Whitehead's where he
talks about notation too:

[http://introtologic.info/AboutLogicsite/whitehead%20Good%20N...](http://introtologic.info/AboutLogicsite/whitehead%20Good%20Notation.html)

Iverson took one of his epigraphs from there, but the whole thing is short and
well worth reading.

Fun fact: Iverson, Roger Hui (the J guy) and Arthur Whitney (the K guy) were
all from Alberta.

~~~
Locke1689
More sources for thoughts about designing descriptive but efficient language
notation: brilliant! Upvotes all around! :)

------
DonGateley
I find the GitHub project but can find nothing explaining how to install and
use it. Can anyone point me in the right direction?

