Skip to content

Conversation

@cratelyn
Copy link
Owner

@cratelyn cratelyn commented Nov 6, 2023

this fixes a small bug for the i. operator, which was generating sequences 1..n, rather than 0..n-1.

comparing with the official J runtime for reference:

; jconsole
   i. 0

   i. 5
0 1 2 3 4

   i. 5 5
 0  1  2  3  4
 5  6  7  8  9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24

; cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/j`
  i. 0

  i. 5
0 1 2 3 4

  i. 5 5
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24

this fixes a small bug for the `i.` operator, which was generating
sequences `1..n`, rather than `0..n-1`.

comparing with the official J runtime for reference:

```
; jconsole
   i. 0

   i. 5
0 1 2 3 4

   i. 5 5
 0  1  2  3  4
 5  6  7  8  9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24

; cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/j`
  i. 0

  i. 5
0 1 2 3 4

  i. 5 5
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
```
@cratelyn cratelyn self-assigned this Nov 6, 2023
@cratelyn cratelyn merged commit 77da06c into main Nov 6, 2023
@cratelyn cratelyn added the example-pulls example pull requests referenced in README.md label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

example-pulls example pull requests referenced in README.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants