I do see that learning to read verb trains could be helped by working only with primaries for various exercises. It is important to be able to get to seeing the triples and pairs that comprise trains, and drilling on this pattern-recognition could overlap well with the early practice required to identify primaries.
Also, do I see ways in which trains are more simple than modifier phrases. I think this simplicity is significantly *reduced* by the incorporation of Cap, whereas @ can be fruitfully associated with function composition as documented in uncounted texts. Important as trains are in J, they are not natural replacements for conjunctions. If they had been, R. Hui, K.E.I., or others would have noticed that some years ago. I estimate that trains have about the same difficulty to learn as conjunctions in general. They are all higher-order functions, after all. The fact that there are only two of them, fork and hook, keeps it tidy, and hook can be given a junior status as a pedantic technique easily enough. We can expect it to be easier to learn one thing (fork) rather than a dozen things (conjunctions). If the idea is to help people learn fork, that makes sense to me. But at that point what's being studied is but a single aspect of J. So, Beginner's J seems closer, but arguments could be (and have been) made that tacit form should not be emphasized to beginners. (Henry Rich's book applies that decision in depth.) Sentences that result in nouns are used most heavily as J is learned, I'd wager. Explicit form extends that pattern to allow verbs to be defined. But while programming J in that form certain conjunctions show up as important. Not @ or @: but certainly &. and ;. and (especially) " and perhaps } Introducing explicit verb definition involves using : which is a conjunction. Is it important to dwell on : as a conjunction early on? Probably not, but neither do I see anything to be gained by avoiding it because it is a conjunction. To summarize, I am happy to agree that higher-order functions bring us to more challenging areas of J than do nouns and verbs. In learning and teaching we can benefit somewhat from this knowledge. I am not in agreement with the idea that conjunctions are best delayed until after familiarity with trains is thorough. --Tracy On Tue, Nov 29, 2011 at 11:51 AM, Kip Murray <k...@math.uh.edu> wrote: > Let me try. > > The expression 3$&.|.n occurs on the Vocabulary page for Rank u"n . > From the definition of &. we can decipher that > > 3 $&.|. n is |. (|. 3) $ (|. n) that is |. 3 $ |. n > > Isn’t that last easier to understand at a glance? > > Simple J prefers trains with no conjunction other than Rank " . > > Expressed in Simple J the verb applied to n is [: |. 3 $ |. . > > Perhaps a better name would be Beginner's J. Keep the syntax simple, > make ranks explicit when you need to think about them. Eventually you > will need to graduate from Beginner's J. > > > On 11/29/2011 9:35 AM, Tracy Harms wrote: > > Linda, > > > > It does not seem to me that rephrasing to avoid @ (rank-zero composition) > > makes expressions simpler, either in this specific case or in general. > > > > If you'd like to elaborate on why that seems simpler to you, I'd like to > > hear your perspective. > > > > --Tracy > > > > > > On Sat, Nov 26, 2011 at 9:46 AM, Linda Alvord<lindaalv...@verizon.net > >wrote: > > > >> A function that works. It is not simple. Remove the @ > >> > >> Linda > >> > >> -----Original Message----- > >> From: programming-boun...@jsoftware.com > >> [mailto:programming-boun...@jsoftware.com] On Behalf Of EelVex > >> Sent: Saturday, November 26, 2011 9:15 AM > >> To: matxinle...@hotmail.com > >> Cc: Programming forum > >> Subject: Re: [Jprogramming] FW: A simple function > >> > >> On Sat, Nov 26, 2011 at 11:29 AM, m l<matxinle...@hotmail.com> wrote: > >> > >>> > >>> I`m a beginner in J programming. > >>> I need writing a simple function: > >>> > >>> round ( x * sqrt (x*y)) > >>> > >>> Thanks in advance. > >>> > >>> Matxin > >>> > >>> > >> Among the gazillion ways to do this: > >> > >> f =: [:<.0.5+ {. * %:@*/ > >> f 15 30 > >> 318 > >> ------ > >> 1. If you have a list of two numbers: x,y, you multiply them with `*/`: > >> */ 15 30 > >> 450 > >> > >> 2. You then take the square root (`%:`) of (`@`) that: > >> (%: @ */) 15 30 > >> 21.2132 > >> > >> 3. and multiply that by the first term of your list (`{.`) > >> ({. * (%: @ */)) 15 30 > >> 318.198 > >> > >> 4. You then "apply" (`[:`) rounding (`<.0.5+`) to that: > >> ([:<.0.5+ {. * (%:@*/)) 15 30 > >> 318 > >> > >> Note that the construct in step 3 is a train of 3 verbs (see: > >> http://www.jsoftware.com/help/learning/09.htm). > >> (f g h) y == (f y) g (h y) > >> where > >> y = 15 30 > >> f = {. (take first) > >> g = * (multiply) > >> h = %:@*/ (square root of product) > >> > >> Also, you round a number n by taking the floor of (n + 0.5). > >> > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm