I wrote:
> [3]
http://www.jsoftware.com/pipermail/programming/2013-January/031234.html 
> [4]
http://www.jsoftware.com/pipermail/programming/2013-January/031236.html
>  sneaky  =: (]^:] '1:' ; '@' <@; <@,&(<'['))"_ 0~

Pascal responded:
>  on your 3rd link, isn't sneaky equivalent to just `:0 ?

Go ahead and try it.

To be less flip: `:0 is an adverb, which is useful, but lacks some of the
facilities available to verbs. Composability is one, but a more relevant one
is rank.  An adverb cannot partition and distribute its arguments like a
verb can.  Now, of course, you could put a verbal wrapper around `:0, e.g. 4
: 'x`:0 y' which would be similar to sneaky ... except it's not sneaky.

Explicit means "stated clearly, leaving no room for doubt".  That's what 4 :
'x`:0 y' is, and that's what makes it good, clear code.  Tacit means
"unspoken" or "silent" (as in "a silent agreement"). The sneaky tacit verb
uses these unspoken rules to mislead you, to clothe itself in an air of
predictability and blandness, only to later subvert them and execute
arbitrary code when you aren't looking. It's a mole. An impostor. A traitor.


So what, you say?  What harm can a little tacit verb do?  After all, 4 :
'x`:0 y' executes arbitrary code, too, right? Sure, it's up-front about it,
but it's not like the sneaky guy can do anything I can't already handle
(there's that air of blandness again...). Ok, then let our traitor abide,
and fast-forward to my fourth link, after he has had time to work his
poison:

           ] z =. dont '5-3'  NB. Oh, like ". 
        2
           ] z =. dont '-3'   
        _3
           ] z =. dont '-' 
        +-+-+
        |]|-|
        +-+-+

           NB.  Huh?
           z
        +-+
        |-|
        +-+
           type'z'
        +----+
        |verb|
        +----+
           5 z 3
        2

           NB. Oh, sh.... 

We are destroyed from the inside.  Sneaky indeed.

-Dan

PS:  I'll admit that the verb was so sneaky he duped even me.  It took
Pepe's veteran eyes to see him for what he truly was.
     http://www.jsoftware.com/pipermail/programming/2013-January/031257.html





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

Reply via email to