Great, thanks, hadn't seen that technique before! On 1 December 2012 04:35, km <[email protected]> wrote:
> About your closing question, you can do > > isint =: (= <.) : [: > isint 2 0.5 > 1 0 > 2 isint 3 > |domain error: isint > | 2 isint 3 > > > The definition of isint specifies [: as the dyadic case, and [; rejects > every argument with a domain error. > > Kip Murray > > Sent from my iPad > > > On Nov 30, 2012, at 10:14 PM, Alex Giannakopoulos <[email protected]> > wrote: > > > On 30 November 2012 16:17, Bo Jacoby <[email protected]> wrote: > > > >> J is a rich language, and it might be a good idea to define an > elementary > >> subset for beginners. > > > > > > Couldn't agree more. > > A simple startup configuration file. Define verbs for trig functions so > > they don't look stupidly arbitrary. > > Some other elementary functions too, like polar2rect and rect2polar > > conversions that act on vectors (none of this xfy binary stuff here > > please), you know, stuff like you can find on *calculators*. > > Define dot-product, matrix-multiplication, cross-product, determinant, > etc, > > as user-friendly built-in verbs. When I am a beginner, I DO NOT, repeat > > NOT want to know about the . operator at the level of the jdict, it is a > > highly advanced subject, intriguing - yes, but not for newbies. Yet I do > > want to do matrix ops. I was told this was a language for linear > algebra. > > It would probably be a good idea, then, if we could do some linalg - > > straight out of the box - without serious brain damage. I have had abuse > > hurled at me by math teachers who have seen J's linalg primitives (LOL). > > Add some nice libs for equation solving while we're at it. Simultaneous > > and also some numeric solvers. This is what people want. A language, > not > > an assembler for a language. > > > > > >> J is a nice calculator for elementary computations. You can do a lot of > >> computing without knowing anything about binomial coefficients and > taylor > >> expansions and capped forks. > > > > > > Agree with the first two, NO way on the third. Even the 13 verb gives > you > > capped verbs, there is no way to begin learning J without it. Also they > > solve the problem of having to figure if you should use At or Atop, > > invaluable for a beginner who hasn;t quite mastered rank yet. > > > > This problem, which once again gives rise to a long thread, could easily > be > > solved by a highly visible Programming FAQ page, with lots of links to. > > Deal with capped forks, @ and @: and why you can't have things like > +/ a > > b c You know, the questions people *keep asking*. Remove ancient > > irrelevant stuff like the use of x. and y. We are not at J401 any more. > > > > > >> If you need to understand everything in order to be happy, then you may > be > >> unhappy. I taught my son elementary APL when he was 10 years old, and he > >> loved it! > > > > Would he have been just as happy at 14 when he had to use the cosine rule > > to solve a triangle? Would he really prefer > > cosrule_getang =: 13 : '_2&o.(((+/*:}.y)-*:{.y) % */ 2, }.y)' > > or > > cosrule_getang =: [: _2&o. (([: +/ [: *: }.) - [: *: {.) % [: */ 2 , }. > > to > > cosrule_getang := (Aa,B,C) -> acos((B^2+C^2-Aa^2)/(2.0*B*C)); > > Just wondering... > > > > These are simple enough things to do, and I speak as a J newcomer. > There's > > not many languages you can say that about after two and a half years! > The > > Zen of J, grasshopper. > > > > Incidentally, is there a way to cap a monadic hook on the left? > > For example (=<.) was mentioned, but obviously it allows dyadic > arguments, > > and fails if they are offered. > > Short of wrting monad : 'y=<.y' is there a way I can keep it monadic > (and > > implicit)? > > ---------------------------------------------------------------------- > > 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
