jsoftware / jsource

J engine source mirror
Other
657 stars 90 forks source link

Linking error #3

Closed fprijate closed 6 years ago

fprijate commented 7 years ago

Here is a sample

x=:1;2;3 y=:x;x y ┌───────┬─┬─┬─┐ │┌─┬─┬─┐│1 │2 │3 │ ││1 │2│3 ││ │ │ │ │└─┴─┴─┘│ │ │ │ └───────┴─┴─┴─┘ 0 } y ┌───────┐ │┌─┬─┬─┐ │ ││1 │ 2│ 3││ │└─┴─┴─┘│ └───────┘ 1} y ┌─┐ │1 │ └─┘

cdburke commented 7 years ago

Hi Franček

Thanks, but these statements seem to work correctly. What results had you expected?

Chris

On Fri, Jan 27, 2017 at 9:28 AM, Franček Prijatelj <notifications@github.com

wrote:

Here is a sample

x=:1;2;3 y=:x;x y ┌───────┬─┬─┬─┐ │┌─┬─┬─┐│1 │2 │3 │ ││1 │2│3 ││ │ │ │ │└─┴─┴─┘│ │ │ │ └───────┴─┴─┴─┘ 0 } y ┌───────┐ │┌─┬─┬─┐ │ ││1 │ 2│ 3││ │└─┴─┴─┘│ └───────┘ 1} y ┌─┐ │1 │ └─┘

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jsoftware/jsource/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/ABg0gZlz_vh4d6JvU3ePiD8vc3hl4qQ2ks5rWilJgaJpZM4LwA2G .

fprijate commented 7 years ago

Hi Chris

Thanks for the answer. I expected :

x=:1;2;3 y=:x;x

┌───────┌───────┐ │┌─┬─┬─┐│┌─┬─┬─┐ │ ││1 │2│3 ││ │1│2 │3 │ │ │└─┴─┴─┘│└─┴─┴─┘ │ └───────└───────┘

Sorry I didn't check the dictionary x;y is (<x),y if y is boxed, and (<x),<y if y is open.

I assumed that x ; y is equivalent to (<x),(<y) Thanks again and sorry for bothering you.

Franček

cdburke commented 7 years ago

Hi Franček

The dictionary definition of link is:

x;y is (<x),y if y is boxed, and (<x),<y if y is open.

So what you need is:

x=: 1;2;3 x;<x ┌───────┬───────┐ │┌─┬─┬─┐│┌─┬─┬─┐│ ││1│2│3│││1│2│3││ │└─┴─┴─┘│└─┴─┴─┘│ └───────┴───────┘

Most of the time this definition of link works better than simply: (<x),<y

Chris

On Sat, Jan 28, 2017 at 5:33 AM, Franček Prijatelj <notifications@github.com

wrote:

Hi Chris

Thanks for the answer. I expected :

x=:1;2;3 y=:x;x

┌───────┌───────┐ │┌─┬─┬─┐│┌─┬─┬─┐ │ ││1 │2│3 ││ │1│2 │3 │ │ │└─┴─┴─┘│└─┴─┴─┘ │ └───────└───────┘

Franček

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jsoftware/jsource/issues/3#issuecomment-275848376, or mute the thread https://github.com/notifications/unsubscribe-auth/ABg0gZsxl1TbbMyaDRlNVxmf_slCC1xDks5rW0OUgaJpZM4LwA2G .

bilam commented 6 years ago

unrelated to jsource