3 ms·
Yet millions of Japanese people are fairly adept at reading it. To be clear, APL actually has a tiny set of symbols. In day to day use, perhaps two dozen. Remem
by skruger 4y ago
Yet millions of Japanese people are fairly adept at reading it. To be clear, APL actually has a tiny set of symbols. In day to day use, perhaps two dozen. Remember that these aren't "keywords" in the traditional sense, but more like the standard library. Contrary to popular belief, it's actually pretty easy to learn to read, as usually the symbols are mnemonic, or referencing well-known mathematical counterparts. Flipping a matrix in various ways is a circle and a line. For example, ⍉ means "flip diagonally" -- in other words, a transpose. To flip around the horizontal axis, guess the symbol: ⊖. Around the vertical? ⌽. The ceiling of a number is borrowed from maths: ⌈ etc. Counting the elements in an array is ≢ -- evoking the symbols you scratch on a piece of paper when tallying something up.
- gjulianm 4y ago> Yet millions of Japanese people are fairly adept at reading it. Yes, because it's their native language. Doesn't say anything about the difficulty of it. My mothertongue is Spanish and I'm fairly adept at using it, and still doesn't mean that some aspects make it harder than other languages (verb conjugation, gendered nouns). > or referencing well-known mathematical counterparts. As a mathematician, other than the very basic symbols, most of the ones used in APL are not familiar, or are used in different contexts. For example, × is cross product and in APL is regular multiplication, ⍟ is logarithm even when "log" is what's used in math, and "⊥" looks to be polynomial evaluation when that's usually the symbol reserved for orthogonality. > Counting the elements in an array is ≢ Funnily enough, that symbol is "not equivalent" or “not congruent” in math. Never would have though it refers to the symbols in a paper.
- ssfrr 4y agoWhen used with 2 arguments, e.g. `a ≢ b`, it indeed is called "not match", i.e. are `a` and `b` the same. When used with 1 argument, `≢ a` it will give you the number of elements.
- gjulianm 4y agoOh, that’s… not confusing at all.
- ssfrr 4y agoYeah, the fact that the same symbol is overloaded with two meanings for the one-arg and two-arg (infix) cases adds some overhead to reading APL code. The precedence rules are very simple and uniform in isolation, but personally I find that applying them to (mentally) parse a nontrivial line of code is one of the hardest parts of getting started with APL.
- avmich 4y ago> The ceiling of a number is borrowed from maths: ⌈ etc. Isn't it the other way around - Iverson invented this symbol for this purpose and the standard mathematic notation adopted it?