Brian, I agree with you totally re fgh.ijs, which I consider to be exemplary, and also about Trace which I find confusing and disappointing.
> On 25 Oct 2022, at 19:59, Brian Schott <schott.br...@gmail.com> wrote: > > First of all, I agree with Raul's idea of an Essay approach and/or perhaps > a Lab or a video. This conversation's applications and scripts are very > complicated and valuable. > > I am really impressed with the power of fgh.ijs . > For example the letters i,f,g and h are interchangeable placeholders and > many powerful examples of trains and / and & modifiers are beautifully > clarified showing the arguments in their positions in the results. The user > needs to be told that the results use the _ character to show the valence > of verbs, but that the verb pronouns must exclude the _ characters to > actually work. (Although an example of the &. modifier is suggested in the > fgh.ijs script, I got domain errors for it.) > > I am similarly impressed with tte which can be used with trains and / and > & modifiers and in contrast to fgh.ijs tte employs primitive and named > verbs. But no actual arguments are involved in the output. Consider the > following in 2 examples. > > ( */ &. +) tte NB. &. is not really demonstrated > 3 : 0 > NB. */&.+ > ] t0=: */&.+ y NB. main: h-: '&.' > : > ] t0=: x */&.+ y NB. main: h-: '&.' > ) > ( */ & +) tte NB. is there an error in dyad? > 3 : 0 > NB. */&+ > ] u0=: */ > ] v0=: + > ] r0=: <@v0 y > ] q0=: u0@> r0 NB. atop: */&+ > : > ] u0=: */ > ] v0=: + > ] r0=: <@v0 x > ] q0=: <@v0 y > ] p0=: r0 u0@> q0 NB. compose: */&+ NB. is this an error? > ] p0=: r0 u0&> q0 NB. compose: */&+ NB. does this correct? > ) > > dissect is mind blowingly versatile and especially helps with getting > argument rank to coincide with verb ranks. > > 13|: and trace have been my goto debug devices, but the others mentioned > above are really helpful, too. In exploring the ideas of this thread I was > somewhat disillusioned by the following example of trace because it seems > to reverse the order of Paren and Trident and hides the details of the > Trident (fork) inside the processing of Dyad so there is not much help with > trains. > > trace '2(+ * -) 3' > --------------- 5 Trident ---- > + > * > - > + * - > --------------- 8 Paren ------ > ( > + * - > ) > + * - > --------------- 2 Dyad ------- > 2 > + * - > 3 > _5 > ============================== > _5 > >> On Tue, Oct 25, 2022 at 10:54 AM Raul Miller <rauldmil...@gmail.com> wrote: >> >> Actually, thinking about this, a series of related essays might be useful. >> >> I'm not quite sure how they should be labeled. But using J to build >> expression-like results to illustrate concepts seems like a general >> and illustrative technique for beginners. (Though of course it's also >> useful for addons, like the math/calculus package.) >> >> Thanks, >> >> -- >> Raul >> > -- > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm