kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

Deal rejects number ? number random array generation #510

Closed spreadLink closed 6 years ago

spreadLink commented 6 years ago

For example, "2?10" should generate a random binary array, but instead throws a domain error. I'm working with the latest head as of posting of this issue. It does seem to do something if the left argument is an array tho, but i'm not sure what. image

spreadLink commented 6 years ago

After reading the mailing list i found a note explaining that some features have been removed. ?, however, is still explained in terms of "draw" in the wiki, despite someone saying they adjusted the documentation. Is it supposed to be included back/does it continue to be referenced in the tutorial for other reasons?

tavmem commented 6 years ago

Hi -- We are attempting to make kona more compatible with k3.

The hope is that any script that runs in kona would run and give the same results in k3 (and vice versa). The phrase " 10 ? 2 " that used to work in kona is a duplication of the phrase " 10 _draw 2 " that works in k3 (and also works in kona).

I did fix the "tutorial" in section 2 (Vector generation). I missed the other occurrences, but will fix them. Thanks for bringing them to my attention.

Better than the tutorial, the k2.0 user and reference manuals are available via link from the wiki.

spreadLink commented 6 years ago

alright thank you, i'll look into the reference manuals then.

tavmem commented 6 years ago

Great! As you find discrepancies in kona, please open additional issues.