I have seen it over the years … I dunno seems very niche, which admittedly the page points out.
Like Pandas / data.table etc. all have data cleaning like upper case, lower case, strip whitespace, unicode, etc. Somehow I feel like k is not going to support that very well.
You can’t compare the toy K interpreter (< 300 lines of C) with the commercial releases of K. The toy interpreter doesn’t support unicode, it doesn’t even support user defined functions. The commercial K is what’s being compared to Pandas.
Arthur Whitney’s previous company, <kx.com>, also sells K. They have a normal looking corporate web site, with product documentation. Kx focusses their marketing efforts on the Q language, which is a thin layer of syntactic sugar on top of K. You can still use K if you want. Q has data cleaning functions such as upper, lower, trim, ltrim, rtrim, etc. Unicode is supported.
Shakti K probably supports Unicode, but you have to pay money to see documentation, so I don’t know.
Curious how it gets those performance numbers. There’s always a mythology around k, but I don’t see how it can go shot-for-shot and beat out something like polars without some kind of tradeoff.
The numbers are really weird. The whole concept of those tests seems weird to be honest. It can be shortened to “specialised app: fast; generic app: slow”. No surprise there, but also that’s not a representative test and now I think I need to be careful with any other claims from the authors.
Reminds me of the “awk faster than hadoop cluster” post in the past. Apples and oranges.
https://k.miraheze.org/wiki/Running_K lists two web-based shakti interpreters (k7 and k9). I don’t know how the author gets the executables.
The number after “k” indicates a dialect.
Since the first time I looked yesterday, it seems like there’s been a new, updated release (git diff --stat says “3 files changed, 47 insertions, 61 deletions”). This new version includes a makefile that suggests a whole bunch of complier flags and also hard-codes clang-13 as the compiler. I still can’t build the code, with the compiler flags or without, with either of the compilers on my machine here (clang-16 and gcc-13).
I tried clang-14 and also got build errors. First error
./a.h:38:30: error: use of unknown builtin ‘__builtin_ia32_pminub256’ [-Wimplicit-function-declaration]
Ah, thanks! Yes, that got it building for me. It crashes immediately because my CPU doesn’t support avx2 instructions, but I guess that’s my problem, not the code.
It still fails to build with gcc, because it apparently supports a different set of builtin functions, but now that I know my CPU is not compatible, I have much less interest in digging further.
Holy crap is that a source release???
Beautiful. Just beautiful. I know what I’m doing this weekend.
EDIT: Looks like it’s for a stripped-down version. Still super exciting!
The HN thread has some good info - https://news.ycombinator.com/item?id=40544283
It surfaced this code with some actual comments:
https://github.com/kparc/ksimple/blob/main/a.c
This is a very minimal release:
Or
I have seen it over the years … I dunno seems very niche, which admittedly the page points out.
Like Pandas / data.table etc. all have data cleaning like upper case, lower case, strip whitespace, unicode, etc. Somehow I feel like k is not going to support that very well.
You can’t compare the toy K interpreter (< 300 lines of C) with the commercial releases of K. The toy interpreter doesn’t support unicode, it doesn’t even support user defined functions. The commercial K is what’s being compared to Pandas.
Arthur Whitney’s previous company, <kx.com>, also sells K. They have a normal looking corporate web site, with product documentation. Kx focusses their marketing efforts on the Q language, which is a thin layer of syntactic sugar on top of K. You can still use K if you want. Q has data cleaning functions such as
upper,lower,trim,ltrim,rtrim, etc. Unicode is supported.Shakti K probably supports Unicode, but you have to pay money to see documentation, so I don’t know.
Curious how it gets those performance numbers. There’s always a mythology around
k, but I don’t see how it can go shot-for-shot and beat out something like polars without some kind of tradeoff.The numbers are really weird. The whole concept of those tests seems weird to be honest. It can be shortened to “specialised app: fast; generic app: slow”. No surprise there, but also that’s not a representative test and now I think I need to be careful with any other claims from the authors.
Reminds me of the “awk faster than hadoop cluster” post in the past. Apples and oranges.
https://k.miraheze.org/wiki/Running_K lists two web-based shakti interpreters (k7 and k9). I don’t know how the author gets the executables. The number after “k” indicates a dialect.
ngn/k is a popular K6 implementation. https://razetime.github.io/ngn-k-tutorial/ contains a tutorial.
A few links are within
https://kparc.com/but the domain seems garbage collected… kparc.io is present but it only contains a homepage.I get a 404 error.
Remove the trailing
/kand it works.Since the first time I looked yesterday, it seems like there’s been a new, updated release (
git diff --statsays “3 files changed, 47 insertions, 61 deletions”). This new version includes a makefile that suggests a whole bunch of complier flags and also hard-codesclang-13as the compiler. I still can’t build the code, with the compiler flags or without, with either of the compilers on my machine here (clang-16 and gcc-13).Has anybody else been able to build it?
I tried clang-14 and also got build errors. First error ./a.h:38:30: error: use of unknown builtin ‘__builtin_ia32_pminub256’ [-Wimplicit-function-declaration]
Seems to be related to this LLVM change which removed the above builtin: https://reviews.llvm.org/D117798
When I replaced __builtin_ia32_pminub256 with __builtin_elementwise_min and ditto for max, then it compiles and apparently works.
So it seems that any clang after clang-13 will not work.
Ah, thanks! Yes, that got it building for me. It crashes immediately because my CPU doesn’t support avx2 instructions, but I guess that’s my problem, not the code.
It still fails to build with gcc, because it apparently supports a different set of builtin functions, but now that I know my CPU is not compatible, I have much less interest in digging further.