« first day (831 days earlier)      last day (704 days later) » 

1:53 AM
@Bubbler I'm skeptical too, but there may some literature out there in the column-oriented database world
 
 
2 hours later…
3:24 AM
When I run this, it works fine: p: 100#0; p[0]: 1; p[1]: 1; n: *&~p; p[n]: 2; p: p | 100#~!n

However, when I try to bundle the last three statements as a function with a single argument x and use [converge over](https://estradajke.github.io/k9-simples/k9/Adverb.html#cover) on it, it fails with `!class`. The code is: p: 100#0; p[0]: 1; p[1]: 1; {n: *&~x; x[n]: 2; x: x | 100#~!n}/:p
Maybe somehow the function is not returning the right type.
 
Oh, so it's K9
 
4:05 AM
Yes, I should have specified.
 
 
3 hours later…
6:35 AM
do you intend to implement that? as little as i can read your code, you are using a lenth n buffer as well: A y=gI(til(ai(xn)))
what is x(y(z)))?
2 more questions about mergesort:
- is it worth using a non-recursive algorithm (speed-wise)? the usual stack depth shouldn't be that deep
- using an initial pass to detect sorted-ranges, and maybe min-max spans. this would detect already sorted input, would require some additional complexity to handle ranges, and min-max spans could use histogram sorting for ints and symbols if there are <256 unique values
 
 
4 hours later…
10:26 AM
@ktye non-recursive - it's probably somewhat beneficial for the last couple levels, but you probably want to just use some other algorithm for that anyway; you could also use counting/bucket sort if max-min isn't too much bigger than the length of the array - Marshall's notes
 
 
2 hours later…
12:12 PM
@dzaima thanks for the link. marshall takes excellent notes
 
 
3 hours later…
3:12 PM
are there any emacs packages for K?
 
dang these are old
 
 
4 hours later…
ngn
7:22 PM
@ktye yes, it's a length n buffer now. the trick i was talking about is described here. i'd like to try a few things and pick something balanced for simplicity vs performance.
@ktye x(y) frees x and evaluates to y (one of my crazy macros)
@ktye non-recursive - probably worth trying
 
 
3 hours later…
10:12 PM
is x@\:y equivalent to x[;y]?
hmm I guess only if x is a list
 

« first day (831 days earlier)      last day (704 days later) »