K: Difference between revisions
No edit summary |
No edit summary |
||
Line 56: | Line 56: | ||
! Verb !! Monadic !! Dyadic !! Triadic !! Tetradic | ! Verb !! Monadic !! Dyadic !! Triadic !! Tetradic | ||
|- | |- | ||
| < | | <code>+</code> || flip ([[Transpose]]) || [[plus]] || || | ||
|- | |- | ||
| < | | <code>-</code> || [[negate]] || [[minus]] || || | ||
|- | |- | ||
| < | | <code>*</code> || [[first]] || [[times]] || || | ||
|- | |- | ||
| < | | <code>%</code> || [[reciprocal]] || [[divide]] || || | ||
|- | |- | ||
| < | | <code>|</code> || [[reverse]] || [[max]]|[[or]] || || | ||
|- | |- | ||
| < | | <code>&</code> || [[where]] || [[min]]|[[and]] || || | ||
|- | |- | ||
| < | | <code>^</code> || [[shape]] || [[power]] || || | ||
|- | |- | ||
| < | | <code>!</code> || enumerate (includes [[Iota]]) || [[rotate]]|[[mod]] || || | ||
|- | |- | ||
| < | | <code><</code> || [[grade up]] || [[less than]] || || | ||
|- | |- | ||
| < | | <code>></code> || [[grade down]] || [[greater than]] || || | ||
|- | |- | ||
| < | | <code>=</code> || [[group]] || [[equals]] || || | ||
|- | |- | ||
| < | | <code>~</code> || [[not]], attribute || [[match]] || || | ||
|- | |- | ||
| < | | <code>@</code> || [[atom]] || [[Index function|at index]] || [[amend]]/trap || [[amend]] | ||
|- | |- | ||
| < | | <code>?</code> || range ([[Unique]]) || function inverse/find/draw/deal/sample || invert-guess || | ||
|- | |- | ||
| < | | <code>_</code> || [[floor]] || [[drop]]|[[Cut (K)|cut]] || || | ||
|- | |- | ||
| < | | <code>,</code> || enlist (like [[Enclose]]) || [[Catenate|join]] || || | ||
|- | |- | ||
| < | | <code>#</code> || [[count]] || [[take]]|[[reshape]] || || | ||
|- | |- | ||
| < | | <code>$</code> || [[format]] || dollar (conversions) || || | ||
|- | |- | ||
| < | | <code>.</code> || make/unmake dictionary || dot index || [[amend]]/trap || [[amend]] | ||
|- | |- | ||
| < | | <code>:</code> || colon || [[assignment]] || || | ||
|} | |} | ||
Line 100: | Line 100: | ||
! Adverb !! Definition | ! Adverb !! Definition | ||
|- | |- | ||
| < | | <code>/</code> || over (incudes [[Reduce]] and [[Power operator|Power]]) | ||
|- | |- | ||
| < | | <code>\</code> || [[scan]] | ||
|- | |- | ||
| < | | <code>'</code> || [[each]] | ||
|- | |- | ||
| < | | <code>/:</code> || each right | ||
|- | |- | ||
| < | | <code>\:</code> || each left | ||
|- | |- | ||
| < | | <code>':</code> || eachpair (like [[Windowed Reduce]]) | ||
|} | |} | ||
==External links== | ==External links== | ||
* [https://ngn.bitbucket.io/k.html Overview of K implementations] | * [https://ngn.bitbucket.io/k.html Overview of K implementations] | ||
{{APL dialects}} | {{APL dialects}} |
Revision as of 14:41, 16 March 2020
K denotes a family of programming languages designed by Arthur Whitney and commercialized by Morgan Stanley, Kx Systems, and Shakti. In 1985, while at Morgan Stanley, Whitney created the statically typed A dialect of APL. His colleagues extended A into A+ in 1988. Finally, Whitney presented the first K implementation in 1992, a "reduced instruction set" dialect which only used ASCII glyphs and limited arrays to (nested) vectors. For a long time, K's main role was as implementation language for Q, the query language of kdb+, which is an in-memory, column-based database. K7 ("Shakti K") was the first K to have full Unicode support, and it also uses a limited set non-ASCII symbols in the core language, for example Ø
and ∞
.
Releases
See The Evolution of Database Software.
Year | Version |
---|---|
1992 | K0 |
1994 | K1 |
1996 | K2 |
2000 | K4 |
unreleased | K5 |
unreleased | K6 |
2018 | K7 (Shakti) |
unreleased | K8 |
2020 | K9 (Shakti) |
Primitives
K3
From the Kona Wiki.
Verb | Monadic | Dyadic | Triadic | Tetradic |
---|---|---|---|---|
+ |
flip (Transpose) | plus | ||
- |
negate | minus | ||
* |
first | times | ||
% |
reciprocal | divide | ||
reverse | max|or | |||
& |
where | min|and | ||
^ |
shape | power | ||
! |
enumerate (includes Iota) | rotate|mod | ||
< |
grade up | less than | ||
> |
grade down | greater than | ||
= |
group | equals | ||
~ |
not, attribute | match | ||
@ |
atom | at index | amend/trap | amend |
? |
range (Unique) | function inverse/find/draw/deal/sample | invert-guess | |
_ |
floor | drop|cut | ||
, |
enlist (like Enclose) | join | ||
# |
count | take|reshape | ||
$ |
format | dollar (conversions) | ||
. |
make/unmake dictionary | dot index | amend/trap | amend |
: |
colon | assignment |
Adverb | Definition |
---|---|
/ |
over (incudes Reduce and Power) |
\ |
scan |
' |
each |
/: |
each right |
\: |
each left |
': |
eachpair (like Windowed Reduce) |
External links
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 |