Note also that if V is a verb which selects indices, X is new values and Y is an array to merge, then:
X V} Y is equivalent to X [`V`]} Y or to X [`(V)`]} Y It's not as concise, though. And, hypothetically, we might like to have: merge=:2 :0 : G=. X V Y X G} Y ) instead (in other words, it might be nice if X V} Y would have V compute a gerund to be consumed by the } conjunction). That said, since a gerund is never indices, I imagine that if we had a use for this form, we could achieve that without having to sacrifice the current behavior... Thanks, -- Raul On Tue, Jul 2, 2019 at 10:27 AM Henry Rich <henryhr...@gmail.com> wrote: > > The verb form u} is still supported. It doesn't fit in well with the > rest of u} as currently defined, which is why I deprecated it. I think > if Ken designed the language anew he might define u} differently. > > (x u y) calculates a set of atom numbers (each a single number giving > the position of a modificand atom in ,y). Atoms of x are stored at > those numbers. Calculating the atom numbers is expensive for arrays of > rank>1, and modifying a cell larger than an atom requires addressing > each atom individually. m} is faster and easier. > > Henry Rich > > > On 7/1/2019 11:41 PM, Daniel Eklund wrote: > > I have been working my way through the "Learning J" online book > > https://www.jsoftware.com/help/learning/contents.htm > > with a recency of 2015. > > > > In the 6th chapter (https://www.jsoftware.com/help/learning/06.htm) there > > is a sub-section dedicated to using bare verbs (not gerunds) as the bound > > left conjunct to Amend (with explanations of linear-indices). > > > > Later, in the 14th chapter (14.3.5 Gerund as Argument to Amend) gerunds are > > introduced as viable tied-nouns to be the bound left conjunct to Amend. > > > > Additionally, the NuVoc for Amend has (all the way at the bottom) a warning > > as follows: > > > > "An obsolete form of Amend: (x u} y) was used in early versions of J. > > where operand u is a verb. Its use is deprecated in favor of x m} y." > > > > Is it true to say that this warning refers to the same verbs as discussed > > in Chapter 6? > > > > thanks > > Daniel Eklund > > > > PS. It took me a bunch of searching through nabble to find the gerund > > usage of Amend as a means (preferable, in my opinion) to dynamically > > generate indices and replacement values in a nice calculable way ( > > http://jsoftware.2058.n7.nabble.com/Tacit-definition-using-Amend-td4950.html#a4951). > > which led me to search ahead to Chapter 14 to discover the gerund form. > > > > I say this in the context of me being a complete newbie and struggling to > > use Amend with calculated indices in various programming exercises. I hope > > not to sound critical. > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > --- > This email has been checked for viruses by AVG. > https://www.avg.com > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm