[Jgeneral] Comments on J9.04 Reference Page 2

2022-08-26 Thread Arthur Anger
In "Modifier trains", 'N V1 V0' should yield 'N V1 (V0 y)'. [That 'N' could be 'x'.] The absence of y, u, and v from the left column requires substantial study by a new reader, in the absence of a footnote explaining the format. In "Conjunctions", the second column should show 'x' and 'y'

Re: [Jgeneral] i. into the middle of an array.

2022-08-26 Thread Henry Rich
Note that by going to tacit you have repeated the first search. It does make a good advert for virtual blocks. Henry Rich On 8/26/2022 5:27 PM, Devon McCormick wrote: I get these timings on J 9.04: A=. ?1e8#1e3 ts '100 find2 A' 2.4e_6 1536 ts '100 (1{I.@E.) A' 0.19722 8.39853e6

Re: [Jgeneral] i. into the middle of an array.

2022-08-26 Thread Devon McCormick
I get these timings on J 9.04: A=. ?1e8#1e3 ts '100 find2 A' 2.4e_6 1536 ts '100 (1{I.@E.) A' 0.19722 8.39853e6 ts '100 ({.@}.@(I.@E.)) A' 0.200139 8.39866e6 (100 find2 A) -: 100 (1{I.@E.) A 1 find2 ([: >: i.~) + [ i.~ ] }.~ [: >: i.~ On Fri, Aug 26, 2022 at 3:53 PM 'Mike Day'

Re: [Jgeneral] i. into the middle of an array.

2022-08-26 Thread 'Mike Day' via General
Does that include drop, }. ? I suppose it can, since we only need to move the pointer to the start... I’ll check on the laptop, once I’ve done my Listener xwd. (Last week’s was the quarterly numeric puzzle, an ingenious construction including among all the digits a few decimal points and

Re: [Jgeneral] i. into the middle of an array.

2022-08-26 Thread Raul Miller
Updating arrays without generating a new copy was introduce in J805 -- https://code.jsoftware.com/wiki/System/ReleaseNotes/J805 So in J701, that approach would indeed be slower (since it's creating a complete copy of the array). Also, virtual blocks (which speed up the }. approach) were

Re: [Jgeneral] i. into the middle of an array.

2022-08-26 Thread 'Mike Day' via General
These seem simpler and are possibly quicker, at least in J701 on this oldish iPad: 100 (1{I.@E.) A NB. Fails if there’s no (second) 100 in A 719 100 ({.@}.@(I.@E.)) A NB. Returns 0 in that case 719 Easy to correct for such errors, of course. I tried A =. ?100#1000 find2 =: 13 :

[Jgeneral] i. into the middle of an array.

2022-08-26 Thread Raul Miller
i. returns the index of the first occurrence of a value within an array. So, when implementing an algorithm which needs the index of the second occurrence of the value within a (large) array, we need to do some additional work. let's say that our array is A, the value is V F=: A i. V NB.

Re: [Jgeneral] Thought experiment -- pacman

2022-08-26 Thread Raul Miller
On Fri, Aug 26, 2022 at 9:57 AM chris burke wrote: > I agree it makes sense to support more hosting repos. The relevant > pacman code is under https://github.com/jsoftware/base9, in particular > see gitrepo.ijs. > > Perhaps the info in the proposed ~user/config/user-addons.txt would be > better

Re: [Jgeneral] Thought experiment -- pacman

2022-08-26 Thread chris burke
I agree it makes sense to support more hosting repos. The relevant pacman code is under https://github.com/jsoftware/base9, in particular see gitrepo.ijs. Perhaps the info in the proposed ~user/config/user-addons.txt would be better in ~addons/config, either as a new file or extra info in

Re: [Jgeneral] Thought experiment -- pacman

2022-08-26 Thread Raul Miller
On Fri, Aug 26, 2022 at 1:22 AM 'Viktor Grigorov' via General wrote: > There's bitbucket.org, codeberg.org, gitlab.com, sr.ht, gitea.io, among > others. (They don't also arguably illegaly feed your code to their commercial > products.) There can't not exist some way to test whether or not a URI