>translate me to French!'  in the name of "French programming".  To be fair, 
>I've never used  13 :  , but it seems to me its main
>purpose would be pedagogical.  That is, an explicit Jer could use it in the 
>IJX window to translate explicit code to tacit, in order
>to learn how to do that for himself, one day. 
 
Right, it helped me to figure out some tacit programming tricks a long time 
ago; nowadays it helps me to decipher explicit code. 
>expected it to improve performance, I would test that expectation*, unless I 
>was taking Pepe's advice and waiting for the
>implementation to catch up .... ).  

Actually, I follow that advice, unless it is unbearable, but it is not mine ( 
http://www.jsoftware.com/pipermail/programming/2009-October/016710.html ). 


 
 
Raul wrote:
>  Meanwhile, note that tacit programming can have exactly the
>  same ugliness
>    13 : '%: +/ *: y' 3 4

I differ; the above is not tacit programming.  True, the verb which is 
eventually applied to 3 4 is tacit, but that tacit verb is
nowhere evident in the line above (and so cannot be blamed for any "ugliness").

I've been puzzled before by people who use  13 :  to produce tacit verbs, but 
never inspect the output of that adverb.  They even
persist the  13 : ...  line in their scripts!  To what purpose?

Often,  I see people using  13 :  in the name of "tacit programming".  This is 
seems as silly to me as writing  en2fr 'Please
translate me to French!'  in the name of "French programming".  To be fair, 
I've never used  13 :  , but it seems to me its main
purpose would be pedagogical.  That is, an explicit Jer could use it in the IJX 
window to translate explicit code to tacit, in order
to learn how to do that for himself, one day. 

But unless one expects the 13 :  tacit translation to improve performance, I 
see no reason to persist it in a script (and if I
expected it to improve performance, I would test that expectation*, unless I 
was taking Pepe's advice and waiting for the
implementation to catch up .... ).  

-Dan

*  Tacit code can be faster than explicit for several reasons, but a major one 
is some tacit constructs are supported by special
code (i.e. DoJ Appendix B).  But it seems to me  13 :  takes no pains to 
produce such constructs.  For example:

      13 : 'y i. >./ y'
    ] i. >./
    
      rand =: ?~ 3e6
      
      (-: |.)@:(ways`:0) rand  NB.  Identical results
    1
    
      '5.2d' 8!:2 (%"1 <./) (6!:2, 7!:2@:])&> ways ,L:0 ' rand'  NB.  
Non-identical performance
    5.06 1.07
    5.09 1.07
    1.00 1.00
      
-Dan

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


________________________________

From: Dan Bron <[email protected]>
To: Programming forum <[email protected]>
Sent: Mon, December 21, 2009 2:25:24 PM
Subject: Re: [Jprogramming] Tacit exercise
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to