Re: More /.{I->-1} craziness
- To: mathgroup at smc.vnet.net
- Subject: [mg106223] Re: More /.{I->-1} craziness
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Tue, 5 Jan 2010 01:47:51 -0500 (EST)
- References: <200912300915.EAA17299@smc.vnet.net> <hhhmn8$o9t$1@smc.vnet.net> <hhshr2$ksf$1@smc.vnet.net>
Fred Klingener wrote: > On Jan 3, 3:37 am, DrMajorBob <btre... at austin.rr.com> wrote: >> I think the way we enter and understand InputForm is syntax; FullForm is >> the way they're stored internally. >> >> So Mathematica's pattern matching isn't what I'd call syntactical... >> unless you mean "syntactical on a hidden (though discoverable) level". >> >> Bobby > ... > > I studied the doc center entries for a few things like Replace, > ReplaceAll, etc. as well as tutorial/ApplyingTransformationRules, and > I was unable to find a single entry that might give what we're calling > an "unsophisticated user" a hint that the lhs to be acted on is > anything other than that displayed on the notebook screen. > > I wouldn't describe myself as "unsophisticated," but my expectations > are conditioned and contaminated by almost 50 years of technical > computing. As a result, I've been a slow learner of the grand > structure of Mathematica, and I've spent my share of time astonished > by the way Mathematica works and confused by the lack of rewards to be > gained by RTFM. > > A mention in the docs of replacement happening on Bobby's "syntactical > on a hidden (though discoverable) level" would be sufficiently > frightening to drive some users back to the hand calculator, but > further mention that that hidden level can be discovered even by an > "unsophisticated user" as the output of //FullForm would be like > sharing the secret handshake. > > First line in tutorial/Applying TransformationRules: > > expr/.lhs->rhs apply a transformation rule to FullForm[expr] > > unless you don't want to share the secret handshake. > > Cheers, > Fred > > > If you can, get hold of one of those brick-like Mathematica books - preferably version 5. The organisation of the book helps quite a bit - there is a flow to it that you never find with the help system, plus you can put book markers in it, etc. Failing that, you could print off the virtual book. Graphics has changed a bit since version 5, but almost all of the underlying concepts are unchanged. Flow is important. For example, I encountered someone who wanted to execute a program contained in more than one notebook. If he had read through the book, roughly in order, he would almost certainly have realised that the two notebooks would typically use the same kernel. However, because he had not mastered the frontend/kernel concept, he browsed the help system until he came across SelectionMove and SelectionEvaluate.... The end result was not pretty! David Bailey http://www.dbaileyconsultancy.co.uk