K: Difference between revisions
No edit summary |
m (Text replacement - "first-class function" to "first-class function") |
||
(27 intermediate revisions by 6 users not shown) | |||
Line 9: | Line 9: | ||
| developer = [[Arthur Whitney]] | | developer = [[Arthur Whitney]] | ||
| latest release version = K9 "Shakti" / 2020 | | latest release version = K9 "Shakti" / 2020 | ||
| implementation | | implementation languages = [[wikipedia:C_(programming_language)|C]], [https://web.archive.org/web/20220823171916/https://kparc.com/b/ B] | ||
| platforms = macOS, Linux, Windows, [[kOS]] | | platforms = macOS, Linux, Windows, [[kOS]] | ||
| license = Free for personal use / Proprietary commercial software (free open source implementations exist) | | license = Free for personal use / Proprietary commercial software (free open source implementations exist) | ||
| website = [https://kx.com/ Kx Systems], [https://shakti.com/ Shakti] | | website = [https://k.miraheze.org/ Wiki], [https://kx.com/ Kx Systems], [https://shakti.com/ Shakti] | ||
| documentation = [ | | documentation = [https://web.archive.org/web/20220826224612/https://kparc.com/k.txt K4], [https://kparc.github.io/ref/ K9], [https://k.miraheze.org/ Wiki] | ||
| download = [https://kx.com/connect-with-us/download/ K4], [https://shakti.com/download/ K9] | | download = [https://kx.com/connect-with-us/download/ K4], [https://shakti.com/download/ K9] | ||
| influenced by = [[A+ | | influenced by = [[A+]], [[wikipedia:Scheme_(programming_language)|Scheme]] | ||
| influenced = [[Q]], [[RAD]], [[Kona]], [[Klong]], [[oK]], [[ngn/k]] | | influenced = [[Q]], [[RAD]], [[Kona]], [[Klong]], [[kuc]], [[oK]], [[ngn/k]], [[xs]], [[Goal]] | ||
| run online = [https://kparc. | | run online = [https://web.archive.org/web/20220905101252/https://kparc.com/k/ K9] | ||
}} | }} | ||
'''K''' denotes a family of programming languages designed by [[Arthur Whitney]] | '''K''' denotes a family of programming languages designed by [[Arthur Whitney]], which is sold by Kx Systems and Shakti and also supported by several independent implementations. K is an ASCII-only language influenced by Whitney's previous APL design [[A+]]. It has fewer primitives in part because it represents arrays as [[list model|nested lists]], unifying [[rank]] and [[depth]], and encourages [[wikipedia:Scheme_(programming_language)|Scheme]]-like functional programming with [[first-class function]]s. Whitney presented the first K implementation (K0) in 1992, and soon founded [[Kx Systems]] to develop it further with versions numbering K1 through K6. K4 is now the implementation language for the time-series database kdb+ as well as derivative language [[Q]]. Whitney has developed further versions of K at Shakti, beginning with K7. Notable non-commercial implementations include [[Kona]] based on K3, and [[ngn/k]] and [[oK]] based on K6. | ||
== Releases == | == Releases == | ||
See [https://shakti.com/database-software-history/ The Evolution of Database Software]. | See [https://web.archive.org/web/20191202012157/shakti.com/database-software-history/ The Evolution of Database Software]. | ||
{|class=wikitable | {|class=wikitable | ||
! Year | ! Year !! Version | ||
|- | |- | ||
| 1992 | | 1992 || K0 | ||
|- | |- | ||
| 1994 | | 1994 || K1 | ||
|- | |- | ||
| 1996 | | 1996 || K2 | ||
|- | |- | ||
| 2000 | | 2000 || K4 | ||
|- | |- | ||
| unreleased || K5 | | unreleased || K5 | ||
|- | |- | ||
| unreleased || K6 | | unreleased || K6 | ||
|- | |- | ||
| 2018 | | 2018 || K7 (Shakti) | ||
|- | |- | ||
| | | doesn't exist || K8 | ||
|- | |- | ||
| 2020 | | 2020 || K9 (Shakti) | ||
|} | |} | ||
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><nowiki>|</nowiki></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 (K)|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> || [[Pair|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 (includes [[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== | |||
* [https:// | == The name K == | ||
{{APL dialects}} | |||
K's single-letter name parallels [[J]], and [[Arthur Whitney]] had offered design input on J shortly before publishing K. Unlike J, K is often written k, without capitalization. Whitney has given various explanations of the choice of letter,<ref>[[Arthur Whitney]]. Re: Why call it K? [https://web.archive.org/web/20041024214058/http://www.kx.com/listbox/k/msg06334.html response 1], [https://web.archive.org/web/20041024212043/http://www.kx.com/listbox/k/msg06335.html response 2].</ref> including "keys to the kingdom".<ref>[[Arthur Whitney]]. [http://archive.vector.org.uk/art10010830 "K"]. [[Vector Journal]] volume 10 issue 1.</ref> | |||
== External links == | |||
* [https://k.miraheze.org/ K Language Wiki] | |||
* [https://en.wikipedia.org/wiki/K_(programming_language) K (programming language)] | |||
== References == | |||
<references/> | |||
{{APL dialects}}[[Category:K dialects]][[Category:IR compilers]] |
Latest revision as of 02:01, 6 September 2024
K denotes a family of programming languages designed by Arthur Whitney, which is sold by Kx Systems and Shakti and also supported by several independent implementations. K is an ASCII-only language influenced by Whitney's previous APL design A+. It has fewer primitives in part because it represents arrays as nested lists, unifying rank and depth, and encourages Scheme-like functional programming with first-class functions. Whitney presented the first K implementation (K0) in 1992, and soon founded Kx Systems to develop it further with versions numbering K1 through K6. K4 is now the implementation language for the time-series database kdb+ as well as derivative language Q. Whitney has developed further versions of K at Shakti, beginning with K7. Notable non-commercial implementations include Kona based on K3, and ngn/k and oK based on K6.
Releases
See The Evolution of Database Software.
Year | Version |
---|---|
1992 | K0 |
1994 | K1 |
1996 | K2 |
2000 | K4 |
unreleased | K5 |
unreleased | K6 |
2018 | K7 (Shakti) |
doesn't exist | 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 (includes Reduce and Power) |
\ |
scan |
' |
each |
/: |
each right |
\: |
each left |
': |
eachpair (like Windowed Reduce) |
The name K
K's single-letter name parallels J, and Arthur Whitney had offered design input on J shortly before publishing K. Unlike J, K is often written k, without capitalization. Whitney has given various explanations of the choice of letter,[1] including "keys to the kingdom".[2]
External links
References
- ↑ Arthur Whitney. Re: Why call it K? response 1, response 2.
- ↑ Arthur Whitney. "K". Vector Journal volume 10 issue 1.
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 |