You could also highlight the difference in complexity between the baroque - http://en.cppreference.com/w/cpp/language/operator_precedence - and the simple - "right to left".
On Fri, Feb 3, 2012 at 1:19 PM, Roger Hui <rogerhui.can...@gmail.com> wrote: > You can point out that when there are 100 functions a hierarchy like that > is unwieldy. See also Ken's paper from 1966, *Conventions governing order > of evaluation* <http://www.jsoftware.com/papers/EvalOrder.htm>. > > <http://www.jsoftware.com/papers/EvalOrder.htm> > > On Fri, Feb 3, 2012 at 9:24 AM, km <k...@math.uh.edu> wrote: > > > A big problem for college freshmen is that calculators tell them 2*3+4 is > > 10 and J tells them 14. With apologies to "South Pacific": they have > been > > carefully taught PEMDAS. > > > > Sent from my iPad > > > > > > On Feb 3, 2012, at 10:44 AM, Michael Dykman <mdyk...@gmail.com> wrote: > > > > > This may sound trite, but > > > > > > Who is the audience? Everyone who does math, be it for engineering, > > > finance, or middle-school algebra. Interactive J should be > > > approachable for a 10 year-old and would be a huge improvement over > > > the calculators and spreadsheets in current use. > > > > > > What do they already know about J? Nothing or less. While I am > > > occasionally surprised by the extent that J is used among very senior > > > financial types, it is a fact that J remains deep in obscurity within > > > the IT industry. I can't imagine that the picture is any clearer among > > > educators. > > > > > > What the want to know is how to do basic math with the console. What > > > they need is enough of a foundation to begin exploring complex > > > relationships. > > > > > > I agree, Khan Academy provides an excellent model. If we (as a > > > community) were ever fortunate enough to have Khan produce some > > > introductory materials, usage would explode. > > > > > > Having said that, shouldn't this thread be migrated to Chat? > > > > > > - michael dykman > > > > > > On Fri, Feb 3, 2012 at 11:02 AM, Dan Bron <j...@bron.us> wrote: > > >> Hmm. I could do a basic intro to J course at one of the NYC JUGs. If > > we > > >> broadcast & record it, we could then post it on youtube. > > >> > > >> The question is: who is the audience? What do they already know about > > J? > > >> What do they want to know? > > >> > > >> -Dan > > >> > > >> -----Original Message----- > > >> From: programming-boun...@jsoftware.com > > >> [mailto:programming-boun...@jsoftware.com] On Behalf Of William > > Tanksley, Jr > > >> Sent: Friday, February 03, 2012 10:43 AM > > >> To: Programming forum > > >> Subject: Re: [Jprogramming] Demise of @ and [: debate > > >> > > >> I'd love to see a youtube class on J. I'd download every episode as it > > >> aired to my phone and watch it on the train, using my computer to do > > >> experiments and take notes. That's what I do with "njwilberger" > > >> rational trig and hyperbolic geometry lessons. > > >> > > >> -Wm > > >> > > >> On Fri, Feb 3, 2012 at 6:57 AM, Skip Cave <s...@caveconsulting.com> > > wrote: > > >>> A methodical approach to teaching J might be to group the primitives > > into > > >>> groups of similar functionality. Order these groups by complexity > > (simple > > >>> to complex), as well as perhaps ranking them by familiarity with > > >>> already-learned concepts from traditional math classes, most familiar > > >>> first. > > >>> > > >>> With a learning sequence defined, spend a class on each group of > > >>> primitives, starting with the simplest and most familiar functions > > (+-*%, > > >>> or perhaps = =. =:), and progress to the most complex and unfamiliar > > >>> functions.You should probably start with direct execution, and > > introduce > > >>> verb creation after a few classes on basic primitives. Some class > time > > >>> should be spent on how to read and understand the vocabulary > > definitions. > > >>> > > >>> Homework for each class would focus on usage of that current classes' > > >>> primitives, with previously-covered primitives thrown in for good > > measure. > > >>> The homework problems should be constructed to not require primitives > > that > > >>> haven't been covered yet (though nothing would prevent an advanced > > student > > >>> from looking ahead and trying them). > > >>> > > >>> It would be interesting to create an online J class, much like the > Khan > > >>> Academy on youtube. In fact, if you really wanted to introduce J to > the > > >>> masses, create a math tutorial that follows and supports Khan's math > > >>> tutorials, using J as the tool. This would be similar to Iverson's > > >>> "Concrete Math Companion" which follows 'Concrete Mathematics' > (Graham, > > >>> Knuth, and Patashnik (GKP)). > > >>> > > >>> Just a thought.. > > >>> > > >>> Skip > > >>> > > >>> > > >>> On Fri, Feb 3, 2012 at 2:27 AM, Linda Alvord > > >> <lindaalv...@verizon.net>wrote: > > >>> > > >>>> I agree, Don. I really was using a post from Roger because I find > his > > the > > >>>> most difficult to untangle. This thread was a good one to explain my > > new > > >>>> thoughts about @ and [: > > >>>> > > >>>> My challenges are topics I might use to teach high school seniors > > >> studying > > >>>> precalculus, probability and statistics. They are similar to old APL > > >>>> contests I invented while I was teaching APL - to get better with > the > > >>>> language myself. However, I'm not sure what would work in classes > > these > > >>>> days. > > >>>> > > >>>> At least I'm having fun with the readers of the forum. J is even > > becoming > > >>>> fun to use! > > >>>> > > >>>> Linda > > >>>> > > >>>> -----Original Message----- > > >>>> From: programming-boun...@jsoftware.com > > >>>> [mailto:programming-boun...@jsoftware.com] On Behalf Of Don Guinn > > >>>> Sent: Friday, February 03, 2012 12:04 AM > > >>>> To: Programming forum > > >>>> Subject: Re: [Jprogramming] Understanding C. , A. > > >>>> > > >>>> Might want to get beginners a little comfortable with J before > showing > > >> them > > >>>> C. and A. > > >>>> > > >>>> On Thu, Feb 2, 2012 at 7:56 PM, Linda Alvord < > lindaalv...@verizon.net > > >>>>> wrote: > > >>>> > > >>>>> I am rethinking my concern with @ and [: and am leaning toward > > >> using > > >>>>> explicit definitions as a way of teaching J to beginners as a > > natural > > >>>>> mathematical language. > > >>>>> > > >>>>> Some of the programmers responding to the forum think in idioms and > > use > > >>>> @ > > >>>>> happily. > > >>>>> > > >>>>> f > > >>>>> <:@-@[ C.&.|. ] > > >>>>> i > > >>>>> -@#@[ |. C. > > >>>>> k > > >>>>> <@i.@-@>:@[ C. ] > > >>>>> > > >>>>> 0thers favor the tacit approach with lots of [: > > >>>>> > > >>>>> g > > >>>>> ] C.&.|.~ [: <: [: - [ > > >>>>> h > > >>>>> [: |. ([: <: [: - [) C. [: |. ] > > >>>>> j > > >>>>> C. |.~ [: - [: # [ > > >>>>> > > >>>>> > > >>>>> Both styles are appropriate and I should not suggest one way or the > > >>>> other. > > >>>>> Many of you have suggested this. > > >>>>> > > >>>>> > > >>>>> We are looking for a simple way to introduce J to beginners. In > my > > >>>>> opinion > > >>>>> we would introduce J as a mathematical language for solving > problem. > > >>>>> > > >>>>> > > >>>>> I am suggest starting with expressions that produce desired > results. > > >>>>> Developing from right to left may come naturally. > > >>>>> > > >>>>> (<:-3 6)C.&.|.'abc*ef*g' > > >>>>> **abcefg > > >>>>> > > >>>>> The next step is making explicit functions indicating if the > intended > > >> use > > >>>>> is > > >>>>> monadic or dyadic. There is no use of @ or [: allowed at this > > point. > > >>>>> > > >>>>> g=: 13 :'(<:-x)C.&.|.y' > > >>>>> h=: 13 :'|.(<:-x)C.|.y' > > >>>>> j=: 13 :'(-#x)|.x C.y' > > >>>>> > > >>>>> Now exploring the tacit definitions would be appropriate in some > > >>>>> environments and can be explored an studied in terms of forks and > > >> hooks. > > >>>>> At this special code and common idioms can be explored and timing > of > > >>>>> expressions can be compared. In the end all roads lead to Rome. > > >>>>> > > >>>>> 3 6 f 'abc*ef*g' > > >>>>> **abcefg > > >>>>> 3 6 g 'abc*ef*g' > > >>>>> **abcefg > > >>>>> 3 6 h 'abc*ef*g't > > >>>>> **abcefg > > >>>>> 3 6 i 'abc*ef*g' > > >>>>> **abcefg > > >>>>> 3 6 j 'abc*ef*g' > > >>>>> **abcefg > > >>>>> > > >>>>> > > >>>>> -----Original Message----- > > >>>>> From: programming-boun...@jsoftware.com > > >>>>> [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda > Alvord > > >>>>> Sent: Wednesday, February 01, 2012 6:01 PM > > >>>>> To: 'Programming forum' > > >>>>> Subject: Re: [Jprogramming] Understanding C. , A. > > >>>>> > > >>>>> Sorry I missed the version by Arie. Nice! > > >>>>> > > >>>>> 3 6 (i=:-@#@[ |. C.) 'abc*ef*g' > > >>>>> **abcefg > > >>>>> i > > >>>>> -@#@[ |. C. > > >>>>> > > >>>>> j=: 13 :'(-#x)|.x C.y' > > >>>>> j > > >>>>> C. |.~ [: - [: # [ > > >>>>> > > >>>>> 3 6 j 'abc*ef*g' > > >>>>> **abcefg > > >>>>> > > >>>>> Please let me know if you have concerns or modifications as I plan > to > > >> use > > >>>>> different rules beginning with challenge 6. > > >>>>> > > >>>>> Henceforth I'll have no opinion concerning the merits of @ and > [: > > I > > >>>>> hope > > >>>>> to learn to favor them both gracefully. > > >>>>> > > >>>>> Linda > > >>>>> > > >>>>> -----Original Message----- > > >>>>> From: programming-boun...@jsoftware.com > > >>>>> [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda > Alvord > > >>>>> Sent: Wednesday, February 01, 2012 5:20 PM > > >>>>> To: 'Programming forum' > > >>>>> Subject: Re: [Jprogramming] Understanding C. , A. > > >>>>> > > >>>>> I'm happiest with the explicit version. It shows the arguments > needed > > >> for > > >>>>> the application. > > >>>>> > > >>>>> 3 6 (f=:<:@-@[ C.&.|. ]) 'abc*ef*g' > > >>>>> **abcefg > > >>>>> 3 6 f a=:'abc*ef*g' > > >>>>> **abcefg > > >>>>> > > >>>>> g=: 13 :'(<:-x)C.&.|.y'! > > >>>>> 3 6 g a > > >>>>> **abcefg > > >>>>> > > >>>>> f > > >>>>> <:@-@[ C.&.|. ] > > >>>>> g > > >>>>> ] C.&.|.~ [: <: [: - [ > > >>>>> g=: 13 :'(<:-x)C.&.|.y' > > >>>>> > > >>>>> J provides the ~ which shows up in the tacit version above. > > >>>>> > > >>>>> Then there is h with no ~ and no &. > > >>>>> > > >>>>> h=: 13 :'|.(<:-x)C.|.y' > > >>>>> h > > >>>>> [: |. ([: <: [: - [) C. [: |. ] > > >>>>> 3 6 h a > > >>>>> **abcefg > > >>>>> > > >>>>> Linda > > >>>>> > > >>>>> > > >>>>> -----Original Message----- > > >>>>> From: programming-boun...@jsoftware.com > > >>>>> [mailto:programming-boun...@jsoftware.com] On Behalf Of Roger Hui > > >>>>> Sent: Wednesday, February 01, 2012 11:26 AM > > >>>>> To: Programming forum > > >>>>> Subject: Re: [Jprogramming] Understanding C. , A. > > >>>>> > > >>>>> Personally, I dislike expressions with multiple uses of ~ as they > > make > > >> my > > >>>>> head spin. > > >>>>> > > >>>>> 3 6 (C.&.|.~ <:@-)~ 'abc*ef*g' > > >>>>> **abcefg > > >>>>> 3 6 (<:@-@[ C.&.|. ]) 'abc*ef*g' > > >>>>> **abcefg > > >>>>> > > >>>>> I much prefer the second over the first. > > >>>>> > > >>>>> > > >>>>> > > >>>>> On Wed, Feb 1, 2012 at 8:05 AM, Aai <agroeneveld...@gmail.com> > > wrote: > > >>>>> > > >>>>>> Ah, I see that's a bit like yours David. > > >>>>>> > > >>>>>> Modifying it for 1< #x > > >>>>>> > > >>>>>> 3 6 (C. |.~ -@#@[) 'abc*ef*g' > > >>>>>> **abcefg > > >>>>>> > > >>>>>> > > >>>>>> (from Essays) > > >>>>>> > > >>>>>> 3 6 (C.&.|.~ <:@-)~ 'abc*ef*g' > > >>>>>> **abcefg > > >>>>>> k > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> On 01-02-12 16:47, Aai wrote: > > >>>>>>> Sorry for the noise. You should forget the previous ones I sent: > > >> they > > >>>>>>> are wrong. > > >>>>>>> > > >>>>>>> It looks like this one is ok: > > >>>>>>> > > >>>>>>> mtf=:_1&|.@C. > > >>>>>>> > > >>>>>>> ]samples=: '*abcef' |."0 1 ~-i.6 > > >>>>>>> *abcef > > >>>>>>> f*abce > > >>>>>>> ef*abc > > >>>>>>> cef*ab > > >>>>>>> bcef*a > > >>>>>>> abcef* > > >>>>>>> > > >>>>>>> > > >>>>>>> ]res=: '*' ([,-.~) "1 samples > > >>>>>>> *abcef > > >>>>>>> *fabce > > >>>>>>> *efabc > > >>>>>>> *cefab > > >>>>>>> *bcefa > > >>>>>>> *abcef > > >>>>>>> > > >>>>>>> res -: mtf&>/"1 (;~I.@:('*'&=))"1 samples > > >>>>>>> 1 > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm