Don; before this well flogged subject dies away ... If children were introduces to J on their OLPC or similar notebooks at the first grade level, with a dozen (or less) primary verb functions ... then by the time they were ready to understand standard deviation, 'S' would be an unnecessary branching out of J.
David On Fri, 2009-05-01 at 06:14 -0400, Don Watson wrote: > Hi Ric, > > You wrote: > > > ''Let > > mean=: (+/y) % #y > > ssdev=: +/ *: y - mean y > > var=: (ssdev y) % <:#y > > stddev=: %: var y > > ) > > Tacit J is a central component of J that is introduced early in the > documentation All I really want is a mode in which I can remove the > surrounding material and just write: > > mean=: (+/y) % #y > ssdev=: +/ *: y - mean y > var=: (ssdev y) % <:#y > stddev=: %: var y > stddev2=: %: (% <:#y) * +/ *: y - (+/y) % #y > > That's not a lot to ask. I'll give up on replacing the x and y with [ and ]. > > Anyway, I have some work to do, I'll be back. > > Don > > ----- Original Message ----- > From: "Sherlock, Ric" <[email protected]> > To: "Chat forum" <[email protected]> > Sent: Friday, May 01, 2009 3:25 AM > Subject: Re: [Jchat] Language S > > > > Don, > > > > So far the all the evidence and advice brought up in this thread suggests > > that: > > * explicit reference to arguments in equations is likely to be less > > confusing to math students (or beginning J users) than tacit or > > implicit references. > > * the use of a little additional syntax to define verbs presents > > little or no barrier to students unfamiliar with J and/or > > programming. > > > > I wonder at this point whether you would be receptive to going back to an > > earlier suggestion in post by Oleg proposing a "verb definition mode"? > > > > The implementation details are specified on the wiki page: > > <http://www.jsoftware.com/jwiki/Phrases/Definitions> > > > > If the adverb "defn" on that page were renamed "Let" you could use it in a > > session like this: > > > > ============== > > NB. blah blah intro > > NB. For: > > y=: 3 4 9 4 3 8 5 > > NB. The mean is > > (+/y) % #y > > 4.6 > > > > NB. ... when want to define verbs: > > > > ''Let > > mean=: (+/y) % #y > > ssdev=: +/ *: y - mean y > > var=: (ssdev y) % <:#y > > stddev=: %: var y > > ) > > mean y > > 4.6 > > ssdev y > > 29.2 > > var y > > 7.3 > > stddev y > > 2.70185 > > > > ================== > > > > If you wanted to get really picky you could define a noun > > Now=: 'whatever you like cause it just gets ignored' > > > > So that you could write: > > > > Now Let > > coeffvar=: (stddev y) % mean y > > ) > > > > That's getting pretty close to the treatment of equations in a text book? > > > > Note you are free to make the definition for stddev one big line if you > > like, I just think that dividing it up into meaningful bits as above is > > more illuminating (not to mention flexible). > > > > > > ---------------------------------------------------------------------- > > 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
