encyclopegia.org

K (programming language)

K is a proprietary array processing programming language developed by Arthur Whitney and commercialized by KX Systems. The language serves as the foundation for kdb+, an in-memory, column-based database, and other related financial products. The language, originally developed in 1993, is a variant of APL and contains elements of Scheme. Advocates of the language emphasize its speed, facility in handling arrays, and expressive syntax.

K is a proprietary array processing programming language developed by Arthur Whitney and commercialized by KX Systems. The language serves as the foundation for kdb+, an in-memory, column-based database, and other related financial products. The language, originally developed in 1993, is a variant of APL and contains elements of Scheme. Advocates of the language emphasize its speed, facility in handling arrays, and expressive syntax. {(3*x^2)+(2*x)+1}'!4 In K, named functions are simply function expressions stored to a variable in the same way any data value is stored to a variable. a:25 f:{(x^2)-1} Functions can be passed as an argument to another function or returned as a result from a function. x@>#:'x The expression is evaluated from right to left as follows: #:'x returns the length of each word in the list x. > returns the indices that would sort a list of values in descending order. @ uses the integer values on the right to index into the original list of strings. A function to determine if a number is prime can be written as: {&/x!/:2_!x} The function is evaluated from right to left: !x enumerate the positive integers less than x. 2_ drops the first two elements of the enumeration (0 and 1). x!/: performs modulo division between the original integer and each value in the truncated list. &/ find the minimum value of the list of modulo result. If x is not prime then one of the values returned by the modulo operation will be 0 and consequently the minimal value of the list. If x is prime then the minimal value will be 1, because x mod 2 is 1 for any prime greater than 2. The function below can be used to list all of the prime numbers between 1 and R with: 2_&{&/x!/:2_!x}'!R The expression is evaluated from right to left !R enumerate the integers less than R. ' apply each value of the enumeration to the prime number function on the left. This will return a list of 0's and 1's. & return the indices of the list where the value is 1. 2_ drop the first two elements of the enumeration (0 and 1) ==K financial products== K is the foundation for a family of financial products. Kdb+ is an in-memory, column-based database with much of the same functions of a relational database management system. The database supports SQL, SQL-92 and ksql, a query language with a syntax similar to SQL and designed for column based queries and array analysis. Kdb+ is available for several operating systems, including Solaris, Linux, macOS, and Windows (32-bit or 64-bit). ==See also== J, another APL-inspired language Q, the language of kdb+ and a new merged version of K and ksql. ==References== ==External links== , KX Systems , kdb+ Overview of K (with a link to K reference card) Dennis Shasha - K as a Prototyping Language K by Arthur Whitney (2005) oK REPL for a K clone Kona an open-source K3 implementation Amber an open-source K6 implementation with q/kdb+ vocabulary.

References

No reference rows published for this article.

Cite this article

MLA

"K (programming language)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/k-programming-language. Accessed 24 November 2026.

Chicago

"K (programming language)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/k-programming-language.

APA

encyclopegia.org. (2026). K (programming language). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/k-programming-language

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

official language

stub · references available

pan-Slavic language

stub · references available

Hawaiʻi Sign Language

stub · references available

Taiwanese Sign Language

stub · references available

Category:Programming languages

stub · references available

International Mother Language Day

stub · references available

polysynthetic language

stub · references available

Category:Films by country or language

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1368851611 · 0.5 · snapshot enwiki-001368851611

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.