[EMAIL PROTECTED] wrote:
------------------------------

Message: 8
Date: Fri, 12 Sep 2008 09:43:53 -0700
From: Roger Hui <[EMAIL PROTECTED]>
Subject: Re: [Jgeneral] Verb Sequences - u@:v and [EMAIL PROTECTED]
To: General forum <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=iso-8859-1

> > For example, compare:
> >    3 :'10+y'&.^. 2 3 5
> >    10&+&.^. 2 3 5
> > For the explicit version, I think it's clearer as: > > ^ 10 + ^. 2 3 5 > > and from this you get the explicit verb (3 : '^ 10 + ^. y') .

This version loses the insight that there is a "dual":
10&+ under logarithms.

That's true, and I agree that the tacit version with &. is better for
the final verb. But I might want to build the verb in stages, checking
at each stage that results are sensible, to make it easier to find out
what's going on when surprising things happen:

   load 'plot'
   plot 1x10&* i: 5      NB. Works
   plot 10&+&.^. i: 5    NB. Fails
|domain error: glcmds
|       glcmds buf

   1x10&* _1
_22026.5

   10&+&.^. _1
_22026.5j2.69737e_12

----- Original Message -----
From: 0j1 <[EMAIL PROTECTED]>
Date: Friday, September 12, 2008 9:37
Subject: Re: [Jgeneral] Verb Sequences - u@:v and [EMAIL PROTECTED]
To: [email protected]

> > Raul Miller rauldmiller at gmail.com wrote
> > Fri Sep 12 22:18:58 HKT 2008
> > On Fri, Sep 12, 2008 at 10:07 AM, 0j1 <j at
> asteroid.demon.co.uk> wrote:
> >> It's harder to write tacit code than explicit and harder to
> debug it
> >> when it doesn't work.
> > > > In my opinion, this depends on the length of the code.
> (And on your
> > background.)
> > > > Also, in my opinion, the advantage of tacit code (other than speed)
> > is that some manipulations are easier with tacit code than explicit
> > code.
> > Agreed. >
> > For example, compare:
> >    3 :'10+y'&.^. 2 3 5
> >    10&+&.^. 2 3 5
> > For the explicit version, I think it's clearer as: > > ^ 10 + ^. 2 3 5 > > and from this you get the explicit verb (3 : '^ 10 + ^. y') . >
> > Of course, indirect manipulations are sometimes superior
> >    1x10 * 2 3 5
> > > > -- > > Raul


------------------------------

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

End of General Digest, Vol 36, Issue 15
***************************************



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

Reply via email to