i wouldn't expect the something.key notation to work when "something" is not an identifier
@ktye [a:1;b:3]@.a also returns 1 3
maybe .a is something special, similar to the old :: which had two versions - one to represent the identity function, and one to represent missing values in projections
@ngn I didn't look at the code, but lemire claims in the blog post that it is exact, and at least so far whenever I did look at his work, he was very precise and dependable.
@beagle3 in the first paragraph he says: "However, we sacrifice some standard compliance. You see, the floating-point standard that we all rely on (IEEE 754) has some hard-to-implement features like “round to even”. Sacrificing such fine points means that you can be off by one bit when decoding a string."
i'm not sure if it matters for round-tripping. maybe the printer can be made to mirror the parse errors
and in practice it probably doesn't matter at all..
@ngn He is talking about his old json parser in that paragraph. Later it says: I was going to leave it be. Yet Michael Eisel kept insisting that it should be possible to both follow the standard and achieve great speed. Michael gave me an outline. I was unconvinced. And then he gave me a code sample: it changed my mind. The full idea requires a whole blog post to explain
did that just today. cut:I:II{v2;(~xt~2)?!;(xn~1)?(r:y drop I xp;dx x; :r);r:5 mk xn;rp:r+8;xn/(a:I xp;b:I xp+4;(i~xn-1)?b:yn;(b<a)?!;rx y;rp::y atx seq(a;b-a;1);xp+:4;rp+:4);dxyr}
here's an attempt to implement the traditional cut as a k string: {y@x+!'1_-':x,#y}
@chrispsn with your modification, it would be: {y@(0,x)+!'-':x,#y}. maybe they are not all that different after all. but the length mismatch between x and the result bothers me