« first day (880 days earlier)      last day (655 days later) » 

12:27 AM
@Bubbler posted a solution.. can anyone golf it some more?
 
12:38 AM
@Traws Interesting, I have a very different solution but same bytecount
 
 
3 hours later…
3:30 AM
From a K book: "Other ideas by Whitney found their way into J: orienting primitives on the leading axis, using prefix rather than suffix for agreement, and total array order- ing (Hui, 2006, 1995)" Even with a decent amount of J experience, it was not clear to me what each of these phrases mean. Can anyone explain?
 
@Bubbler Tyvm.
 
4:16 AM
K implementations often (and imo should) define some ordering for all objects when subject to a grade. even if the comparisons across types are highly arbitrary, consistency and closure is desirable
 
@JohnE Thanks.
 
IIRC total array ordering is also relevant in APL and J when doing comparison between/grade on boxed/nested arrays and objects
And yeah, sorting/grading works only when a total order is defined between all possible values
which reminds me of sorting a floating-point array in Rust, which is non-trivial because f32/f64 are only PartialOrd, not Ord, because NaNs :/
 
4:35 AM
I have been pleasantly surprised before at J correctly sorting things like boxes that I didn't think it would.
 
 
1 hour later…
5:47 AM
@JohnE Is the o operator specific to oK? I tried it in the latest q installation from Kx systems and I got this error: Try it online!
 
@Jonah it’s also in ngn/k, and as .z.s in q/k4
 
@coltim I'm noticing some other differences to, eg [1;"A";0;"B";"C"] returns "C" in q, whereas as the oK guide has it return "A".
 
@Jonah hmm, $[1;"A";…] or something else?
 
@coltim doh. i forget to copy the $ when i pasted it in.
 
@coltim not sure of the original provenance though…
@Bubbler I truly appreciate having nulls/NaNs compare equal to themselves and not having to deal with three-valued logic the way SQL does things
 
6:10 AM
Looks like "ab"+5 also fails in q :(
 
6:22 AM
assuming you have static parsing, the difference between thunks and idioms is that thunks do runtime switches on data-type and array size. is that right?
I plan to add idioms on byte-code level for some very few cases. e.g. group (=x) may be much faster when sorted. newer k's always sort. i thought about using the =^x idiom to switch to faster code, but let the user decide if he cares about order or not.
 
ngn
6:39 AM
@Bubbler @coltim {|/~x&|'x:!x}
 
7:01 AM
we just got odometer'd
 
ngn
@Traws ^^
@Razetime bubbler's uses odometer too
@Jonah which book (if not secret)?
 
i see, very similar
 
7:25 AM
@ngn Nice, trainified gives 11
 
ngn
@Bubbler how?
 
ngn
@Bubbler ah, nice :)
 
 
1 hour later…
8:28 AM
 
ngn
@chrispsn a non-free book, hm.. :/
".. Rather than an all-encompassing “bible”-type reference, this book is .." - lmao :D
 
 
4 hours later…
12:24 PM
nice!
also, thanks for the tips on "trainification" @Bubbler
 
 
1 hour later…
1:38 PM
the o "operator" was a k5/k6 thing. ngn/k targets the same dialect, which is why it is largely the same. in q/k4 it's .z.s (as coltim noted), and in k2/k3 it's _f. As usual, k4 is the ugliest-looking of the bunch.
 
@ktye something like that. With static parsing, the only benefit of thunks is cross-function optimization. Which I don't think is worth it at all
 
@JohnE, so the q you can download from kx.com is two versions old?
@ngn, The book chrispsn posted is the one it was from.
Also, what's the relationship between kx.com and shakti, and shakti and oK/ngnk?
 
1:59 PM
@Jonah ironically, if you downloaded the 32-bit version, you wouldn't be too far off (I believe it's 3.6 versus the latest 4.0). but q/k4 is its own thing. k5 and k6 were never publicly released. k7 and k9 (k8 was skipped) are from shakti and have had trial/evaluation versions available
 
Is there any reason I shouldn't just be using the shakti one?
 
all the k's are different variations on a theme I guess. what symbols do gets swapped around, some have larger ecosystems than others, some are tied to trial licenses/EULAs
 
The only download options I see on shakti.com are li2.0 and mi2.0 -- what do they correspond to?
 
k7 and k9 have had a lot of flux and are still in active development
@Jonah I believe li is the linux version and mi the mac version (no windows support at the moment)
 
Thanks. It doesn't seem to have any instructions and is a 143K file. Is it just an executable that I run stand alone?
 
2:07 PM
personally I've been using ngn/k as it's open source, has a nice/totally usable web/WASM version, @ngn is active here, etc etc
@Jonah I think so. there were some community maintained docs on k9
 
yep
 
How is the binary so small?
Arthur's godliness?
 
@ngn is more of an expert on this but it involves not using any libraries (including the standard library), stripping the binaries, etc etc
 
Very cool. It's a golfed production language.
 
2:14 PM
in general, C compilers are still quite high level and add a lot of overhead to binaries
was an interesting descent into madness about making as small a binary as possible
 
2:53 PM
I believe k7 is in the same situation as k6, that is, both briefly existed but were later destroyed by arthur to work on the next version
there is still the unofficial wasm interpreter (https://kparc.io/kc/) from kelas but the official binaries from conda are gone
 
ngn
that was k5's fate too
 
is k9 almost certainly going to be the 'final' version?
lol, if arthur made k10 he could call try and call it kx...
 
ngn
@rak1507 i don't know k what number it's called informally but there's a shakti 2.0 :)
(probably still k9?)
 
yeah probably
I wonder why k8 was skipped
 
@rak1507 I think it was overlap with Kubernetes
 
3:05 PM
oh
 
the official name is shakti but I guess people still want to call it k-something
 
it's all a bit confusing
 
3:38 PM
I can see some parallels to the APL space around when APL2 was initially released (if my understanding is correct there were multiple providers of various dialects with minor inconsistencies between them)
 
 
3 hours later…
6:13 PM
I still think k6 was the best iteration of the language and k7/k9 have contained some very questionable deviations
and I'm very glad ngn/k builds on the k6 design
 
6:47 PM
@JohnE like what? unicode in k7 is a mistake (imo) but k9 doesn't seem too strange, not really tried it all that much
 
 
4 hours later…
10:46 PM
@rak1507 from earlier discussions maybe a bit of this with regards to having more f#x/f_x/f^x "overloads", a dash of moving away from higher dimensional data (I#x no longer being reshape, but instead intersection)
 
yeah, that's a good point
 
I'm in the same boat as you though re: it not seeming too strange but also not having tried it too much
oh I think exprs are another divergence from the earlier k's, along with the dict/table literal syntax
 
 
1 hour later…
11:57 PM
lack of nulls seems to be one of the biggest changes.. 1 2@10 returns 0 for example
from the golfing perspective some other changes makes me prefer k6 too, like the bulkier do/while notation, "a"+0 being an error, split only working on single char, no identity matrix, monadic %, etc.
 

« first day (880 days earlier)      last day (655 days later) »