« first day (406 days earlier)      last day (1129 days later) » 

7:19 AM
@ngn excellent, ty
and @dzaima! come to the dark side
unlike the other solns here @dzaima's doesn't have any grading or gt/lt gist.github.com/chrispsn/…
now: improve the where solns
 
 
4 hours later…
11:36 AM
@chrispsn i like my unicode characters too much to properly use k. i do try to follow along with things though
 
12:25 PM
Here's another where solution. Avoids take but assumes cat count and iota. w:{,/{{y}[;x]'!y}'[!#x;x]}
 
12:50 PM
@richie thanks! interestingly segfaults k9 when given w 2 0
 
1:02 PM
aha, this segfaults 2020.04.14 - have reported. 0 0,()
 
 
1 hour later…
2:03 PM
avoid the prefix in @dzaima's solution with (0 1#0){,/'@[;y,!y]\:x,,(#*x)#y}/:!
 
ngn
2:26 PM
@StevanApter ah, so i was wrong. there is a way to give an initial value.
 
ngn
2:40 PM
@user91994 hi! if you want to be able to chat here, please drop me a line at ".@acgiklmnov"@9 5 3 6 0 9 5 3 6 10 7 10 11 1 4 8 2 5 7 0 3 10 8 (evaluated as k code) and i'll ask the moderators to grant you write access - it may take a while, usually a couple of hours.
 
 
4 hours later…
6:51 PM
1010data is looking for someone (or a pair of someones) for the k gui team: js and k, and some experience or at least interest in gui design and implementation. let me know if you're interested ...
 
 
1 hour later…
7:52 PM
on composing adverbs with . and wanting to have more than 8 arguments to a lambda. here's a real example in k3:


:
({branch[a;d;p;y]. x}/).((q;r;s;t;u;v;w);b)}

branch:{[a;d;p;b;q;r;s;t;u;v;w]
:

b is a vector, q-w are vectors describing the state, and a, d, and p are parameters.

sure, we could make q-w rows of a matrix and use deconstructive assignment on the receiving end, or possibly better, elements of a dictionary, but since we will reference them one at a time it makes for shorter clearer code to break them out as individuals.
 
 
1 hour later…
9:19 PM
out of curiosity, do the 1010data product(s?) expose K to the end-user ?
 
 
1 hour later…
10:27 PM
@juanez you can use K from the query language in several ways but it's a mostly-undocumented power-user feature
the same mechanism also lets you embed R in queries, and in the near future they'll have support for Python as well.
 

« first day (406 days earlier)      last day (1129 days later) »