Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13674 > unrolled thread

Re: Mathematica and Lisp

Started byBill Rowe <readnews@sbcglobal.net>
First post2013-03-02 08:44 +0000
Last post2013-03-07 08:58 +0000
Articles 14 — 8 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Mathematica and Lisp Bill Rowe <readnews@sbcglobal.net> - 2013-03-02 08:44 +0000
    Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-03-03 07:21 +0000
      Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-03-04 03:58 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-03-05 09:15 +0000
      Re: Mathematica and Lisp Vince Virgilio <blueschi@gmail.com> - 2013-03-06 03:12 +0000
    Re: Mathematica and Lisp Bob Hanlon <hanlonr357@gmail.com> - 2013-03-04 03:57 +0000
    Re: Mathematica and Lisp Richard Fateman <fateman@eecs.berkeley.edu> - 2013-03-04 03:57 +0000
      Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-03-05 09:16 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-03-06 03:13 +0000
          Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-03-06 11:04 +0000
            Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-03-07 08:58 +0000
    Re: Mathematica and Lisp Richard Fateman <fateman@eecs.berkeley.edu> - 2013-03-05 09:15 +0000
    Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-03-05 09:16 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-03-07 08:58 +0000

#13674 — Re: Mathematica and Lisp

FromBill Rowe <readnews@sbcglobal.net>
Date2013-03-02 08:44 +0000
SubjectRe: Mathematica and Lisp
Message-ID<kgse4s$jam$1@smc.vnet.net>
On 2/27/13 at 11:43 PM, fateman@cs.berkeley.edu (Richard Fateman)
wrote:

>On 2/27/2013 12:04 AM, Bill Rowe wrote:

>>Easier to learn?

>I'm not even arguing that.  I'm saying that EF as it exists is hard
>to understand, and that there are other languages that are easier.

Yes, I would agree there is significant effort required to
become proficient with Mathematica and there are other languages
that are easier to learn.

>Understanding one of them (e.g. Lisp) may be sufficiently easier,
>and would have sufficient "overlap" that learning Lisp might make
>using EF easier.  I think that was the gist of the original
>question.

Yes, that was the gist of the original question. And Lisp might
be easier to learn. But Mathematica isn't Lisp. Possibly
learning Lisp first might make it easier to learn Mathematica.
Another real possibility learning LIsp would make it more
difficult to learn Mathematica. Expecting Mathematica to behave
like Lisp could cause quite a bit of problem which would be
avoided if you didn't have a Lisp background.

>>Or are you suggesting one should not have to spend time with
>>Mathematica to be come reasonably proficient?

>I think that becoming proficient in the use of EF requires more time
>than would ordinarily be expected for using a system occupying a
>similar technological niche.  Or said another way, the EF language
>is harder than necessary to learn.

Possibly Mathematica is harder than necessary to learn. I don't
have any real way to evaluate whether that is true or not.

>>Consider some one who has some math background and whose
>>programming experience is Fortran. If they then needed to move to C
>>or C++, wouldn't pointers be rather mysterious indefinitely if they
>>didn't spend effort to study C or C++?

>Pointers can be fairly easily explained by analogy with array
>indexes into memory.  The subtleties of course can be subtle, but I
>don't think they would be mysterious indefinitely.

>>Why should it be different for Mathematica?

>EF is quite different.  It uses pattern and matching and is rule
>based.  It has stuff like Hold and friends. Something I haven't
>mentioned recently, I think... It has peculiar precedence and
>unusual symbols and peculiar lexical rules.  Like the difference
>between (3+x)/.3->4 and (3+x)/. 3->4 and 3+x/.3->4 etc.

I agree Mathematica is different in a great many ways. And I can
see how someone experienced in say C or another language would
see Mathematica as strange and unusual. But I really don't see
the problem of understanding Mathematica symbols, precedence
etc. as being any different than learning pointers are other
aspects of C. It is simply a matter of study and using
Mathematica just as it is a case of study and using C to learn
pointers etc.

[toc] | [next] | [standalone]


