Re: [Jprogramming] Problem with Append in an Adverb

2012-04-12 Thread Raul Miller
On Thu, Apr 12, 2012 at 5:21 PM, Paul Jackson wrote: > Congratulations on creating a reference to x which is never reached.  While > it does mean my rules for creating a definition which is not used until > execution time shouldn't have warned against x in the monadic definition, > the rest of the

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-12 Thread Paul Jackson
Raul Miller, on rereading your message I see that you described exactly the distinction what I was trying to make. From your following paragraph, I conclude that you call explicit what I called immediate. I think of explicit as describing the use of arguments x or y. I also know these derived fun

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-12 Thread Paul Jackson
Perhaps the problem is I'm using APL's names for things. It is my handicap in talking about J. I've used and developed APL versions for more than forty years. For me, a derived modifier is one that explicitly uses x or y. Your example is what I mean by an immediate adverb. This is probably bes

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-12 Thread Raul Miller
On Thu, Apr 12, 2012 at 1:12 PM, Paul Jackson wrote: > Thanks for the links.  Toc191734495 describes much of what I've seen.  It > also explains how modifiers which ignore x and y arguments preceeded > current derived verbs.  However, based on my tests, the information there > is not sufficient to

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-12 Thread Paul Jackson
Thanks for the links. Toc191734495 describes much of what I've seen. It also explains how modifiers which ignore x and y arguments preceeded current derived verbs. However, based on my tests, the information there is not sufficient to avoid the value error I initially reported. 1) It isn't jus

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-11 Thread Henry Rich
No error; the modifier is ALWAYS evaluated before its x and y operands: see http://www.jsoftware.com/help/jforc/verb-definition_revisited.htm#_Toc191734405 http://www.jsoftware.com/help/jforc/writing_your_own_modifiers.htm#_Toc191734495 Henry Rich On 4/10/2012 11:48 PM, Paul Jackson wrote: > T

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-10 Thread Paul Jackson
Thanks to those who suggested I look at simpler examples. Doing so lead me to determing why we get this unusual result. arg=: 1 : 'u' % arg 4 0.25 I initially thought this was a second problem, but today I realized there is some level of simplicity where adverbs are evaluated when they shouldn'

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-08 Thread bill lam
I guess adverbs have only the left argument, no right argument. Therefore, if there is u or m, then both x and y are legal and denote the argument of the resultant. otherwise (neither u and m present), then x become the left argument, but y cannot. in a clean session, it will raise the same error

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-08 Thread Paul Jackson
Indeed, I called it a bug because of the confused name meanings. I don't believe arguments should change their value based on the sequence in which I use them. Please note, user conjunctions don't appear to suffer from the problem. Args=: 2 : 0 y 1!:3 [2 u y : x 1!:3 [2 y 1!:3 [2 x v y )

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-08 Thread Raul Miller
On Fri, Apr 6, 2012 at 7:53 PM, Paul Jackson wrote: > Arg=: 1 : 0 > y 1!:3 [2 > (5!:5 <'u') 1!:3 [2 > 0 0$'' > ) ... > + Arg 'u' > |value error: y Here's a simpler case: + 1 :'y' |value error y The issue is "what do the names stand for" And, when you have x/y names but no u/v names in the pa

Re: [Jprogramming] Problem with Append in an Adverb

2012-04-06 Thread Marshall Lochbaum
The problem is that the adverb is being evaluated at (+ Arg), rather than waiting for a y argument. It appears that execution only waits if both u and y are present, and 'u' doesn't count because it is a string and not a variable. This looks like a bug to me. A simple fix is to place a trivial ment

[Jprogramming] Problem with Append in an Adverb

2012-04-06 Thread Paul Jackson
I was writing some tools for understanding J syntax and order of evaluation, when I encountered the following bug. While I found it on the Android port, I've confirmed it occurs in both 32 and 64 bit Windows as well. Just about anything done before the append, avoids the problem. Paul Arg=: 1 :