Pepe wrote:
> [0] [Jprogramming] Tacit adverb definitions?
>    http://www.jsoftware.com/pipermail/programming/2006-July/002627.html 
> <http://www.jsoftware.com/pipermail/programming/2006-July/002627.html>
Ha, I’d forgotten about that. I remember having fun with it at the time.

Not having to parenthesize the LHA to a conjunction under certain conditions 
(the pertinent condition being insight under consideration in this thread) came 
as a lovely little revelation when I was just hacking around in the session 
manager. 

I can’t remember what I was playing with at the time, but I do remember that 
little observation being an enjoyable outcome. It might have been when I was 
exploring someone’s assertion (Randy’s, maybe, because of his deep experience 
with APL?) that J evaluates strictly left-to-right. 

Anyway, it was in the era when I started to look at J’s grammar directly (i.e. 
trying to actually understand $II.E) after spending years developing a 
subconscious intuition for it.

I’m still not nearly as conversant with J’s grammar, or parsers [in the 
compiler sense] in general as Raul is, nor do I think I expect I ever will be.  
I “get” it (as in, J’s evaluation of sentences I type rarely takes me by 
surprise), but I’d have to put in some effort and thought in order to explain 
it to a third party. And I would probably be forced to explain it in more human 
/ intuitive terms than what is spelled out in the parse table.

In the same vein, though I don’t think it was at the same time, I also remember 
a sense of satisfaction when I learned that 3 : ‘label_.’ (a label-less label*) 
could be used as a minimal and semantically-transparent J equivalent to APL’s 
diamond or C-like languages’ semicolons within explicit definitions.  

That is, label_. acts as a logical line separator that forces the expression on 
the left to be evaluated to completion before the expression on its right is 
executed. 

This is distinct from normal labels, because if you wanted to use those, you’d 
have to vary the label names if you wanted more than one line separator in a 
single definition, which works, but feels like a hack. 

It’s also different from Ken’s original suggestion to use ]. (or, in today’s 
terms, 2 : ‘v’), because while that works for (the majority of) nouns and 
verbs, it does “the wrong thing” when one side or the other is an operator 
(i.e. an adverb or conjunction). That is, its scope is limited. As punctuation, 
label_. works for any wordclass.

-Dan

*  https://en.wikipedia.org/wiki/The_Gateless_Gate 
<https://en.wikipedia.org/wiki/The_Gateless_Gate>


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

Reply via email to