#13681

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-03-03 07:21 +0000
Message-ID<kgutlr$nsc$1@smc.vnet.net>
In reply to#13674
On 3/2/2013 12:44 AM, Bill Rowe wrote:
...

<snip>
I mostly agree with you!

>
> I agree Mathematica is different in a great many ways. And I can
> see how someone experienced in say C or another language would
> see Mathematica as strange and unusual. But I really don't see
> the problem of understanding Mathematica symbols, precedence
> etc. as being any different than learning pointers are other
> aspects of C. It is simply a matter of study and using
> Mathematica just as it is a case of study and using C to learn
> pointers etc.
>

C is not my favorite programming language .. see
www.cs.berkeley.edu/~fateman/papers/software.pdf

Nevertheless one can almost argue that if you know about
how computers work on the assembly language level you have
a modest chance of mapping C constructs to assembler-like
code "in your head".  I've taught this as part of an
undergraduate course in "Machine Structures".

For EF, the number of unfamiliar operators and the
number of distinct precedences is substantial.

There is a table in the virtual book documentation "operation precedence"
in the section Operator Input Forms.

  There are roughly
69 different precedence categories listed.

In some precedence classes there are many forms.
For example in the category 4th from the bottom there are these
operators which, being in the same class, would be parsed from
left to right (or is it right to left?) anyway, here they are.

=, :=, ^=, ^:=,  =. ->,
   and also the matchfix
/:   =
/:  :=

While some of the operators have no built-in meaning, and some are
pretty obscure, they are all part of the syntax. There are also quite
a few multi-character operators, some of which are new to me.. @@@ ?

  This is an attempt to document one of reasons I think EF is NOT just 
as easy to learn as any other language. I've previous mentioned other
reasons which can be grouped generally under the category "semantics".

RJF





>

[toc] | [prev] | [next] | [standalone]


#13695

FromJohn Doty <noqsiaerospace@gmail.com>
Date2013-03-04 03:58 +0000
Message-ID<kh164f$sah$1@smc.vnet.net>
In reply to#13681
On Sunday, March 3, 2013 12:21:31 AM UTC-7, Richard Fateman wrote:

> C is not my favorite programming language .. see
>
> www.cs.berkeley.edu/~fateman/papers/software.pdf

But in many cases it *is* the favorite language of people with real problems to solve. To me, the primary purpose of a programming language is to put the power of the computer into the hands of the people who understand the problems. For scientific and engineering problems, C is remarkably good at this.

I disagree with your contention that Lisp has some sort of linguistic superiority that makes it immune to bugs. In the gEDA project, we use Lisp (Scheme dialect, Guile implementation) for scripting electronic design projects.  We see our share of bugs in this code. There are *plenty* of ways to implement subtle bugs in Lisp. Dynamic typing produces various run-time surprises, often missed in testing. Test cases may also miss faulty tail recursion, but then a really big project will overflow the heap. Even engineers out of MIT EECS, steeped in the SICP ideology, are often not very good at coding Lisp. Lisp code is very difficult to review, because in the real world the set of people who understand the problem domain generally has a very small intersection with the set of people who can read Lisp code.

> Nevertheless one can almost argue that if you know about
>
> how computers work on the assembly language level you have
>
> a modest chance of mapping C constructs to assembler-like
>
> code "in your head".  I've taught this as part of an
>
> undergraduate course in "Machine Structures".

Most C programmers I know cannot code in assembly language, but that really isn't very important. The key to expertise in C is understanding binary data representation.

> For EF, the number of unfamiliar operators and the
>
> number of distinct precedences is substantial.
>
>
>
> There is a table in the virtual book documentation "operation precedence"
>
> in the section Operator Input Forms.
>
>
>
>   There are roughly
>
> 69 different precedence categories listed.
>
>
>
> In some precedence classes there are many forms.
>
> For example in the category 4th from the bottom there are these
>
> operators which, being in the same class, would be parsed from
>
> left to right (or is it right to left?) anyway, here they are.
>
>
>
> =, :=, ^=, ^:=,  =. ->,
>
>    and also the matchfix
>
> /:   =
>
> /:  :=
>
>
>
> While some of the operators have no built-in meaning, and some are
>
> pretty obscure, they are all part of the syntax. There are also quite
>
> a few multi-character operators, some of which are new to me.. @@@ ?

