BQN: Difference between revisions
(fix syntax colouring) |
m (Bump year) |
||
Line 8: | Line 8: | ||
| released = 2020 | | released = 2020 | ||
| developer = [[Marshall Lochbaum]] | | developer = [[Marshall Lochbaum]] | ||
| latest release version = | | latest release version = 2021 (unversioned) | ||
| implementation languages = BQN, [[wikipedia:JavaScript|JavaScript]] | | implementation languages = BQN, [[wikipedia:JavaScript|JavaScript]] | ||
| source = [https://github.com/mlochbaum/BQN GitHub] | | source = [https://github.com/mlochbaum/BQN GitHub] |
Revision as of 21:23, 19 January 2021
BQN is an APL-family language designed primarily by Marshall Lochbaum. Although it maintains the concept of array-driven computing and much of APL's array functionality, BQN discards all compatibility with other array languages and changes many fundamental concepts. It uses the based array model with dedicated array notation, distinguishes between data types and expression roles to give the language a context-free grammar with first-class functions, and uses a new set of glyphs with different primitive pairings. The language uses the leading axis model and tacit programming as core paradigms. Its implementation is largely self-hosted, with an array-based compiler like Co-dfns.
Primitives
Functions
Glyph | Monadic | Dyadic |
---|---|---|
+ |
Conjugate | Add |
- |
Negate | Subtract |
× |
Sign | Multiply |
÷ |
Reciprocal | Divide |
⋆ |
Exponential | Power |
√ |
Square Root | Root |
⌊ |
Floor | Minimum |
⌈ |
Ceiling | Maximum |
∧ |
Sort Up | And |
∨ |
Sort Down | Or |
¬ |
Not | Span |
Absolute Value | Modulus | |
≤ |
Less Than or Equal to | |
< |
Enclose | Less Than |
> |
Merge | Greater Than |
≥ |
Greater Than or Equal to | |
= |
Rank | Equals |
≠ |
Length | Not Equals |
≡ |
Depth | Match |
≢ |
Shape | Not Match |
⊣ |
Identity | Left |
⊢ |
Identity | Right |
⥊ |
Deshape | Reshape |
∾ |
Join | Join to |
≍ |
Solo | Couple |
↑ |
Prefixes | Take |
↓ |
Suffixes | Drop |
↕ |
Range | Windows |
» |
Nudge | Shift Before |
« |
Nudge Back | Shift After |
⌽ |
Reverse | Rotate |
⍉ |
Transpose | Reorder axes |
/ |
Indices | Replicate |
⍋ |
Grade Up | Bins Up |
⍒ |
Grade Down | Bins Down |
⊏ |
First Cell | Select |
⊑ |
First | Pick |
⊐ |
Classify | Index of |
⊒ |
Occurrence Count | Progressive Index of |
∊ |
Unique Mask | Member of |
⍷ |
Deduplicate | Find |
⊔ |
Group Indices | Group |
Modifiers
1-modifiers in BQN use superscript symbols, while 2-modifiers use symbols with a circle, but not one with a line through it like ⌽
and ⍉
.
|
|
APL dialects [edit] | |
---|---|
Maintained | APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo ∙ TinyAPL |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |