I-Beam: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
mNo edit summary
m (Adám Brudzewsky moved page I-beam to I-Beam: Capitalisation)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Built-in|I-Beam|⌶}} is a [[primitive operator|primitive]] [[monadic operator]] that takes a numeric code as it's [[operand]] and [[derived function|derives]] an [[ambivalent]] function which provides a range of ad-hoc operations. This range covers non-[[primitive function]]s - for example: experimental features, interpreter-level control, access to the environment, and information about APL itself.
{{Built-in|I-Beam|⌶}} is a [[primitive operator|primitive]] [[ambivalent function]] or [[monadic operator]] that takes a numeric code as an [[argument]]/[[operand]] and provides a range of ad-hoc operations. This range covers non-[[primitive function]]s, for example experimental features, interpreter-level control, access to the environment, and information about APL itself.


== History ==  
== History ==  
I-Beam was introduced in [[APL\360]] by implementers to execute [[wikipedia:IBM System/360|System/360]] instructions from program control. The convenience of this lead to I-Beam becoming directly available for use by anyone.<ref>[https://dl.acm.org/doi/pdf/10.1145/585923.585925 The Design of APL]</ref>
I-Beam was introduced in [[APL\360]] as an [[ambivalent function]] for implementers to execute [[wikipedia:IBM System/360|IBM System/360]] (''I-Beam'' being pronounced very similarly to ''IBM'') instructions from program control. The convenience of this lead to I-Beam becoming directly available for use by anyone.<ref>[https://dl.acm.org/doi/pdf/10.1145/585923.585925 The Design of APL]</ref> However, modern IBM-derived APLs replace all I-Beams with [[quad name]]s. For example, <syntaxhighlight lang=apl inline>5⌶</syntaxhighlight> became <syntaxhighlight lang=apl inline>⎕DL</syntaxhighlight> ([[Delay]]) while changing time unit from [[wikipedia:jiffy|jiffies]] of 1⁄300<sup>th</sup> of a second to a whole second.
 
Later, after it became common to use arrays as operands, [[Dyalog APL]] began using the [[glyph]] as an operator where the operand selects functionality. It is used for testing experimental features, some of which may eventually become primitives or quad name. For example, <syntaxhighlight lang=apl inline>819⌶</syntaxhighlight> became <syntaxhighlight lang=apl inline>⎕C</syntaxhighlight> ([[Case Convert]]), while introducing distinction between case folding (for case insensitive comparisons) and case mapping (for human presentation forms).


== Mnemonics ==
== Mnemonics ==
In general, I-Beam's numeric operand isn't intended to be easily recalled. But some are given meaningful names.
In general, I-Beam's numeric operand isn't intended to be easily recalled. But some are given meaningful names.


One method is to devise a name from the [[wikipedia:Roman numerals|Roman numeral]] letters I, V, X, L, C, D, and M<ref>[https://www.dyalog.com/blog/2016/06/i-beam-mnemonics/ I-Beam Mnemonics]</ref>
One method is to devise a name from the [[wikipedia:Roman numerals|Roman numeral]] letters I, V, X, L, C, D, and M:<ref>[https://www.dyalog.com/blog/2016/06/i-beam-mnemonics/ I-Beam Mnemonics]</ref>


{|class=wikitable
{|class=wikitable
! I-Beam !! Numeral
! I-Beam !! Numeral
|-
| Colour Coding || CC (200)
|-
| Colour Coding Information || CCI (201)
|-
|-
| Called Monadically || CM (900)
| Called Monadically || CM (900)

Latest revision as of 18:13, 14 September 2022

I-Beam () is a primitive ambivalent function or monadic operator that takes a numeric code as an argument/operand and provides a range of ad-hoc operations. This range covers non-primitive functions, for example experimental features, interpreter-level control, access to the environment, and information about APL itself.

History

I-Beam was introduced in APL\360 as an ambivalent function for implementers to execute IBM System/360 (I-Beam being pronounced very similarly to IBM) instructions from program control. The convenience of this lead to I-Beam becoming directly available for use by anyone.[1] However, modern IBM-derived APLs replace all I-Beams with quad names. For example, 5 became ⎕DL (Delay) while changing time unit from jiffies of 1⁄300th of a second to a whole second.

Later, after it became common to use arrays as operands, Dyalog APL began using the glyph as an operator where the operand selects functionality. It is used for testing experimental features, some of which may eventually become primitives or quad name. For example, 819 became ⎕C (Case Convert), while introducing distinction between case folding (for case insensitive comparisons) and case mapping (for human presentation forms).

Mnemonics

In general, I-Beam's numeric operand isn't intended to be easily recalled. But some are given meaningful names.

One method is to devise a name from the Roman numeral letters I, V, X, L, C, D, and M:[2]

I-Beam Numeral
Colour Coding CC (200)
Colour Coding Information CCI (201)
Called Monadically CM (900)
Line Count LC (50100)

References

APL built-ins [edit]
Primitive functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentitySelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndex
Selector Index generatorGradeIndex OfInterval IndexIndicesDeal
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Primitive operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductPowerAtUnderRankDepthVariantStencilCut (J)
Quad names
Arrays Index originMigration levelAtomic vector
Functions Name classCase convertUnicode convert
Operators SearchReplace