« first day (130 days earlier)   

7:10 AM
Are xtabs new in k7?
Ktab: (+`a!2 3)!+`b!3 4
Xtab: `a`b!+`c`d!(2 3;4 5)
I assume it should be possible to index Xtab[`a] to receive a table row. An xtab ("indexed table?") extends a table in the same way a dict extends a list: you can give a symolic name instead of an integer index. Both xtab and ktab indexing is not yet implemented as far as i can tell.
 
ngn
7:23 AM
@ktye Xtab works in k4. i don't understand Ktab - where did you read this?
 
8:22 AM
@ngn This is from \h. Xtab works in k4 in the sense that it returns a dict. But it has no special properties. Ktab is the definition of a keyed table that also exists in q. It is refered to the "purists" definition of a keyed table in q4m. There is also other syntax.
 
ngn
8:33 AM
i see. so the a key in Ktab is a dictionary containing only the keyed columns. the value is a dictionary the rest of the columns corresponding to that key.
and `a!2 3 is (,`a)!,2 3
that makes sense. if x@y and x?y support tables, a dictionary implementation doesn't need to do anything special except allow tables for its keys and values
 
8:56 AM
@ngn something like that i guess. I hope to be able to add tables, keyed tables and xtabs with minimal effort. And I think using the same type for dict and tables (in my type system) helps here. If a table behaves like a dict in most areas, there is no need for special casing.
 

« first day (130 days earlier)