Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

Well, you could've formatted columns together to form keys with a natural lexicographic comparison, but that's horrible.

I made a tweak to the behavior of "orderby" which borrows from how the "grade" operators work in K: lists are now given a lexicographic comparison, so tupling will now work. The "join" operator will zip together columns for this purpose. As a contrived example:

    e:insert c:""split"ABBBABABABABAAABA" n:(7,7,2,4,4,0,3,4,2,0,9,7,4,6,8,2,3) into 0 
    select c n orderby (c join n) asc from e
+-----+---+
| c   | n |
+-----+---+
| "A" | 2 |
| "A" | 3 |
| "A" | 3 |
| "A" | 4 |
| "A" | 4 |
| "A" | 6 |
| "A" | 7 |
| "A" | 8 |
| "A" | 9 |
| "B" | 0 |
| "B" | 0 |
| "B" | 2 |
| "B" | 2 |
| "B" | 4 |
| "B" | 4 |
| "B" | 7 |
| "B" | 7 |
+-----+---+