I am amazed how quickly APL changed the way I think.
Also strongly recommend watching Aaron Hsu on youtube.
There is no better time to re-learn programming, try APL, Forth, LISP, z80 machine code, UXN TAL, just try new things.
"Men are born soft and supple; dead they are stiff and hard. Plants are born tender and pliant; dead, they are brittle and dry. Thus whoever is stiff and inflexible is a disciple of death. Whoever is soft and yielding is a disciple of life. The hard and stiff will be broken. The soft and supple will prevail."
[1]: https://github.com/jackdoe/gnu-apl-wasm source of the repl and learn playground and also how to compile gnu apl to wasm (vibecoded)
If anyone is curious how queries in this language look, you can see it here: https://github.com/ClickHouse/ClickBench/pull/939/changes#di...
The default CBQN "make o3" on x86-64 also results in it only using SSE2 (utilizing function multiversioning is on the ever-infinite TODO list, though somewhat-low on it considering it's strictly-unnecessary in any specific situation; there's also AVX-512 usage on a branch, but mostly only AVX2 on mainline; and no arm SVE)
That all said, CBQN doesn't currently do any loop fusion, so being significantly-slower for sequences of operations over larger-than-cache arrays would kinda just be expected. BQN also just isn't particularly intended for database work anyway.
(didn't look much at the specific query impls, though "Pair" in utils.bqn is at least an overlong version of "Pair ← ⋈¨"; and some if not all of those Pairs would be better as "≍˘" to avoid nested arrays and ensuing pointer chasing; and, of course, if some of the columns are bools/int8/int16/int32, it'd be beneficial to store & load them as such instead of float64)
L used the two open ones that are easy to replicate: H2O.ai (great bench) https://github.com/l-labs/db-benchmark TSBS (less great but useful) https://github.com/l-labs/tsbs
If there are others (will do ClickBench) they'll go there as well
primitive speedup
sum price 7.7x
avg price 33x
how does this even happen though? //100k random 32b ints ...
l>v:100000?255
l>v
196 124 18 216 63 169 151 173 126 99 90 133 92 158 217 169 201 191 138 105 13..
// but actually they are 1/4 the size e.g. int8
l>-17!`v
1b // is compressed?
100032j // compressed bytes
400000j // original byteshttps://en.wikipedia.org/wiki/Array_programming
EDIT: Did someone downvoted this because it is wrong or is someone I am arguing with rage-downvoted this ?
Extremely likely to be AI, though I’m not sure that matters for rules re: submissions
The language and its ideas come from Ken Iverson's famous paper "Notation as a Tool of Thought". This is a common understanding for people in the APL, K/J/Q etc array language communities, who are likely this website and product's intended audience.
That much makes sense in context: K is an array language, like APL, J, etc. From what little experience I have with J, ‘vector as a unit of thought’ seems like a reasonable description.
> Extremely likely to be AI
I had the same thought though.
For moderators, I’d suggest that for the community, it’s spam. That’s one example, there are many more like it. The individual statement may be defensible but is still pseudoscientific language. This sort of content is a massive burden to community. Unanswerable anrguments about AI writing, whether the ability for an individual to have a parse-able reading is the same as writing being parable. The net effect is negative experiences for many and copy-editing for someone who did not do copy editing.
I’ve had similar ideas in the past: clearly simd is the way to get the most out of your cpu. Can we design a language where all operations are automatically simd, and it takes effort to do anything in scalars?
And I guess these array languages are what you might get.
It’s not ‘unit vector of thought,’ btw, which is weirder than what it says.