TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

K7 Tutorial

198 pointsby chrispsnabout 6 years ago

19 comments

sannysanoffabout 6 years ago
For curious, several facts i noticed by running anaconda distributed shakti:<p>1) k7 implementation obviosly is completely different codebase from current kdb+. I ran the following query on kdb+ and k7<p><pre><code> a1:1000000?1000000;b1:1000000?1000000; \t select #a by b from (+`a`b!(a1;b1)); </code></pre> And difference seems to be in order of magnitude (k7 is 650 msec, kdb+ is 77 msec), also on k7, time increases for subsequent execution of same query ==&gt; memory leak? Looks like it&#x27;s very early stage.<p>2) null number (0N) and infinity are now represented as non-ascii symbols Ø and ∞, also parsed as such.<p>3) type operator (@) returns symbols (`i, `j) for ints and longs etc, was returning shorts before. Interesting how do we distinguish arrays&#x2F;scalars now.<p>4) default numeric type (e.g. 12345) is now int, was long.<p>5) entering overflow numeric literal returns Ø, was throwing exception.<p>6) k in anaconda is not stripped 675K linux x64 executable, stripped is 220K, while kdb+ is 657K as sold.
评论 #19424747 未加载
评论 #19429320 未加载
评论 #19425390 未加载
toastkingabout 6 years ago
A concept in K that I wish more languages had is indexing with a list of indices. It always blows peoples&#x27; minds when I tell them how sorting works in K. You use grade (&lt;) to return the indices that will sort the array if indexed in that order. Then you pass in that list as the indices to the list. They do it in the string examples in this tutorial.
评论 #19420850 未加载
评论 #19422953 未加载
评论 #19420923 未加载
评论 #19420858 未加载
yiyusabout 6 years ago
It&#x27;s a very good tutorial (it&#x27;s not easy to find information about k7), but it is a bit outdated. For example, % is inverse and not sqrt now, and it is not possible to evaluate parsed trees with !. I am sure the differences are small, but be prepared to be surprised with some descriptive error messages like: &#x27;nyi
评论 #19419962 未加载
avmichabout 6 years ago
What&#x27;s important is that APL language family isn&#x27;t a domain-specific one, suitable for some particular tasks in a narrow niche. To the contrary, they are languages of computations, allowing rather short paths from thought to implementation of an algorithm, compared to other languages.<p>I&#x27;m sure K knowledge and experience ensure the practitioner powerful tools for wide variety of problems in many areas.
评论 #19419809 未加载
pvitzabout 6 years ago
The mentioned gitlab repo doesn&#x27;t seem to exist anymore. One would have to download kdb+ from kx, but I am not sure if this wouldn&#x27;t be K4 only. Alternatively, one could play with oK (K6) which would also give you the nice graphical iKe.
评论 #19418848 未加载
vadimlabout 6 years ago
K7 like it&#x27;s ancestor APL is extremely powerful language, whit great signal to noise ratios. However it is kind of &quot;write-only&quot; language.. When trying to read a code not written by you (or written by you couple of monthes ago) you struggle to understand it...
评论 #19420792 未加载
评论 #19420814 未加载
评论 #19421689 未加载
pmontraabout 6 years ago
The language looks generally good for its goal, except these two operators<p><pre><code> |&#x2F;y &#x2F; maximum &amp;&#x2F;y &#x2F; minimum </code></pre> Those two characters have no connection with the operation they stand for and seem to be randomly picked from the available symbols on the keyboard. Why not simply max y and min y, which anybody can read and understand?
评论 #19419198 未加载
评论 #19419356 未加载
评论 #19419365 未加载
评论 #19419239 未加载
评论 #19420207 未加载
评论 #19419194 未加载
评论 #19420094 未加载
beaumaynsabout 6 years ago
I was hoping we&#x27;d finally get proper lexical scope in this version of K. Alas, seems to not be the case.
评论 #19422184 未加载
mark_l_watsonabout 6 years ago
I liked the example of 1 line of code generation a table of random stock data.<p>But, this is not free or open source?
评论 #19420315 未加载
quickthrower2about 6 years ago
Can any comment how this compares to R? Seems to have similar capabilities.
评论 #19420452 未加载
asimjalisabout 6 years ago
What are the financial applications that this is used for? Does anyone have specific examples?
评论 #19422398 未加载
评论 #19424401 未加载
didsomeonesayabout 6 years ago
Interesting previous discussion of K programming languages (up to K5):<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16500908" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16500908</a> (2005)
surajsabout 6 years ago
Gitlab link to download it is a 404!?
ngcc_hkabout 6 years ago
Difference between J7 and K7?
评论 #19419430 未加载
maxpetisabout 6 years ago
Yeah I could really use that. I&#x27;d like to take advantage of its enhanced BCLK capabilities but every time I mess with it it doesn&#x27;t POST. <a href="https:&#x2F;&#x2F;www.assignmentland.co.uk&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.assignmentland.co.uk&#x2F;</a>
svnpennabout 6 years ago
is it a private repo? this is asking me to login<p><a href="https:&#x2F;&#x2F;gitlab.com&#x2F;k7db&#x2F;k" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;k7db&#x2F;k</a>
评论 #19421339 未加载
patrickg_zillabout 6 years ago
Trying to learn how to use A+ from aplusdev.org to do some simple work for my personal use. A previous language designed by Arthur Whitney and GPL also. Included in Debian derived distros btw.
评论 #19420978 未加载
ne01about 6 years ago
Off topic, but is it just me, or do you also dig the simple text format of the website? -- so easy to read!
评论 #19418947 未加载
twohoursprogabout 6 years ago
Any good programmer should be able o learn to program k7 at the level of this tutorial in two hours.