Closed refi64 closed 4 years ago
I've actually obtained a copy of k6, and I think oK will be moving toward compatibility (within reason, as always) with that dialect. I'm currently studying k6 and making a list of things that will need to be tweaked- overall it doesn't look like there are too many nasty breaking changes. When I'm done experimenting I'll put together a checklist for the transition.
Wait, is there k6 now? I thought it was still called k5?
Man, this thing moves fast. :O
Apparently Arthur decided he needed to rewrite k5 completely about a year ago to rearchitect some things. The result was naturally k6. From his description it seems k5 is now frozen and k6 is the one under active development.
For reference, the growing list of known changes is here: https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Fromk5Tok6.md
@JohnEarnest The new bin
seems like an indexing operation. Look at the last example:
0 2 4 6 8 10'-10 0 4 5 6 20
0N 0 8 10 0N 0N
That's the same result as 0 2 4 6 8 10[-10 0 4 5 6 20]
.
Ah, good catch!
@JohnEarnest The section on each-pair changing is wrong; I think it just now also special-cases ','. Watch:
ryan@DevPC-LX:~/stuff/ok$ rlwrap k6
2016.04.20 (c) arthur whitney
,':3 3 2 1 2 2
(,3;3 3;2 3;1 2;2 1;2 2)
{x,y}':3 3 2 1 2 2
(3 0N;3 3;2 3;1 2;2 1;2 2)
{x=y}':3 3 2 1 2 2
0 1 0 0 0 1
ryan@DevPC-LX:~/stuff/ok$
I think the additions here that I intend to support in oK work correctly-
in
/prm
/exp
/log
/sin
/cos
. bin
/within
are a bit unclear and probably relate to queries/tables somehow.cmb
I will do eventually; it's in my notes.ss
, if it works anything like traditional K, is string-search, which is rather complex. At 1010Data I actually implemented a version of K3's _sm
in C, so I think I have a good grasp of how this could work. Gonna punt on that for now as well.Closing this issue.
Newer versions of K5 seem to have some new additions:
There seem to be some other new additions, according to k.txt:
but I'm not sure how the details work, especially about
within
vsin
:"xabcy" in "abcd"
seems to just check if each character in the left is in the right. I guess"xabcy" within "abcd"
checks for substrings somehow?