Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with a[,1]:,1 ? #96

Open
tangentstorm opened this issue Oct 4, 2021 · 2 comments
Open

bug with a[,1]:,1 ? #96

tangentstorm opened this issue Oct 4, 2021 · 2 comments
Labels

Comments

@tangentstorm
Copy link

in ngn:

  a:!10; a[,2]:,50; a
0 1 50 3 4 5 6 7 8 9

in oK:

   a:!10; a[,2]:,50; a
(0
 1
 ,50
 3
 4
 5
 6
 7
 8
 9)
@JohnEarnest
Copy link
Owner

ngn/k's behavior is also consistent with k3.

@JohnEarnest JohnEarnest added the bug label Oct 4, 2021
tangentstorm added a commit to tangentstorm/ok-defender that referenced this issue Oct 4, 2021
Had to work around this bug in oK interpreter:
JohnEarnest/ok#96

basically, (a[,i]:,x) was being treated like a[i]:,x for scalars (i,x),
so i had to take the head of the index list when it contained only one
item. this meant that `sgn'` no longer worked, so i had to rewrite
sgn to work with both vectors and scalars.
@razetime
Copy link
Contributor

is this being worked on? I'd like to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants