I am not quite sure what you mean by "when an adverb is applied to an adverb"
But the parsing rule is the line that reads EDGE CAVN CAVN ANY 6 Bident at http://www.jsoftware.com/help/dictionary/dicte.htm And the significance of that line, for the case where we combine adverbs, is mentioned in the dictionary at http://www.jsoftware.com/help/dictionary/dictf.htm in the paragraph that begins "Finally, a train of two adverbs produces an adverb ..." But the issue, with this example is that one of the supposed adverbs is not actually an adverb, but a phrase which (if executed in isolation) would produce an adverb. But the adverb (- (1 : '`u')) is not being used in isolation in this example: + - (1 : '`u') (`:6) Similarly, the adverb (0 (1 : '/')) is not being used in your example. And *that* is what leads to the syntax error. What's "confusing" here is that there are five potential adverbs to think about in your example, and you do not actually say which adverb is which when you switch from 0 (1 : '/') \ to (X a0) a1 or X (a0 a1). In other words, here's five adverbs: a0=: 0 (1 : '/') a1=: \ a2=: 1 : '/' a3=: a0 a1 a4=: a2 a1 The confusing thing, if I understand your thinking properly, is that you expect 0 a4 to be reparsed as a3. But, instead, 0 a4 gives you a syntax error. Meanwhile... error messages can help you find mistakes in your coding. So, there's that. Thanks, -- Raul On Tue, Mar 15, 2016 at 2:03 PM, Thomas Costigliola <[email protected]> wrote: > X (a0 a1) is fully parsed once the application of the adverb train to X > happens, so no further parsing is done and the parsing rules will not help > us resolve what to do next. I don't think the language specifies what > happens when an adverb is applied to an adverb, or even acknowledges that it > can happen in the first place (is it in the dictionary?) Previous versions > of J did not signal a syntax error. I suspect many people "grew up" on "X > (a0 a1)" is "(X a0) a1" and is now part of their vocabulary, as this > evidence might suggest: > > http://www.jsoftware.com/help/learning/15.htm > > "15.3 Compositions of Adverbs > If A and B are adverbs, then the bident (A B) denotes an adverb which > applies A and then B. The scheme is: > > x (A B) means (x A) B > " > So what should the application of an adverb to an adverb be? I don't think > it is unreasonable to think it should be the train of adverbs as opposed to > a syntax error. Otherwise the description of x (A B) becomes more complex > and thou hast multiplied unnecessarily. > > > > On 03/15/2016 01:17 PM, Raul Miller wrote: >> >> This gets into the guts of >> http://www.jsoftware.com/help/dictionary/dicte.htm and the distinction >> between a train and direct use. >> >> Basically, though, these two expressions are different: >> X (a0 a1) >> (X a0) a1 >> >> The first forms a train, (which, hypothetically speaking could be >> associated with some name for later use). The second skips that step >> and jumps straight into execution. >> >> And, syntax is what distinguishes these two cases. >> >> Meanwhile, when you mix in phrases which form adverbs (such as your 1 >> : '/') example, here, syntax does not go away - and if you throw in >> half formed ideas with mechanical systems with well defined behaviors, >> things are going to go awry when those ideas and those systems >> conflict. >> >> This seems somewhat apropos (from keiapl.org/anec/): >> >> "[D]esign really should be concerned largely, not so much with >> collecting a lot of ideas, but with shaping them with a view of >> economy and balance. I think a good designer should make more use of >> Occam’s razor than of the dustbag of a vacuum cleaner, and I thought >> this was important enough that it would be worthwhile looking for some >> striking examples of sorts of overelaborate design. I was surprised >> that I didn’t find it all that easy, except perhaps for the [designs] >> of programming languages and American automobiles. I think that >> designers seem to have this feeling, a gut feeling of a need for >> parsimony." >> >> I suppose, all successful ideas go through the "half formed" stage - >> and maybe it's mostly the good ones which survive their failure modes? >> >> Thanks, >> > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
