Your concerns about accuracy of the translation make it all the more
important to have the computer do the translation.
I wrote g to do what your "thru" does. I patterned it after your solution.
To me it seemed that my version did the job correctly.
How should I have written it so that it would be an accurate explicit
translation of your definition?
f=: <./ + i.@(+ *)@-~
g=: 13 :'x(<./+[:([: i. (+*))-~) y'
4 f _7
4 3 2 1 0 _1 _2 _3 _4 _5 _6 _7
4 g _7
4 3 2 1 0 _1 _2 _3 _4 _5 _6 _7
4 f 8
4 5 6 7 8
4 g 8
4 5 6 7 8
_4 f 11
_4 _3 _2 _1 0 1 2 3 4 5 6 7 8 9 10 11
_4 g 11
_4 _3 _2 _1 0 1 2 3 4 5 6 7 8 9 10 11
_2 f _7
_2 _3 _4 _5 _6 _7
_2 f _7
_2 _3 _4 _5 _6 _7
When I try to understand your style of writing it takes me a long time to
find where the arguments belong. It is difficult to capture all the
subtleties of well written code. What I am suggesting is not to make it
easier, but to make J actually be able to be a skillful teacher.
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raul Miller
Sent: Saturday, March 15, 2014 12:57 AM
To: Programming forum
Subject: Re: [Jprogramming] J in 5 minutes
We think very differently, I think.
Personally, while I have a great respect for what we can do with computers,
I think it's a mistake to think solely in terms of what they make easier.
(Designs always involve tradeoffs, and making one thing easy makes another
thing harder. People will often favor a particular tradeoff, but other
people will have conflicting needs.)
In this particular case, note that f has a different definition from g.
They are similar definitions, but they are not identical. You see them as
the same because you have a particular mental model about how they are to
be used.
But usefulness is something we impose on the definition, on the
implementation, and so on.
And *that* I think, is the most important message here. You cannot use
computers if you do not understand this.
Thanks,
--
Raul
P.S.
(f -: g) i. 3
0
On Sat, Mar 15, 2014 at 12:37 AM, Linda Alvord
<[email protected]>wrote:
> I've been reading about tacit vs. explicit definitions. For some users of
> J , it seems more natural to use x and y when using a right to left
> definition. For many others your style is more easily used. However, f
> and g do the same thing.
>
> So, writing in either style is OK. However it there were a way to see
> style f translated into either style f* or f^ could be use or some other
> way of distinguishing them. You would be able to see "your f " in either
> style. It would be like having an English or French version of the same
> sentence.
>
> But in a similar fashion I could view "my g " in either g* or g^
>
> There would never be a need to enter f or g alone since you would
pick
> the one you wanted.
>
> Does this seem any clearer?
>
> Linda
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Raul Miller
> Sent: Saturday, March 15, 2014 12:09 AM
> To: Programming forum
> Subject: Re: [Jprogramming] J in 5 minutes
>
> Why would f alone provide no definition? I'm having trouble understanding
> what you are driving at?
>
> Thanks,
>
> --
> Raul
>
>
>
> On Fri, Mar 14, 2014 at 11:32 PM, Linda Alvord
> <[email protected]>wrote:
>
> > In my more perfect world, Raul could write f , and I could write g .
> >
> > f=: <./ + i.@(+ *)@-~
> >
> > g=: 13 :'x(<./+[:([: i. (+*))-~) y'
> >
> >
> > However, by some coding system, he could look at both "dialects".
> >
> > f1=: <./ + i.@(+ *)@-~
> > f2=: <./ + [: ([: i. (+ *)) -~
> >
> > and so could I:
> >
> > g1=: <./ + i.@(+ *)@-~
> > g2=: <./ + [: ([: i. (+ *)) -~
> >
> > but f alone would provide no definition.
> >
> > Linda
> >
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Don Kelly
> > Sent: Friday, March 14, 2014 2:45 AM
> > To: [email protected]
> > Subject: Re: [Jprogramming] J in 5 minutes
> >
> > Good point - however both tacit and explicit follow certain rules of
> > the language-
> > I would put this in terms of a sermon , rather than a dialect-
> > where the preacher deals directly to the point vs one who takes a
> > detailed (often circuitive) route to get to the point. Same language-
> > but one approach goes step by step (often repeatedly) while the other
> > goes more directly.
> > Put it this way
> > MAd (Michigan Algerithmic Decoder- the first language I learned),
> > Fortran (originally a weak version of MAD) , Basic, Turbo Basic (Basic
> > with muscle ) are dialects of a language. Pascal, C C++ etc are
> > dialects of a different language. APl, J and related "languages" are
> > also dialects of some common language .
> > These languages, in part, borrow from each other (and dialect borrow-
> > i.e Fortran borrowed from MAD but left Alfred E. Neuman out of error
> > messages starting with "this is mad"
> >
> > Whatever, too long a day, and too much wine "in Vino excreta taurus"
> >
> > Don
> >
> > .
> >
> >
> > On 13/03/2014 8:54 PM, robert therriault wrote:
> > > Well, tacit and explicit could be thought of as dialects, couldn't
> they?
> > >
> > > Cheers, bob
> > >
> > > On Mar 13, 2014, at 7:57 PM, Don Kelly <[email protected]> wrote:
> > >
> > >> At least J doesn't have dialects.
> > >>
> > >> Don
> > > ----------------------------------------------------------------------
> > > 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
>
> ----------------------------------------------------------------------
> 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