Terms
The Language overview introduces these terms informally, as they come up.
Every value is an atom or an array: atoms are numbers, characters, functions and operators, scalars are arrays of rank 0, units are atoms and scalars, and subjects are all values except functions and operators.
| Term | Meaning |
|---|---|
| value | a number, character, function, operator or array |
| atom | a value that isn’t an array: a number, character, function or operator |
| number | an approximate real or complex number, or an exact integer or rational, as Numbers describes |
| bare number | a number written without a suffix, which is approximate: 0.5, whereas 3ₓ and 1ᵣ3 are exact |
| whole | with no fractional part. Integers are whole, as are floats such as 3.0 and ¯3.0 |
| Mathish types | ordinary exact numbers, 64-bit floats and complex numbers with 64-bit parts, under dynamic kinds. Fixed-integer calculations are excluded. Mathish mode applies its conventions when enabled |
| character | one Unicode character, written in single quotes: 'a' |
| primitive | a built-in function or operator, written as one glyph: + or / |
| dfn | a function or operator written in braces, as Dfns describes: {ω+1} |
| function | a primitive, train, derived function, or dfn that doesn’t use ⍶ or ⍹, which applies to arguments |
| operator | a primitive, or a dfn that uses ⍶ or ⍹, which takes operands and derives a function: / derives +/ from + |
| derived function | a function that an operator derives: +/, or 2↣× |
| pervasive function | a function that applies to each atom of its arguments, through any nesting: ≥[2 ⊂3] is [3 ⊂4] |
| array | a rectangular collection of values along zero or more axes |
| simple array | an array whose items are all atoms: 1 2 3, "abc" and ⊂5 are simple, and [1 [2 3]] is not |
| rank | the number of axes: a vector has rank 1, and atoms and scalars have rank 0 |
| vector | an array of rank 1 |
| matrix | an array of rank 2 |
| string | a vector of characters, written in double quotes: "abc" |
| scalar | an array of rank 0, holding one value: ⊂5 is a scalar holding the number 5, and 5 is a number |
| unit | a rank-0 value: a number, character, function, operator or scalar |
| subject | a value that isn’t a function or operator: a number, character or array |
| item | the value at one position of an array: [1 [2 3]] has the items 1 and [2 3] |
| position | an index along an axis, counting from 0. Negative positions count from the end |
| axis | one of the dimensions of an array, numbered from 0. Each axis has a length, and can have a name and keys |
| key | a string that labels a position along an axis, as Keyed arrays describes |
| record | a vector with keys, written as key:value items in brackets: ["a":1 "b":2] |
| cell | a sub-array made of an array’s last k axes, called a k-cell: a matrix’s rows are its 1-cells. A 0-cell is the unit at one position, the atom there or the array there enclosed. When k is at least the array’s rank, the whole array is its one cell |
| major cell | a cell made of every axis but the first: a matrix’s rows are its major cells |
| frame | the axes before the cells, with one cell at each position |
| assembly | building one array from results, one for each position of a frame: the shape is the frame followed by the results’ shape, each result fills its position with its items, and shorter results are padded with fill |
| function array | an array with a function as an item. Evaluation gives the rule for calling one: 2 [+ ×] 3 is 5 6 |
| map | a call of Each, Rank, an outer product or a stencil, which applies its operand at each position of a frame: to each item, cell, pair of items or window. These are the map’s cells. Evaluation describes how a map calls its operand |
| prototype | the value an array supplies as its own fill: its first item with each number made 0, each character made a space, and each function kept. An empty array keeps its prototype: ↑0ρ"ab" is ' ' |
| fill | the value an operation uses where an array has no item, as when 5↑1 2 gives 1 2 0 0 0. It is the array’s prototype, unless the call chooses a fill through ⍠’s options record |
| selection | values read from an argument together with their places in it, as a list of positions or a function such as 1↓ reads them |
| glyph | a symbol for a primitive or for syntax, as the glyph reference lists |
| name | a word that refers to a value, as Syntax describes: x or avg |
| statement | the code between two newlines or ◇ separators. Inside brackets and parentheses, these separate rows instead |
| shy | giving a result that isn’t displayed unless the code asks for it: an assignment is shy, and ⎕←x←3 displays its value |
| literal | a number, character, string, ∞, ⍬, or a constant: $t true, $f false or $n NaN |
| group | brackets, parentheses or braces with what they hold: (1+2), [a b] or {ω} |
| token | a glyph, name, literal or group |
| run | a sequence of tokens with no spaces between them |
| token separator | ⁝ separates tokens without ending a run or continuing a literal strand |
| strand | subjects side by side, read as a vector without brackets: 1 2 3 is [1 2 3], and a b is [a b] |
| argument | a subject a function applies to |
| operand | a value an operator applies to |
| monadic | taking one argument, or for an operator, one operand: -5 is a monadic call |
| dyadic | taking two arguments, or for an operator, two operands: 3-5 is a dyadic call |
| ambivalent | callable with one argument or with two: - negates with one argument and subtracts with two |
| expression | a run, group or statement that ends in a subject |
| train | a run, group or statement that ends in a function |
| part | one of the pieces a train is built from: a literal strand, or a token with the operators bound to it, such as 2, +/ or (+×-) |
| fork | three parts of a train, f g h, giving (f ω) g (h ω) |
| tine | one of the two outer parts of a fork |
| atop | two parts of a train, f g, giving f (g ω) |
| bind | a subject directly before a part, fixing that part’s left argument: 2× is 2↣×, and in 2\|#⊢ the 2 binds \| |
| hook | a function that Before or After derives from two functions. With one argument, a hook uses that argument twice: f↢g Y is Y f(g Y), and f↣g Y is (f Y)g Y |
| fast combination | a combination of functions that BPL computes with a dedicated algorithm: 10↑⍋v, ⊛1+x |
Internals terms
These terms describe how BPL runs code. Performance explains what they mean for the speed of a program. •explain, •storage, •memory and •prefs report them.
| Term | Meaning |
|---|---|
| pending | not yet computed. A call on a large array can return a pending array, and BPL computes the items when a later call reads them, as Calls that wait describes. (•storage y).pending is $t for a pending array |
| fused group | the pending calls that BPL computes together, block by block, in one pass over their arrays. Each of those calls is fused. The fused field of •explain has a row for each fused group that ran |
| forced | computed because a call needed the items in memory: ⍋ and display each force a pending array that they read. The forced field of •explain has a row for each call that forced one |
| compiled loop | machine code that BPL makes while a process runs, for the calls and types of one fused group, as Compiled loops describes. •explain records each run of one as a "compiled" route |
| kernel | a built-in loop that computes one primitive on whole arrays of given types, such as + on two arrays of 64-bit floats. A call that isn’t part of a compiled loop runs on its kernel |
| trace | to record the calls that a function makes as the steps of a program. A trace stops at a call that a program can’t hold, as What stops a trace lists |
| program | the typed steps that a trace records. BPL runs the program in place of the function on later calls whose arguments have the same types and shapes. The programs field of •explain has a row for each program built or replayed |
| batched call | one call of a map’s operand on all the map’s cells together, in place of one call for each cell, as Evaluation describes |
| compact storage | storage that holds items of one type side by side, as an array of floats or of characters does. Storage describes it |
| mixed storage | storage that keeps each item’s kind with the item, for an array whose items no one compact type can hold: (•storage 1ₓ 2.5).kind is "mixed" |
| view | an array that shares another array’s items without copying them, as a reshape or a cell from Rank does. A view keeps all of that other array’s items alive |