Perhaps also worth considering:

   cos`(-@sin),:sin`cos

Thanks,

-- 
Raul

On Sat, Dec 19, 2020 at 12:25 PM Roger Hui <rogerhui.can...@gmail.com> wrote:
>
> > However, when it comes to avoiding unnecessary bracket pairs, your
> second pair is a candidate as well.
>
> Ah, but no, the goal is not necessarily to avoid unnecessary parenthesis;
> the goal is ... beauty (or "prettity", as you put it).  Consider:
>
>    (cos , -@sin) ,: (sin , cos)
>    (cos , -@sin) ,: sin , cos
>
> The expressions are equivalent, but which is more beautiful?  (I do believe
> that your original expression, even with the quibbles on its
> parenthesization, is already more beautiful than all the other expressions
> in this thread.)
>
> There are other examples:
>
> 0. Arguably the very first APL one-liner:
>
>    (x>0)-(x<0)
>
> found in §1.4 of *A Programming Language
> <https://www.jsoftware.com/papers/APL.htm>* [Iverson 1962].  It computes
> the *signum* (sign) of x, _1, 0, or 1 according to whether x is <0, =0, or
> >0.  (Exercise for the reader: which is the *second* APL one-liner ever?)
>
> 1. What I am guessing is Ken Iverson's favorite APL expression:
>
>    (0,x)+(x,0)
>
> It computes the next set of binomial coefficients, starting from ,0.  See
> §11.7 of *APL Since 1978 <https://dl.acm.org/doi/pdf/10.1145/3386319>* [Hui
> & Kromberg 2020] for the reasons why I so guess.
>
>
>
> On Sat, Dec 19, 2020 at 12:35 AM Ben Gorte <bgo...@gmail.com> wrote:
>
> > I'm afraid I cannot fully satisfy your curiosity. You are completely right
> > concerning prettity, balance, and symmetry.
> > Furthermore, my brackets surrounding the entire expression are superfluous
> > indeed (like all pairs of brackets surrounding entire expressions?).
> >
> > However, when it comes to avoiding unnecessary bracket pairs, your second
> > pair is a candidate as well.
> > At the same time I must admit that omitting it, for the sole purpose of
> > avoiding unnecessary brackets, is testing one's luck (but I won).
> >
> > Greetings from Sydney,
> > Ben
> >
> > On Sat, 19 Dec 2020 at 18:49, Roger Hui <rogerhui.can...@gmail.com> wrote:
> >
> > > > R =: ((cos , -@sin) ,: sin , cos)
> > >
> > > I am curious why the definition isn't
> > >
> > >    (cos , -@sin) ,: (sin , cos)
> > >
> > > It seems prettier (more balanced, more symmetric).
> > >
> > >
> > >
> > > On Fri, Dec 18, 2020 at 3:56 AM Ben Gorte <bgo...@gmail.com> wrote:
> > >
> > > > Perhaps I'm missing the point, but I would say:
> > > >
> > > > R =: ((cos , -@sin) ,: sin , cos)
> > > >
> > > > R 1r6p1
> > > >
> > > > 0.866025 _0.5
> > > >
> > > > 0.5 0.866025
> > > >
> > > >
> > > > Ben
> > > >
> > > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to