ok, assuming null bytes aren't ok, I have 25 bytes with this. I guess so long as only the basic expand is considered (only 0's and 1's), it can be implemented as x@<>b
link with all tests (click "see full text" before clicking on the link): https://ngn.bitbucket.io/k/#eJxVUtuK2zAQfc9XDOqbCJSyFEpSSl/7Dcu2yLr5IkfWJdbIIfvtlezNZYXxSGfOzJEOow4XQsnf/Pvnr3zh/3DPD/md4vUrXne7eLgs7+oVj/ntuouv5A8ICycbgdtT9NZAbCWESUoBLEJqO96CsU2I0gcQnSRHwq2ogd4Wt/TTEp+PVG6BvFW9KEPkLBSN6LuTLn0iC/VfKSzcajbyWZs2MT2Bm/MpLqMqxPMGPSN0g+gdW4udHxhHhJRUz6APuRdKMZiT0ljLHFfzGusTVlH1fOt5PW6tFkhL0HZuW+jtlKDTHGE8Yw84jl1AcYIIZmxKN83PPZrm5o9+bllVzrSn+IAMbTaJARX0elxkn6cGMiPHPXl2WX4yRkmwmAfIhSGx0koeH3kLyYMau6GkbPK3HU2ervuVNGm5RMh24dk5EB4jaD6zHloEAx0CyrEbR4uPu0iyf/nxhXyoDI6bARpoBx19W1lVZSD7by93TugYTJ57…
@chrispsn i'm in the middle of refactoring all arithmetic, i don't know how it will end up
btw, is there a term or a short phrase to describe "user sees single int type"? i.e. if an operation on smaller ints overflows, they are automatically converted to larger ints
@ngn arthur does 0. you could have a special type for atom null, and maybe a flag that a vector contains nulls, and a pointer to an index list. Then do the operation on all elements and update the index list as the combination of x and y for dyads.
with the index list, you'll have null propagation just like floating point. you also would not have to test on each element of a vector, which makes it fast.
@ngn i think k has no 0N for ints. they are just plain 0.
@chrispsn I think of it as a hack to work within the constraints of over/scan (that being that you can't return out-of-band information, as that would then get fed into the next iteration). using ~ was intended to reduce the chance for conflicts (where the values you actually want to return overlap with the input) although in practice (particularly here) it doesn't make a difference
@coltim well, right.. there was an implementation in progress, which i never saw, but i had seen k5, which judging by oK's docs must have been very similar. i wanted to make a simple fast vector language which people would use, so my best option was to piggyback on k5-6 syntax to ease adoption. but then shakti happened.
@ktye this may sound vague: i can't point to a single thing, but i think overall the primitives fit together slightly better before the k9 reshuffle
this is a matter of taste. i like some k9 things and dislike others.
but it doesn't matter what i like.. the availability of paying customers decides the fate of a language :|
@ngn if you make ngn/k more approachable (like q) you may find larger adoption
shakti, on grounds of it's k only mode, is unlikely to find mainstream adoption imo, especially with kx having a similar product with established market share...
kdb is 'good enough' and the secret sauce is no longer secret. many firms do not appreciate k as a language (because of the scarcity of developers)...
i dont doubt Arthur will find commercial success.. but i, dont think it'll be close to what he had with kx
ktye: both. i know it's unpopular in k-circles, but most people do prefer "count" over "#" especially since they are all overloaded - so if you're quickly scanning code someone else wrote, in my experience "count" is easier to find/parse than "#"
I guess also in that to a certain degree it's a DSL for setting up e.g. ticker plants or whatnot (I feel that things like partitioned tables are a super convenient fit for e.g. daily security prices)
it's just tough to identify other niches where there's an equivalent opportunity for a more targeted language =|
@ktye so a splayed table has one file per column. with a partitioned table you pick a column, and then it creates a subfolder for each distinct value of that column (each subfolder containing one file for each column). I'm explaining it poorly but kx's docs are probably helpful
the p-attr is also extremely useful for on-disk fast lookups..
i would think that kdb is suitable for quite general purpose applications, it's a great fit for finance, but i could see it easily extend into healthcare and a variety of other areas
i've not seen anything new about 'the platform' .. i was/am a little excited about it, but we shall see
my strategy is to represent symbols as 4byte ints. if the symbol consists of <4 chars, the int is the chars themselves with a '\0' at the end. for longer symbols the int is the negation of an index in a global list of strings.