5 ms·
Author has a page [1] listing a few diff implementations of "K" [2]: * A proprietary array processing language * A variant of APL with elements of Scheme * K
by emmanueloga_ 7y ago
Author has a page [1] listing a few diff implementations of "K" [2]:
* A proprietary array processing language
* A variant of APL with elements of Scheme
* K serves as the foundation for kdb+, an in-memory, column-based database
* Advocates of the language emphasize its speed, facility in handling arrays, and expressive syntax.
1: https://ngn.bitbucket.io/k.html https://ngn.bitbucket.io/k.html
2: https://en.wikipedia.org/wiki/K_(programming_language) https://en.wikipedia.org/wiki/K_(programming_language)
Edit: some examples of idiomatic code (I assume...)
* https://github.com/KxSystems/cookbook https://github.com/KxSystems/cookbook
* https://code.kx.com/phrases/ https://code.kx.com/phrases/
* https://github.com/KxSystems/javakdb https://github.com/KxSystems/javakdb
- kick 7y agoMore fun examples of k: nsl.com kparc.com
- 3xblah 7y ago"64-bit spyware" Telemetry?
- ngnk 7y agoi changed it to "telemetry". i'm not really sure what to call it. they are upfront about it in the clickwrap eula but the data is not anonymized (see section 1.5a - in k ".z.u" means username) and you are not allowed to obstruct connectivity. it's not quite spyware either, as it happens with your consent.
- userbinator 7y agoit's not quite spyware either, as it happens with your consent. All the famous spyware I'm aware of which you had to have initiated the action to install includes an EULA which does mention the data collection. That doesn't make it any less spyware.
- RodgerTheGreat 7y agoOne subtle feature of oK is that it supports the creation of mutable closures. "f.d", where "f" is a function and "d" is some dictionary, will attach the dictionary to the function as if it were the global scope. You can then later use ".f" to extract that dictionary from a function to inspect it. This mechanism allows you to violate referential transparency (which is why Arthur doesn't like it), but you get a powerful mechanism for sandboxing code which can also permit writing code in an "OOP" style, if desired. Here's the feature in action: f:{a+::x}.[a:10] {[x]a::.`a+x} f 30 40 f 30 70 f 30 100 .f [a:100] Naturally, if you have not explicitly re-bound the closure of a function, .f gives you access to that function's natural scope: a:99 99 b:"text" "text" .{} [prm:{[x]{[x]$[x;,/x ,''o'x ^/:x;,x]}@$[-8>@x;!x;x]};in:{[x;y]~^y?x};a:99;b:"text"] Nifty, eh? oK also supports unlimited lexical closure, which is a bit unusual among K interpreters; usually they either eschew closure entirely for simplicity or (as in k3) allow functions to close over a single scope.