Tracy wrote:
>  The most remarkable thing, to my eye, about the equivalence between (
>  1 :'body' ) and ( 'body' (1 :) ) is that no special syntax is
>  involved. Both rely on the same simple, uniform rules.

First:  I like your convention of parenthesizing J code mixed into English
sentences; I may adopt it (I usually bookend my inline code with
double-spaces).

Second, a little special syntax is involved, in the sense that §II.E is the
fundamental grammar and §II.F is "on the interpretation of forks and bidents
(trains)".  That is, your former phrase is controlled entirely by J's
fundamental grammar, but the latter requires an extra appeal to the
(theoretically arbitrary) interpretation of the N C bident.

Now I see Pepe has just posted some very helpful historical context around
§II.F for understanding that train specifically, so I won't repeat him.  I
will simply point out that since the decommissioning of the trains table,
the interpretation of N C and kin is technically undocumented.  That is, the
fact the they're permissible syntax is documented (i.e. the bidents aren't
erroneous), but the meaning of the syntax isn't (so the DoJ permits any
arbitrary interpretation, e.g. N C could output "17" for any N and C). 

Now, I think this is a minor gap at most, because as I tried to get across
in my original response, the current definition is so consistent as to be
essentially mandatory.  The conjunctive bidents do exactly what a human
would predict (expect, demand!) they do, without having read their
definition (which, as we said, doesn't exist).  And they do it in a very
elegant way, using other general tools from J's kit (i.e. adverbs).

This is what you found remarkable.  I have had such wonderful shocks before,
myself.  For example, one of my favorite J phrases for a while was "scalar
replace", which replaces all instances of scalar m with scalar n.  It was
defined thus:

           sr   =:  (&=)`(,:&)}    

and used thus:
     
           'a' sr 'b' 'aaaabbb'
        bbbbbbb
           
Now, I defined this early on in my J career (scalar replacement is a common
problem and one finds a need for it very quickly).  This was long before I
was fluent in J (certainly before I'd ever read or even heard about its
trains table), or even really had a grasp on its principles.  But because of
the way the J and its trains table was designed, I didn't have to: I just
wrote the utility in my ignorance, the way I wanted to write it and expected
it to work.  And it did.

And I never had trouble reading it when I came across it in my utilities
file: those open-ended bonds seem to be to be just begging for arguments,
and the parens and the ` seem to nicely compartmentalize them, in a nice
package ready to be gobbled up by   }  .  Pretty.

Along the same lines, in one of your threads, I once noticed that the
unifying, general chain rule of derivatives could be expressed entirely and
(more important) transparently as a tacit operator in J [1], and was
particularly enamored of the clause  @:D.1  which gives  (f o g)'  , the
derivative of the composition of its very obviously absent arguments.  I
consider this a true-blue tacit conjunction, one of the best of its breed.
Because, like its younger sibling the tacit verb, it precisely describes a
transformation of its arguments, without mentioning them. 

RIP, trains table.

-Dan

[1]  http://www.jsoftware.com/pipermail/chat/2008-September/001254.html 

PS: For those interested, the trains table, in all its historical glory, may
be found here:
http://www.cs.trinity.edu/About/The_Courses/cs2322/jdoc/dict/dictf.htm .
    You may visit the conjunctival bidents under discussion at rows _2 _3 _7
_11 with N C at the latter.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to