These are not significant problems for those of us who use the language rather than fighting it. 

[toc] | [prev] | [next] | [standalone]


#13706

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-03-05 09:15 +0000
Message-ID<kh4d4b$709$1@smc.vnet.net>
In reply to#13695
On 3/3/2013 7:58 PM, John Doty wrote:
> On Sunday, March 3, 2013 12:21:31 AM UTC-7, Richard Fateman wrote:
>
>> C is not my favorite programming language .. see
>>
>> www.cs.berkeley.edu/~fateman/papers/software.pdf
>
> But in many cases it *is* the favorite language of people with real problems to solve.

For sure it is the favorite programming language of people who know
no other programming language.

It is certainly possible to write programs that have bugs or are
hard to understand in Lisp. For example, one cause of bugs is
that the programmer is incompetent.

  I think that article
is clear enough about how certain common errors in C programs
simply cannot happen in some other programming languages.

There are bugs that occur in EF that are probably impossible
to exhibit in any other programming language. Some of them
ready to bite the unwary.  sin(x) for example.
  <snip>
>
> These are not significant problems for those of us who use the language rather than fighting it.

I have a friend whose country house has electricity, gas,
telephone, and wifi/internet.
But he heats his house with a wood burning stove.
  He apparently does not find this a significant problem.
Sometimes there is no accounting for tastes.

RJF


[toc] | [prev] | [next] | [standalone]


#13728

FromVince Virgilio <blueschi@gmail.com>
Date2013-03-06 03:12 +0000
Message-ID<kh6c79$atr$1@smc.vnet.net>
In reply to#13681
On Tuesday, March 5, 2013 4:15:55 AM UTC-5, Richard Fateman wrote:
> ...
> 
> >> www.cs.berkeley.edu/~fateman/papers/software.pdf
> 
>   I think that article
> 
> is clear enough about how certain common errors in C programs
> 
> simply cannot happen in some other programming languages.
> 

Is this an argument for Big Government?

> ... 
> I have a friend whose country house has electricity, gas,
> 
> telephone, and wifi/internet.
> 
> But he heats his house with a wood burning stove.
> 
>   He apparently does not find this a significant problem.
> 
> Sometimes there is no accounting for tastes.

Vigorous exercise clears the mind. It's a tonic meant for just about everyone.

> RJF


Vince

[toc] | [prev] | [next] | [standalone]


#13688

FromBob Hanlon <hanlonr357@gmail.com>
Date2013-03-04 03:57 +0000
Message-ID<kh163a$s9n$1@smc.vnet.net>
In reply to#13674
"@@@ ?"

The operator @@@ has been used and explained multiple times on this
newsgroup and is documented in the Mathematica help.

Select @@@ then hit function key F1 and the search results includes a
link to the help page for the Apply function. The summary under the
link for Apply includes "f @@@ expr replaces heads at level 1 of expr
by f."  Looking under Details and Options on the Apply help page is
the statement "f@@@expr is equivalent to Apply[f, expr, {1}]". For
example,

data = Array[a, {3, 2}]

{{a[1, 1], a[1, 2]}, {a[2, 1], a[2, 2]}, {a[3, 1], a[3, 2]}}

f @@@ data

{f[a[1, 1], a[1, 2]], f[a[2, 1], a[2, 2]], f[a[3, 1], a[3, 2]]}

