x: 3 4 5 6 7 8 9 10
y: 100 200 300 400
?[x;3;y] / replace what's in position 3 by y
3 4 5 100 200 300 400 6 7 8 9 10K7 Tutorial
21–30 of 44 posts
Re: K7 Tutorial
#22This a typo? x: 3 4 5 6 7 8 9 10 y: 100 200 300 400 ?[x;3;y] / replace what's in position 3 by y 3 4 5 100 200 300 400 6 7 8 9 10
Re: K7 Tutorial
#23This a typo? x: 3 4 5 6 7 8 9 10 y: 100 200 300 400 ?[x;3;y] / replace what's in position 3 by y 3 4 5 100 200 300 400 6 7 8 9 10
Looks like the comment is zero-indexed as well. I wouldn't consider that a typo.
3 4 5 100 200 300 400 7 8 9 10
Otherwise that is not replacing, that is inserting.Weird, I tried it on http://johnearnest.github.io/ok/index.html and that agrees with the doc.. kinda confusing. Seems like it should be
?[x;3;y] / insert y at position 3
?[x;3 4;y] / replace what's in position 3 by yRe: K7 Tutorial
#24Earlier quoted context omitted.
Looks like the comment is zero-indexed as well. I wouldn't consider that a typo.
Pretty sure the output should be 3 4 5 100 200 300 400 7 8 9 10 Otherwise that is not replacing, that is inserting. Weird, I tried it on http://johnearnest.github.io/ok/index.html and that agrees with the doc.. kinda confusing. Seems like it should be ?[x;3;y] / insert y at position 3 ?[x;3 4;y] / replace what's in position 3 by y
Re: K7 Tutorial
#25Earlier quoted context omitted.
Pretty sure the output should be 3 4 5 100 200 300 400 7 8 9 10 Otherwise that is not replacing, that is inserting. Weird, I tried it on http://johnearnest.github.io/ok/index.html and that agrees with the doc.. kinda confusing. Seems like it should be ?[x;3;y] / insert y at position 3 ?[x;3 4;y] / replace what's in position 3 by y
I see. In that case, the output is right and the comment is misleading.
Re: K7 Tutorial
#26Re: K7 Tutorial
#27"Customer shall not, directly or indirectly, and shall not authorize any third party to: (i) decompile, disassemble, reverse engineer, or otherwise attempt to derive the source code of, reconstruct, or discover any hidden or underlying elements of the Software" Looks like I don't want to spend the effort learning it.
Just in case you want to look at the sources of something similar, here is a good one: https://github.com/JohnEarnest/ok
Re: K7 Tutorial
#28Re: K7 Tutorial
#29Does anyone understand if this is fully compatible with Kdb+? been learning q & it would be nice to add vanilla K7 to the list
Re: K7 Tutorial
#30What's the benefit using k vs. c, cpp or java for the same? Does it run or compile faster? The article says you can do the same with cpp and some extra libraries, but I wouldn't immediately think cpp or java was easily beatable -- manjana wonders --