« first day (343 days earlier)      last day (1192 days later) » 

ngn
8:05 AM
@chrispsn i also have 100 project euler solutions and many code golfing ones, if you consider those representative enough
 
@ngn any comments on this? https://chat.stackexchange.com/transcript/message/53485307#53485307
your current UNQ has worst case complexity for sorted input, while it could be much faster than the general case.
 
ngn
@ktye i guess it could work
ideally there would be flags, like in atw's k
 
@ngn with flags it's obvious what to do. this idea is about not having flags but still a good primitive.
 
ngn
8:21 AM
@ktye i'll give it a shot. i hope you're not gonna sue me :)
 
that's no fun. i'd rather patent all primitives then sue kx.
 
ngn
i wish we had sane intellectual property laws (we = jurisdictions where the berne convention applies) and geniuses like atw weren't incentivized to be dicks
 
ngn
8:41 AM
 \t ?{x@<x}100000?0 /before
1822
 \t ?{x@<x}100000?0 /now
5
@ktye ^
this feels rather special-casey though. what if we could use <x (which is very efficient) somehow to implement ?x
 
9:20 AM
that looks like an improvement! in i2 i did grade-up within unq: https://github.com/ktye/i/blob/master/_/i2/k.go#L1408
i also thought about idom detection for ^?x to split the algorithms on k-level. you don't use ^x like k7 i guess. Also a kimplementation with each-prior.. could be used.
 
ngn
9:31 AM
{x@&@[;0;1]x>x@i@-1+<i:<x}
@ktye ^this is ?x as a k-string. faster than my previous impl in the general case :)
 
9:48 AM
definitely looks cool
 
 
1 hour later…
10:50 AM
@ngn definitely! Just wasn't sure how to approach it - maybe concatenation
 
 
1 hour later…
11:51 AM
oh! euler is a single file. sweet
 
12:38 PM
@chrispsn would be interesting to know how many + are addition and how many flip. i'm thinking about using +x for abs (because of complex numbers). doing the analysis based on the parse tree may be more complicated (to distunguish monadic and dyadic), given you have multiple k dialects as input.
 
 
2 hours later…
ngn
2:41 PM
@chrispsn nsl.com has some good k code - "view source", then search for ".k"
i'm sure i've seen k code on github.com too but it's hard to search for :|
@chrispsn for the golfing solutions, you'd probably be interested only in the first 2 lines of each file - the rest are tests
$ head -q -n2 ??*.k
^ ?? is there to ignore 0.k - the only single-char .k file
the first line of each file is a comment with the url of the codegolf problem. you can ignore those by appending | grep -v '^\/'
 
 
2 hours later…
4:42 PM
nsl.com (stevan apter's) can be all found in nsl.com/k - no need to view-source; and curl/wget can mirror it. However, be aware it is a mix of k versions (including a few of Apter's own versions).
 

« first day (343 days earlier)      last day (1192 days later) »