To participate in tonight's learning session without 20 Stack Exchange rep points, click lower-left giant avatar, then click "user profile" and there will be a number in the URL; that's your chat ID. Email your chat ID to adam@ with the domain being dyalog.com.
Adám is hosting another informal APL learning session tonight at 18:30 UTC in https://chat.stackexchange.com/rooms/52405/apl. The subject is "APL primitive functions' marathon". To participate you will need 20 Stack Exchange rep points or if you don't have them see https://chat.stackexchange.com/transcript/message/41299896#41299896
⌹ is matrix division. Give it a coefficients' matrix on the right and it will invert the matrix, put also a vector of on the left and it will solve your equation system. If over-determined, it will give you the least squares fit.
Monadic ○ multiplies by pi.
Dyadic ○ uses an integer left arg to select which trigonometric function to apply. The most common are 1 2 3 which are sin, cos, tan. ¯1 ¯2 ¯3 are arcsin, arccos, arctan.
@cairdcoinheringaahing APL has no, and will never have reserved words. They are exclusively for the users. The symbols are exclusively for the language.
Dyadic A|B is division remainder ("mod") when B is divided by A. Note the reversed order of arguments. "normal" mod is |⍨.
@cairdcoinheringaahing I'm not sure, but I think it is an attempt to keep the left argument as what is "being done to" the right argument. Thus ÷ and - should really be reversed, but are kept as is for historic mathematics' reasons.
@cairdcoinheringaahing in my experience, most often the modulus is a fixed number and on the other side of | you could have a complicated expression, so given APL's parsing rules, reversed order is more convenient
Are there some types? are there boolean type, range type, int type, float types? What is the true boolean value in Apl? What range has one int, or one float? Thank you
Monadic ≡B gives the "depth" of B, which is the amount of nesting. A simple scalar is 0, a vector is 1, a vector of vectors is 2, etc. If the amount of nesting is uneven throughout the array, the result will be negative, and indicate the maximum depth.
≢ B (again, may render wrongly as ≡/B) is the tally of B, i.e. how many major cells B has. For a scalar, that's 1. For a vector, it is the number of elements, for a matrix it is the number of rows, for a 3D array it is the number of layers, and so on.
Anyway, A↑B takes from B. If A is a scalar/one-element-vector, it takes major cells, if it has two two elements, the first element is the number of major cells, and the second the number of semi-major cells, etc.: