@Linda I simply keep it in my ~user folder (my own version, that is). It can be loaded automatically by putting the appropriate load statement in ~user/config/startup.ijs . But I don't do that: I load it at need. I have things set up to do that conveniently.
You could of course put its name and location in ~system/extras/config/scripts.ijs (...in j602 : in j701 that becomes ~system/util/scripts.ijs in j701) Then you can load it with: load'tte' (Am I answering the question you intend here?) On Wed, Jul 18, 2012 at 3:34 AM, Linda Alvord <[email protected]> wrote: > Where do you put the file 'tte.ijs' so it will be accessed? > > It is a very impressive script even without all the ideas you have to > augment it. > > Linda > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Ian Clark > Sent: Tuesday, July 17, 2012 12:17 PM > To: [email protected] > Subject: Re: [Jprogramming] [Jgeneral] Un-puzzling expressions > > Thanks, Linda. I often feel I come out with things that everybody knows > about except me. > > I'm delighted you share my enthusiasm for Ambrus's tte (ttem/ttes). > The writeup says it's unfinished, and suggests it may fail on hooks. I use > it with a slight modification to run it in its own locale, which makes it > much more serviceable as a utility to have always on hand. Do this by > putting this code at the beginning of the script: > > coinsert 'tte' > coclass 'tte' > > to insert it into _base_ or whatever local is current. > > May I appeal to some public-spirited soul to finish tte.ijs (insofar as it > needs it) and publish it as an addon? Of all the approaches to explication > I've seen, I think it's the all-round best. That is, for someone who knows a > conventional programming language. > > Ambrus has a TODO list in: > > http://www.jsoftware.com/jwiki/Scripts/TacitToExplicit > > to which I would add: > > ++ a brief prompt on loading, to say how to use it ++ prefix all > assignments in the explication with: ] (which I've said already) ++ add NB. > <helpful info> to each line of output, of the sort Roger Stokes suggests. > > IMHO the lack of usable, well-signposted tools for explication is > *the* turn-off for a J novice. This opinion is amenable to validation and I > call on anyone who has contact with novices to confirm or deny it. Doubtless > the wrath of tacit heaven will descend on me for saying this, but without > more accessible code-reading tools (as Art appeals > for) it's easy to run away with the idea J is only for people who think it's > cool to program in "p-code". > > Ian > > > On Tue, Jul 17, 2012 at 7:15 AM, Linda Alvord <[email protected]> > wrote: >> What a joy to receive your e-mail right after Raul's! >> >> rou=: [: (* * |)&.+. [: ^ 0j2p1 * % * i. >> rou ttem >> 3 : 0 >> z7=. i. y >> p7=. % y >> t8=. p7 * z7 >> s8=. ^ (0j6.2831853071795862) * t8 >> ((* * |)&.+.)s8 >> ) >> roue=: 13 :'((**|)&.+.)^0j2p1 *(%y)*i.y' >> rou 8 >> 1 0.707107j0.707107 0j1 _0.707107j0.707107 _1 _0.707107j_0.707107 0j_1 >> 0.707107j_0.707107 >> roue 8 >> 1 0.707107j0.707107 0j1 _0.707107j0.707107 _1 _0.707107j_0.707107 0j_1 >> 0.707107j_0.707107 >> (rou 8)-:roue 8 >> 1 >> >> I can't imagine how long I might have struggled to get an explicit >> version of the eight "eighth" roots of _1 if you hadn't explained this. >> >> 'ttem tted.ijs' will become a treasured script. Thanks >> >> Linda >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Ian >> Clark >> Sent: Monday, July 16, 2012 6:29 PM >> To: [email protected] >> Subject: Re: [Jprogramming] [Jgeneral] Un-puzzling expressions >> >> [Discussion moved to: programming] >> >> Everyone knows (...don't they?) the use of '13 :' to transform a verb >> from explicit to tacit form, as in: >> >> 13 : '(+/y) % #y' >> +/ % # >> >> Novices quickly yearn for '_13 :' to convert the other way, maybe like > this? >> (don't splutter) ... >> >> _13 : '+/ % #' >> (+/y) % #y >> >> ...only there isn't just one way of doing it. The result might just as >> well >> be: >> >> (+/ % #)y >> >> viz: simply put '(...)y' round the given tacit verb. Or optionally: >> 'x(...)y' . >> >> Then, treating J as an algebra (and knowing the rules) couldn't the >> expression then simply be "multiplied out" to any desired level? (I'm >> being intentionally naive.) >> >> Can I propose the word "explicate" for this generalized process? Is >> "explicate" already in use for something else? Or has >> (tacit-->explicit) already got a perfectly good name? Art uses the >> word "un-puzzling". Roger (Stokes) names his proposed verb: "explain". >> >> There are in fact a lot of pages in the J wiki on the topic of > "explication" >> if I may call it that. Many seem to have been written in ignorance of >> the others. It would be good to have a single page, well-signposted >> for beginners, to pull all these different approaches together. Or >> even just to list them. Coincidentally I'd already started building >> just such a roadmap for my own use. >> >> Meanwhile I heartily endorse Art's observation: >> >>> Newcomers to J should be encouraged very early to use such tools, >>> which supply multiple avenues to understanding concrete examples. >>> Some of my own recent puzzlements might not have occurred if I had >>> had a better grounding in the precise nature of the syntactic features of > J. >> >> and I like his block-diagram expansion of a given tacit verb. A >> formidable extension of (5!:4). >> >> I also like Roger's approach. Excellent for the raw novice. Though as >> the novice becomes less raw s/he might soon yearn for something >> terser. Ideally this would be a collapsed form of the verbose >> explication, but clearly derived from it. Terse/verbose might be > controlled by an optional left arg: >> 0 or 1. Maybe an intermediate level would be called for. >> >> Me, I've had many bites at the "explicate" cherry, but eventually gave >> up in the face of Ambrus's excellent script: tte.ijs, documented at: >> >> http://www.jsoftware.com/jwiki/Scripts/TacitToExplicit >> >> This script defines two words: "ttem" (monadic) and "tted" (dyadic). >> I'd recommend them for close study. I often use "ttem" in practice and >> think it's the handiest and clearest "explicate" of all. >> >> Here's Ambrus's "ttem" in use on a stock example "nub" (m41 -in: Help >>> Phr > 8A. Numbers & Counting). Note the extreme flexibility: it's >> written as an adverb, so it can work on a (tacit) verb, not a (string) >> expression. Nor, for that matter, is it confined to proverbs, unlike >> 5!:4 . >> >> nub=: ((i.@#) = (i.~)) # ] NB. bracketed using 5!:6 to make the >> process clearer... >> >> nub ttem >> 3 : 0 >> ]s0=. y i. y >> ]t0=. (i.@#)y >> ]r0=. t0 = s0 >> ]r0 # y >> ) >> >> The prefixes: ] are my own embellishment. They allow you to assign >> some test data to global: y and then trace the "explication" by >> re-entering each line in turn. >> >> Ian >> >> >> On Mon, Jul 16, 2012 at 3:57 AM, Arthur Anger <[email protected]> wrote: >>> If you have been puzzled by the result--or non-result--from a >>> published or personal expression, you may benefit from automated >>> analyses of parenthesization, syntactic structure, and value production. >>> >>> Newcomers to J should be encouraged very early to use such tools, >>> which supply multiple avenues to understanding concrete examples. >>> Some of my own recent puzzlements might not have occurred if I had >>> had a better grounding in the precise nature of the syntactic >>> features of J. >>> >>> Such tools appear in script trace.ijs and the Foreign conjunction 5!:4. >>> Some >>> additions to those capabilities are now in script aatrace.ijs, linked >>> via http://www.jsoftware.com/jwiki/ArtAnger : >>> >>> --pyr and parenpyr redisplay a quoted expression with each >>> parenthetical subgroup raised one line above its context, forming >>> pyramids of various heights, to improve visual recognition. >>> >>> --flowtree produces a "tree" with a downward "flow" of information > (data). >>> It >>> deviates from simple tree structure when displaying hooks, forks, >>> ties, adverbs, and most conjunctions, to try to clarify those more >>> complex processing paths. When an adverb, rank specifier, or other >>> conjunction controls a verb's input and output, that action is >>> suggested by a modified data flow. A Hook, Fork, Tie, or >>> Bond-repetition is noted explicitly with an H, F, T, or R. >>> >>> --flowtree also stores the same expression with inserted calls to a >>> tracing adverb. Its execution report, of arguments supplied and >>> results produced at those labeled points, can show very clearly how >>> Insert applies a verb successively within a list, and how data are >>> passed through the verb phrases in a Fork train. >>> >>> See the fuller summary at: >>> http://www.jsoftware.com/jwiki/Essays/Un-puzzling >>> expressions >>> --------------------------------------------------------------------- >>> - 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 > ---------------------------------------------------------------------- > 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
