@Notone That's perfect. Those with a strong programming background often struggle with APL :-) Can I offer a quick intro, or point you at resources?
Note that APL originates from traditional mathematical notation, so with a strong mathematical background, you'll feel much more at home looking at APL as an executable mathematical notation.
@Adám Happily, as you noticed I come from a mathematical background. I would be interested in learning for what areas it is useful to use for or generally about its main merits (very generic question, I am aware).
It is especially useful for exploring algorithms, and giving domain experts access to have the computer help them in their work without needing to teach a general-purpose programmer about their expertise first.
It is a general-purpose programming language, but exceptional performance can be achieved for problems where an array-oriented approach works.
Its main merits probably depend on the subjective observer, but I find APL's expressiveness and harmonisation of otherwise notationally disconnected concepts are the most attractive to me.
@Notone Here's an example: ∏ and ∑ and ∀ and ∃ are expansions of × and + and ∧ and ∨ over a list. The four latter symbols are used in APL exactly as in traditional mathematics and formal logic. However, the four former symbols are not. Instead, APL uses ×/ and +/ and ∧/ and ∨/.
Sure. Consider the list ⋄ L ← 3 1 4 1 5 (the ⋄ is just to invoke the bot). We can check which elements are less than or equal to 2 with ⋄ 2 ≥ L and then ask if there are any such elements with ⋄ ∨/ 2 ≥ L.
The powerful thing in APL is that you can use any two-argument function on the left of the /, even a user-defined one. That's a great thing about APL: user-defined functions and built-in functions are treated the same. The only difference between them is that user-defined functions have alphanumeric names, while built-ins use symbols. This way, there are no reserved words in APL.
Right, but the fundamental operation is multiplication, which takes two arguments.
In APL, functions either take one argument, like - n for negation, or two arguments, like a + b for addition. To operate on many elements, a single argument list (or matrix, or actually any tensor) is used.
In fact, most symbols (and user-defined functions can do this too) have two meanings, one when given a single argument, and one when given two arguments. So, e.g. - is both negation and subtraction, just like in traditional mathematics.
About 80 or so, depending on if you count various forms of punctuation and other non-function things.
But as I said, many of them have two (usually related) meanings. E.g. - uses 0 (the identity element for subtraction) as "default left argument" and similarly ÷ uses 1 (the identity element for division) as default left argument, so one-argument ÷ is reciprocal: ⋄ ÷1 2 3 4
I'm pretty sure you can do anything. Graphics is a broad subject, but I've seen several distinct uses. Audio processing and music has been done. I'll see if I can track down some links.
i think i ran into an interpreter bug right before doing so
the expression WSFULLed when i didn't expect it to, then the interpreter broke
and when i restarted the interpreter from a clear ws it started working
while i was playing with my code i noticed that my SI is growing really quickly even though i'm still in the REPL, i wonder if it's something to worry about