Re: [Jprogramming] Insert verb

2021-01-20 Thread Arnab Chakraborty
Now I have 902 in phone. Thanks On Wed, 20 Jan 2021, 19:16 Arnab Chakraborty, wrote: > Oops. I have j901 in my phone. When I tap Tools > Check new version, it > says 'already up to date'. I did not check the website directly. Should > have. > > Thanks for pointing out! > > On Wed, 20 Jan 2021, 1

Re: [Jprogramming] Insert verb

2021-01-20 Thread Arnab Chakraborty
Oops. I have j901 in my phone. When I tap Tools > Check new version, it says 'already up to date'. I did not check the website directly. Should have. Thanks for pointing out! On Wed, 20 Jan 2021, 17:52 Ric Sherlock, wrote: > What makes you think that? > As far as I can see it appears to be corr

Re: [Jprogramming] Insert verb

2021-01-20 Thread Ric Sherlock
What makes you think that? As far as I can see it appears to be correctly linked from the website and I have it installed. On Thu, 21 Jan 2021, 00:54 Arnab Chakraborty, wrote: > Aha, nice feature. However, J902 is still not available for Android. > > On Wed, 20 Jan 2021, 17:14 Ric Sherlock, wro

Re: [Jprogramming] Insert verb

2021-01-20 Thread Arnab Chakraborty
Aha, nice feature. However, J902 is still not available for Android. On Wed, 20 Jan 2021, 17:14 Ric Sherlock, wrote: > {{ }} digraphs were introduced in j902 > https://code.jsoftware.com/wiki/System/ReleaseNotes/J902 > See > https://code.jsoftware.com/wiki/Vocabulary/DirectDefinition > > On Wed,

Re: [Jprogramming] Insert verb

2021-01-20 Thread Ric Sherlock
{{ }} digraphs were introduced in j902 https://code.jsoftware.com/wiki/System/ReleaseNotes/J902 See https://code.jsoftware.com/wiki/Vocabulary/DirectDefinition On Wed, 20 Jan 2021, 22:32 Arnab Chakraborty, wrote: > I could not find any doc on {{ and }} as Raul has used. Any pointer? > > On Tue,

Re: [Jprogramming] Insert verb

2021-01-20 Thread Arnab Chakraborty
I could not find any doc on {{ and }} as Raul has used. Any pointer? On Tue, 19 Jan 2021, 22:26 Raul Miller, wrote: > insertbefore=:{{ > 'a b'=. y > (x{.b),a,x}.b > }} > > insertafter=: {{ (x+1) insertbefore y }} > > 2 insertafter "1 [ 10;"1 n > 0 1 2 10 3 4 > 5 6 7 10 8 9 > > FYI, > > -

Re: [Jprogramming] Insert verb

2021-01-19 Thread Devon McCormick
I wrote these to time insertion speed. The first one is scalar, second one performs multiple inserts at once. insertToVec=: 4 : 0 'idx vec'=. y assert. 1=#idx assert. 1=#x assert. (idx>:_1)*.(idx<:#vec) NB. Insert new item: _1->at end, 0->before start biv=. (0) idx}1$~(#vec)+#idx

Re: [Jprogramming] Insert verb

2021-01-19 Thread Raul Miller
insertbefore=:{{ 'a b'=. y (x{.b),a,x}.b }} insertafter=: {{ (x+1) insertbefore y }} 2 insertafter "1 [ 10;"1 n 0 1 2 10 3 4 5 6 7 10 8 9 FYI, -- Raul On Tue, Jan 19, 2021 at 11:51 AM Skip Cave wrote: > > How does one design a verb that inserts specific elements into a vector or > ma

[Jprogramming] Insert verb

2021-01-19 Thread Skip Cave
How does one design a verb that inserts specific elements into a vector or matrix? For example, an "insertafter" verb would take one left argument, which is the index of the array that the element is to be inserted after. The right argument would be two boxed nouns. The first boxed noun is the set