« first day (572 days earlier)      last day (2087 days later) » 

12:06 PM
@ngn Thanks @ngn! (Just got messaging access.)
 
@chrispsn Oh, I'm sorry. SE reported you at 23, so I didn't ask if you wanted access. Anyway, welcome to the Orchard!
 
@Adám Cheers - it's good to speak to others interested in the same area.
 
12:22 PM
@chrispsn Would you be interested in an apprenticeship at Kx Systems, learning kdb+ while assisting in publishing the Vector journal online?
 
12:56 PM
@Adám It would be an interesting opportunity for sure - I have a full-time job and a few external commitments that would probably clash though. But it's been cool to read the Vector archive and the material at JSoftware.com/papers - so much history!
 
1:18 PM
Hey @ngn, do you know of/have any good resources to learn the basics of K? I wanna start learning other array oriented languages
 
1:31 PM
@J.Sallé Nope. K syntax is officially deprecated :-(
 
ngn
@J.Sallé most resources are about q, which is an uglier version of k with English words instead of monadic verbs - if you intend to make money from kdb, q is probably the language you want to learn
as for k, the first article I read about it was this
oK has verbose docs - they might be of help
 
@ngn I'll look those up, then. Being deprecated is not an issue for me, btw, I just want to learn something new. Thanks!
 
@J.Sallé See also the Kona wiki.
 
ngn
1:50 PM
for q: the mortals book and some amusing, easy to digest videos
 
Nice, guys! Thanks for the help. I'll try to translate some APL into Q to see what happens
 
@J.Sallé How about you? Since you can't do the internship for Dyalog, but want more real-life APL exposure, how does the above-mentioned apprenticeship sound?
 
@Adám you've already given me Mr. Taylor's e-mail address. I've sent him a message and he answered asking for a video interview, to which I agreed. I'm waiting on his answer now so we can schedule it :)
 
@J.Sallé Oh, I'm so forgetful. Sorry about that. ¯\_(⍨)_/¯
 
Hahahah no problem :D I'm excited about that
 
 
2 hours later…
4:01 PM
@ngn I'm trying to make a primality checker using oK, but it's not working properly. Current code is: isprime:{(x>1)&/x!'2_!1+_%x}. As I understand it, it's x>1 and reduce (x mod each of (drop first 2 elements of) [0..1+(floor(sqrt x))]). Do you see any problems?
 
ngn
@J.Sallé which implementation of k?
 
@ngn REPL says Welcome to oK v0.1 (inspired by K5)
 
ngn
@J.Sallé you should swap the arguments of !
x!y means y modulo x, like apl's ⍺|⍵
 
@ngn aaaah, I see
Thanks!
 
ngn
@J.Sallé my pleasure
 
 
3 hours later…
6:59 PM
@ngn I'm trying to solve this challenge in K. Current code is f:{(x=.|$x)&(x>1)&/(2_!1+_%x)!\:x}{x+1}/, but it returns the answer +1 (because of the while loop, I assume). How can I return the correct answer?
↑ e.g f 100 should return 101, but returns 102
 
ngn
7:54 PM
@J.Sallé shouldn't the first function return the negation of that?
@J.Sallé some improvements: {x+1} -> (1+); !\: -> !'; 2_!1+%x -> 2_!x
 
@ngn I’m not sure? I’ll take a look at it when I get home in an hour or so. Thanks for all the help though :D
 
ngn
8:27 PM
@J.Sallé I think you can remove the (x>1). Some of the other answers rely on x being positive.
and for x=1 your code (with a negated first function and without x>1) returns correctly 2
 
ngn
8:49 PM
And here's an even shorter and very wasteful solution in ngn/k: {x+(~x=.|$x)|/x=*/!2#x}/ Theoretically it works in oK too, but is too slow for n>12.
hm... 5s on tio (for a single input), so maybe not too slow
 

« first day (572 days earlier)      last day (2087 days later) »