f @@@ data == (f @@ # & /@ data) ==
 Apply[f, data, 1] == Apply[f, data, {1}]

True


Bob Hanlon


On Sun, Mar 3, 2013 at 2:22 AM, Richard Fateman <fateman@cs.berkeley.edu> wrote:
> On 3/2/2013 12:44 AM, Bill Rowe wrote:
> ...
>
> <snip>
> I mostly agree with you!
>
>>
>> I agree Mathematica is different in a great many ways. And I can
>> see how someone experienced in say C or another language would
>> see Mathematica as strange and unusual. But I really don't see
>> the problem of understanding Mathematica symbols, precedence
>> etc. as being any different than learning pointers are other
>> aspects of C. It is simply a matter of study and using
>> Mathematica just as it is a case of study and using C to learn
>> pointers etc.
>>
>
> C is not my favorite programming language .. see
> www.cs.berkeley.edu/~fateman/papers/software.pdf
>
> Nevertheless one can almost argue that if you know about
> how computers work on the assembly language level you have
> a modest chance of mapping C constructs to assembler-like
> code "in your head".  I've taught this as part of an
> undergraduate course in "Machine Structures".
>
> For EF, the number of unfamiliar operators and the
> number of distinct precedences is substantial.
>
> There is a table in the virtual book documentation "operation precedence"
> in the section Operator Input Forms.
>
>   There are roughly
> 69 different precedence categories listed.
>
> In some precedence classes there are many forms.
> For example in the category 4th from the bottom there are these
> operators which, being in the same class, would be parsed from
> left to right (or is it right to left?) anyway, here they are.
>
> =, :=, ^=, ^:=,  =. ->,
>    and also the matchfix
> /:   =
> /:  :=
>
> While some of the operators have no built-in meaning, and some are
> pretty obscure, they are all part of the syntax. There are also quite
> a few multi-character operators, some of which are new to me.. @@@ ?
>
>   This is an attempt to document one of reasons I think EF is NOT just
> as easy to learn as any other language. I've previous mentioned other
> reasons which can be grouped generally under the category "semantics".
>
> RJF
>
>
>
>
>
>>
>
>

[toc] | [prev] | [next] | [standalone]


#13691

FromRichard Fateman <fateman@eecs.berkeley.edu>
Date2013-03-04 03:57 +0000
Message-ID<kh163q$sa3$1@smc.vnet.net>
In reply to#13674
On 3/3/2013 5:57 AM, Bob Hanlon wrote:
> "@@@ ?"
>
> The operator @@@ has been used and explained multiple times on this
> newsgroup and is documented in the Mathematica help.
/I'm a touch typist.
So I'm happy with examples like this ---

? Apply
   which  works

But

? @@@

returns Information::nomatch

To use your method I must remove at least one hand from the keyboard, 
scramble around to find
  the mouse and then hit f1 and then return my hand to the keyboard in 
order to  get the documentation.
This is a bad design.  I've mentioned it previously.  But that's really 
a different point.  There are
many 3-character non-alphabet sequences.  How many of them "mean" 
anything to you?

As for @@@ being explained multiple times in this newsgroup, maybe you 
should wonder why
(a) it should have to be explained even once
(b) why it should have to be explained multiple times.

Maybe it is not the most useful operation?  Maybe it is not the most 
euphonious operator?
see this excellent and very short clip
http://www.youtube.com/watch?v=wTDUuBWGtpU

from "Mars Attacks".

RJF





/
>
> Select @@@ then hit function key F1 and the search results includes a
> link to the help page for the Apply function. The summary under the
> link for Apply includes "f @@@ expr replaces heads at level 1 of expr
> by f."  Looking under Details and Options on the Apply help page is
> the statement "f@@@expr is equivalent to Apply[f, expr, {1}]". For
> example,
>
> data = Array[a, {3, 2}]
>
> {{a[1, 1], a[1, 2]}, {a[2, 1], a[2, 2]}, {a[3, 1], a[3, 2]}}
>
> f @@@ data
>
> {f[a[1, 1], a[1, 2]], f[a[2, 1], a[2, 2]], f[a[3, 1], a[3, 2]]}
>
> f @@@ data == (f @@ # & /@ data) ==
>   Apply[f, data, 1] == Apply[f, data, {1}]
>
> True
>
>
> Bob Hanlon
>
>
> On Sun, Mar 3, 2013 at 2:22 AM, Richard Fateman <fateman@cs.berkeley.edu> wrote:
>> On 3/2/2013 12:44 AM, Bill Rowe wrote:
>> ...
>>
>> <snip>
>> I mostly agree with you!
>>
>>> I agree Mathematica is different in a great many ways. And I can
>>> see how someone experienced in say C or another language would
>>> see Mathematica as strange and unusual. But I really don't see
>>> the problem of understanding Mathematica symbols, precedence
>>> etc. as being any different than learning pointers are other
>>> aspects of C. It is simply a matter of study and using
>>> Mathematica just as it is a case of study and using C to learn
>>> pointers etc.
>>>
>> C is not my favorite programming language .. see
>> www.cs.berkeley.edu/~fateman/papers/software.pdf
>>
>> Nevertheless one can almost argue that if you know about
>> how computers work on the assembly language level you have
>> a modest chance of mapping C constructs to assembler-like
>> code "in your head".  I've taught this as part of an
>> undergraduate course in "Machine Structures".
>>
>> For EF, the number of unfamiliar operators and the
>> number of distinct precedences is substantial.
>>
>> There is a table in the virtual book documentation "operation precedence"
>> in the section Operator Input Forms.
>>
>>    There are roughly
>> 69 different precedence categories listed.
>>
>> In some precedence classes there are many forms.
>> For example in the category 4th from the bottom there are these
>> operators which, being in the same class, would be parsed from
>> left to right (or is it right to left?) anyway, here they are.
>>
>> =, :=, ^=, ^:=,  =. ->,
>>     and also the matchfix
>> /:   =
>> /:  :=
>>
>> While some of the operators have no built-in meaning, and some are
>> pretty obscure, they are all part of the syntax. There are also quite
>> a few multi-character operators, some of which are new to me.. @@@ ?
>>
>>    This is an attempt to document one of reasons I think EF is NOT just
>> as easy to learn as any other language. I've previous mentioned other
>> reasons which can be grouped generally under the category "semantics".
>>
>> RJF
>>
>>
>>
>>
>>
>>


[toc] | [prev] | [next] | [standalone]


#13709

FromDavid Bailey <dave@removedbailey.co.uk>
Date2013-03-05 09:16 +0000
Message-ID<kh4d4r$70k$1@smc.vnet.net>
In reply to#13691
On 04/03/2013 03:57, Richard Fateman wrote:

> ? @@@
>
> returns Information::nomatch
Well it would - the ? operator works on function names, not their 
operator equivalents.
>
> To use your method I must remove at least one hand from the keyboard,
> scramble around to find
>    the mouse and then hit f1 and then return my hand to the keyboard in
> order to  get the documentation.

Hmm - that sounds like a lot of work!
?
>
> As for @@@ being explained multiple times in this newsgroup, maybe you
> should wonder why
> (a) it should have to be explained even once

Well I guess if everyone read and understood the entire documentation 
before posting on the newsgroup, 90% of the threads would vanish - but 
that would be true of just about all software support newsgroups.

> (b) why it should have to be explained multiple times.

Probably because people don't scan the entire back history of posts, 
before asking their question!
>
> Maybe it is not the most useful operation?  Maybe it is not the most
> euphonious operator?

I do think Mathematica could usefully exploit more extended characters 
as synonyms for operators like @@@ - just as they do for :> etc.

It is important to realise that anyone can understand any expression 
involving operators by using Hold and FullForm:

(f @@@ g) // Hold // FullForm

Hold[Apply[f,g,List[1]]]

David Bailey
http://www.dbaileyconsultancy.co.uk

[toc] | [prev] | [next] | [standalone]


#13726

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-03-06 03:13 +0000
Message-ID<kh6c93$b26$1@smc.vnet.net>
In reply to#13709
On 3/5/2013 1:16 AM, David Bailey wrote:
<snip>
>
> It is important to realise that anyone can understand any expression
> involving operators by using Hold and FullForm:
>
> (f @@@ g) // Hold // FullForm
>
> Hold[Apply[f,g,List[1]]]

I, of course, would suggest that one NOT use
(f@@@g)//Hold//FullForm

but

FullForm[Hold[f@@@g]]

1. My form is clearer, not using any additional mysterious-to-the-novice 
infix operations like //.

2. It is even shorter, using 2 fewer characters, as written.

3. It apparently requires less thought, because even you were, at least 
for the moment,  unsure of the precedence of // and so you inserted the
entirely unnecessary ()   around f@@g.

4. There is really no question of the precedence in my form.

5. The whole notion of a novice being required to know about
both Hold and FullForm in order to get an explanation for @@@
(or alternatively type f@@@g, select @@@ and hit F1),
(or alternatively type bare on a line @@@ and hit F1 -- a solution
that I found that did not require use of a mouse -- an improvement!)
is all too much.

I have not really heard an explanation for ?@@@
failing except that it is expected to fail by cognoscenti. My favorite
video commentary, previously cited, about such an approach
to the equivalence of bugs to features is "I meant to do that"...

http://www.youtube.com/watch?v=vJXU7EVXs2A

RJF

[toc] | [prev] | [next] | [standalone]


#13739

FromDavid Bailey <dave@removedbailey.co.uk>
Date2013-03-06 11:04 +0000
Message-ID<kh77sk$q9c$1@smc.vnet.net>
In reply to#13726
On 06/03/2013 03:13, Richard Fateman wrote:
> On 3/5/2013 1:16 AM, David Bailey wrote:
> <snip>
>>
>> It is important to realise that anyone can understand any expression
>> involving operators by using Hold and FullForm:
>>
>> (f @@@ g) // Hold // FullForm
>>
>> Hold[Apply[f,g,List[1]]]
>
> I, of course, would suggest that one NOT use
> (f@@@g)//Hold//FullForm
>
> but
>
> FullForm[Hold[f@@@g]]
>
> 1. My form is clearer, not using any additional mysterious-to-the-novice
> infix operations like //.
>
> 2. It is even shorter, using 2 fewer characters, as written.
>
> 3. It apparently requires less thought, because even you were, at least
> for the moment,  unsure of the precedence of // and so you inserted the
> entirely unnecessary ()   around f@@g.
Yes, I never use @@@, and convert it to an equivalent whenever I 
encounter it - but it is there for those that like it.
>
> 4. There is really no question of the precedence in my form.
>

So perhaps we should extend your principle to maths itself? Why risk 
students getting confused about the meaning of a + b c + d or f(a+b)- 
better to teach students to use a notation equivalent to FullForm! This 
principle would be even more useful when they got to calculus, where 
notations like dy/dx and integrals are hopelessly ambiguous in that the 
terminating dx looks superficially as if it could commute with the 
integrand! These notations probably often encourage students to perform 
invalid manipulations - but even so, most people value them!

I guess Mathematicians themselves realised why operator notation is so 
useful a long time back. It reduces the clutter and helps people to 
concentrate on what matters. Ultimately the choice between FullForm and 
operator form is a psychological question - not a math or computer 
science one. Those of us who do a lot of programming, also value 
operators that assist with that task too.

The Mathematica language offers users a lot of choice - which you seem 
to abhor because some people don't choose to use it your way!

David Bailey
http://www.dbaileyconsultancy.co.uk


[toc] | [prev] | [next] | [standalone]


#13744

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-03-07 08:58 +0000
Message-ID<kh9krn$1qu$1@smc.vnet.net>
In reply to#13739
On 3/6/2013 3:04 AM, David Bailey wrote:
<snip ... Fateman advocates preference for FullForm for some uses>
>
> So perhaps we should extend your principle to maths itself? Why risk
> students getting confused about the meaning of a + b c + d or f(a+b)-
> better to teach students to use a notation equivalent to FullForm!

This happens, to some extent, already. Students are advised to use
parentheses to try to limit ambiguity.  I've seen  power(x,y) instead
of x^y  if x and especially y are long strings. Most mathematical
functions are probably parenthesized prefix, eg sin cos tan atan sinh 
cosh.... There are a few where delimiters are kind of built in because
they are underlines or overlines like complex conjugate or
fractions.  It is only
in the case of + and * that infix becomes so prevalent.  Mathematica
of course makes a hash of this because sin(x) is a multiplication.

But in any case it is a false impression that mathematics beyond
(say) high-school level is presented in unambiguous formats.

This
> principle would be even more useful when they got to calculus, where
> notations like dy/dx and integrals are hopelessly ambiguous in that the
> terminating dx looks superficially as if it could commute with the
> integrand!

Actually this is not the problem, because context is a very big
  help, and we know that dy/dx is not the same as (d*y)/(d*x).  After
all, the d's would cancel producing y/x.
The real problem in integral tables and such is the REST of the
integral representation.  You will see  sin n x   or x/ 2 pi  .


  These notations probably often encourage students to perform
> invalid manipulations - but even so, most people value them!

Not the students.  It is just another burden on them.  Like the
people who try to enrich the calculus courses with (say) Mathematica.
The majority of students, according to surveys, do not view it
as enrichment but merely another thing to learn.  But that is
another story.

>
> I guess Mathematicians themselves realised why operator notation is so
> useful a long time back. It reduces the clutter and helps people to
> concentrate on what matters. Ultimately the choice between FullForm and
> operator form is a psychological question - not a math or computer
> science one. Those of us who do a lot of programming, also value
> operators that assist with that task too.

The nice thing about programming is that it gives you the opportunity
to name and re-use things like functions and subroutines.  It allows you
to do this to essentially arbitrary depth.  Hence "Solve" does whatever
it does, but you only have to remember one name.   Mathematics allows
you to do this, but you must keep the notation either on paper or in
your head, and it is not usually "in the computer".  In either case
the use of appropriate notation helps, and some would say is essential
in progress.
   That does not mean that all notation is good.  Some notation
increases the mental burden and may even increase the clutter. I have
read papers that advance the art and science not one millimeter, but
do nothing but lay claim to definitions and notations.  Some editors
mistakenly view this as progress.
>
> The Mathematica language offers users a lot of choice - which you seem
> to abhor because some people don't choose to use it your way!

No, I have no problem in people making choices.  I complain that the
design of the programming language EF is poor, at least in places. It 
encourages incorrect choices (bugs) and the production of
unnecessarily difficult-to-read programs.  Again I remind you that
I am talking about EF, not the library of
tools (like Solve).

RJF

>
> David Bailey
> http://www.dbaileyconsultancy.co.uk
>
>
>

[toc] | [prev] | [next] | [standalone]


#13703

FromRichard Fateman <fateman@eecs.berkeley.edu>
Date2013-03-05 09:15 +0000
Message-ID<kh4d3s$6vu$1@smc.vnet.net>
In reply to#13674
On 3/4/2013 7:34 AM, Murray Eisenberg wrote:
> On Mar 3, 2013, at 10:58 PM, Richard Fateman <fateman@eecs.berkeley.edu> wrote:
>
>> On 3/3/2013 5:57 AM, Bob Hanlon wrote:
>>> "@@@ ?"
>>>
>>> The operator @@@ has been used and explained multiple times on this
>>> newsgroup and is documented in the Mathematica help.
>> /I'm a touch typist.
>> So I'm happy with examples like this ---
>>
>> ? Apply
>>    which  works
>>
>> But
>>
>> ? @@@
>>
>> returns Information::nomatch
>>
>> To use your method I must remove at least one hand from the keyboard,
>> scramble around to find
>>   the mouse and then hit f1 and then return my hand to the keyboard in
>> order to  get the documentation.
> Aww -- such hardship!
Some people prefer better user interfaces to poorer user interfaces.  
Some people like central heating.
Some people like to chop wood and feed a stove.  There is no accounting 
for tastes.
> So much that I can barely understand why you'd even bother to use Mathematica -- except possible for the singular purpose of burdening this group with your many posts that don't actually help anybody to use Mathematica and don't make viable suggestions on how WRI might improve the product.
I think it is a perfectly valid suggestion to Wolfram that
? @@@

should work to produce documentation on @@@

If you think that there is a good reason to not do this, other than "oh, 
that would require some fixin' "  or
"It isn't supposed to do that."   then I'd be curious to hear it.

Generally when I find a bug in Mathematica I report it to Wolfram. I try 
not to burden this group
with mere bug reports -- after all, the vast majority of the readers are 
in no way responsible
for the bugs and are not in a position to fix them.   Occasionally a bug 
is amusing enough to
report here.

Occasionally WRI makes changes in Mathematica that correspond to 
suggestions that I've made.
Perhaps coincidence.

The fact that I occasionally mock Mathematica and Wolfram doesn't meant 
there is no content.


RJF


[toc] | [prev] | [next] | [standalone]


#13708

FromMurray Eisenberg <murray@math.umass.edu>
Date2013-03-05 09:16 +0000
Message-ID<kh4d4m$70i$1@smc.vnet.net>
In reply to#13674
On Mar 3, 2013, at 10:58 PM, Richard Fateman <fateman@eecs.berkeley.edu> wrote:

>
> On 3/3/2013 5:57 AM, Bob Hanlon wrote:
>> "@@@ ?"
>>
>> The operator @@@ has been used and explained multiple times on this
>> newsgroup and is documented in the Mathematica help.
> /I'm a touch typist.
> So I'm happy with examples like this ---
>
> ? Apply
>   which  works
>
> But
>
> ? @@@
>
> returns Information::nomatch
>
> To use your method I must remove at least one hand from the keyboard,
> scramble around to find
>  the mouse and then hit f1 and then return my hand to the keyboard in
> order to  get the documentation.

Aww -- such hardship! So much that I can barely understand why you'd even bother to use Mathematica -- except possible for the singular purpose of burdening this group with your many posts that don't actually help anybody to use Mathematica and don't make viable suggestions on how WRI might improve the product.
---
Murray Eisenberg                                    murray@math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305





[toc] | [prev] | [next] | [standalone]


#13747

FromJohn Doty <noqsiaerospace@gmail.com>
Date2013-03-07 08:58 +0000
Message-ID<kh9ks7$1r9$1@smc.vnet.net>
In reply to#13674
[Moderator Note:  This thread is now being closed.   Those users who
 want to continue the discussion should do it privately.]



On Wednesday, March 6, 2013 4:04:52 AM UTC-7, David Bailey wrote:
> On 06/03/2013 03:13, Richard Fateman wrote:

> > 4. There is really no question of the precedence in my form.
>
> So perhaps we should extend your principle to maths itself?

My old friend Bob Frankston liked precedence-free notation, so he made the first VisiCalc precedence-free. He now acknowledges this as a mistake: http://www.frankston.com/public/?name=implementingVisicalc

> This
>
> principle would be even more useful when they got to calculus, where
>
> notations like dy/dx and integrals are hopelessly ambiguous in that the
>
> terminating dx looks superficially as if it could commute with the
>
> integrand!

Yes, and that very ambiguity has inspired mathematicians to extend mathematics to embrace its implications. Consider "operational calculus". At several levels, that illustrates the profound differences between programming and mathematics. Consider that the word "function" can have have different definitions in different mathematical contexts, while to a programmer a function is simply a computable map. A user of a language, like Lisp, that treats functions as computable maps can't easily make contact with the more abstract properties of mathematical functions. You can't write DiracDelta[] in Lisp. It isn't a map, and cannot be computed. But expressions containing DiracDelta[] can sometimes be rewritten to eliminate it. Those rewriting rules are its implementation. That's the kind of thing that that Mathematica does that Lisp cannot (unless you write a language that's Mathematica-like in Lisp, but then you're no longer working in Lisp).

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web