Re: [Jprogramming] Rank difficulties

2023-09-07 Thread Jan-Pieter Jacobs
I think it would need specifying rank 0 and using /. m=: i. 5 4 3 0 2 {"0 2/ m NB. slices 0 2 at rank 2 0 1 2 12 13 14 24 25 26 36 37 38 48 49 50 6 7 8 18 19 20 30 31 32 42 43 44 54 55 56 slice =: {{ {"(0,m)/ }} NB. the same $0 2(3 slice) m 2 5 3 This way, the number of slices i

Re: [Jprogramming] Rank difficulties

2023-09-07 Thread Raul Miller
I believe Henry meant to say: ~.@(, i.@#@$) |: ] For example: $1 2 (~.@(, i.@#@$) |: ]) i. 2 3 5 7 11 3 5 2 7 11 Though, I imagine the typical case identifies only a single dimension in the left argument and a lower dimensional array in the right argument. For example: $ 1 (~.@(, i.@

Re: [Jprogramming] Rank difficulties

2023-09-07 Thread Jose Mario Quintana
> The order of the last two appear "unnatural". (To my way of thinking at least) > This seems to beg the question what is the natural order when slicing. The answer might depend on the intended usage of the verb that you have in mind. If, for example, you want to preserve the order of the remain

Re: [Jprogramming] Rank difficulties

2023-09-07 Thread Jose Mario Quintana
Oops, I forgot o=. @: On Thu, Sep 7, 2023 at 1:27 PM Jose Mario Quintana < jose.mario.quint...@gmail.com> wrote: > > The order of the last two appear "unnatural". (To my way of thinking at > least) > > This seems to beg the question what is the natural order when slicing. > > The answer might d

Re: [Jprogramming] Rank difficulties

2023-09-07 Thread Piet de Jong
Thanks for all the great suggestions which has helped me a lot. To my mind it does raise a couple of issues or questions. I’ll stick my head out with them, knowing there might be much blowback. But bear with me. Slicing is a pretty intuitive concept so why should it be so intricate and “hard"?

Re: [Jprogramming] Rank difficulties

2023-09-07 Thread 'Skip Cave' via Programming
Re the question: "why is J not as popular as it ought to be" I provide J solutions to various problems on Quora , mainly to improve my J programming skills. I have solved thousands of Quora problems over the last 8 years. Many of my solutions have tens of thousands of views,

Re: [Jprogramming] Rank difficulties

2023-09-07 Thread Ben Gorte
Hi Piet, > Slicing is a pretty intuitive concept so why should it be so intricate and “hard"? > Maybe this is one of the reasons why J is not as popular as it ought to be. In the defence of J we might consider that the intuition of slicing is a bit ambiguous, which is the dangerous sort. The men