Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13702 > unrolled thread
| Started by | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| First post | 2013-03-05 09:15 +0000 |
| Last post | 2013-04-02 07:26 +0000 |
| Articles | 7 — 7 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Mathematica and Lisp Bill Rowe <readnews@sbcglobal.net> - 2013-03-05 09:15 +0000
Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-03-06 03:13 +0000
Re: Mathematica and Lisp "djmpark" <djmpark@comcast.net> - 2013-03-06 10:54 +0000
Re: Mathematica and Lisp Richard Fateman <fateman@eecs.berkeley.edu> - 2013-03-06 10:54 +0000
Re: Mathematica and Lisp Christoph Lhotka <christoph.lhotka@univie.ac.at> - 2013-03-07 08:57 +0000
Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-03-07 08:58 +0000
Re: Mathematica and Lisp debguy <johnandsara2@cox.net> - 2013-04-02 07:26 +0000
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Date | 2013-03-05 09:15 +0000 |
| Subject | Re: Mathematica and Lisp |
| Message-ID | <kh4d3m$6vs$1@smc.vnet.net> |
On 3/3/13 at 10:58 PM, fateman@eecs.berkeley.edu (Richard Fateman)
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. This is a bad
>design.
Clearly, the current design isn't compatible with your desired
workflow. But that doesn't necessarily equate to "bad design".
It is less effort to look up the meaning of @@@ as described in
Mathematica than for someone unfamiliar with C to determine what
t=log(++u)+b will do.
If you don't care to remember the meaning of @@@ you are
certainly under no obligation to do so or even use this
notation. If it makes more sense to you, simply do
Apply[f, expr, {1}]
rather than
f@@@expr
The only advantage of @@@ is the saving of a few keystrokes and
perhaps improved readability for someone familiar with the
meaning of @@@.
>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?
Several. But then I use Mathematica extensively. Short cuts like
@@@ are convenient for me. Consequently, I use them rather
frequently and don't have any problem recalling their meaning.
>As for @@@ being explained multiple times in this newsgroup, maybe
>you should wonder why
>(a) it should have to be explained even once
Since it is not universal, it follows there needs to be at least
one explanation somewhere. And since quite a few posters here
haven't read much of the documentation, it follows strings of
characters such as @@@ won't be familiar to them prompting a
request for an explanation.
>(b) why it should have to be explained multiple times.
No matter how many times it is explained, there will always be
another new user encountering @@@ or some other short cut for
the first time prompting a new request for explanation.
The existence of multiple explanations in this forum for @@@
isn't an indication of "bad design". It is simply due to the
fact Mathematica uses certain strings as short cuts that don't
have meaning outside of Mathematica. The same situation exists
for virtually any programming language. That is for most if not
all programming languages you can find some sequence of
characters that have specific meaning in that language but not elsewhere.
Your comments here and elsewhere in this thread seem to amount
to Mathematica is not easy for a new or casual user to use
proficiently. If so, I agree. But I believe the same is true of
many other if not most other programming languages.
[toc] | [next] | [standalone]
| From | Richard Fateman <fateman@cs.berkeley.edu> |
|---|---|
| Date | 2013-03-06 03:13 +0000 |
| Message-ID | <kh6c84$b1k$1@smc.vnet.net> |
| In reply to | #13702 |
On 3/5/2013 1:15 AM, Bill Rowe wrote:
> Clearly, the current design isn't compatible with your desired
> workflow. But that doesn't necessarily equate to "bad design".
> It is less effort to look up the meaning of @@@ as described in
> Mathematica than for someone unfamiliar with C to determine what
> t=log(++u)+b will do.
To say that something else is even more inconvenient does not equate
with good design.
I think that using C documentation for looking up "++" is a lot
easier than say, noodling. (see the
article on noodling in wikipedia). That doesn't make the C
documentation "user friendly" or whatever descriptive term
you might prefer.
>
> If you don't care to remember the meaning of @@@ you are
> certainly under no obligation to do so or even use this
> notation. If it makes more sense to you, simply do
>
> Apply[f, expr, {1}]
>
> rather than
>
> f@@@expr
Frankly I've never found an opportunity to use Apply with a 3rd
argument (restricting its "level"). Perhaps I'm blinded by my
experience with Lisp, in which apply also exists but does not
have a level argument. It is just (apply function args)
>
> The only advantage of @@@ is the saving of a few keystrokes and
> perhaps improved readability for someone familiar with the
> meaning of @@@.
And decreased readability for someone unfamiliar with it and who
tries ? @@@ to get documentation.
>
>> 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?
>
> Several. But then I use Mathematica extensively. Short cuts like
> @@@ are convenient for me. Consequently, I use them rather
> frequently and don't have any problem recalling their meaning.
You use @@@ frequently? Or other shortcuts? I use many, such
as +, :=, ->, /., //, @ , ;. which are verbose otherwise, and
at least for the first few, are already familiar. That is, x+y+z
seems to be handy rather than Plus[x,y,z]. This compares to Lisp,
slightly longer at (+ x y z)
>> As for @@@ being explained multiple times in this newsgroup, maybe
>> you should wonder why
>
>> (a) it should have to be explained even once
>
> Since it is not universal, it follows there needs to be at least
> one explanation somewhere. And since quite a few posters here
> haven't read much of the documentation, it follows strings of
> characters such as @@@ won't be familiar to them prompting a
> request for an explanation.
Maybe if ?@@@ worked, they won't have to ask.
>
>> (b) why it should have to be explained multiple times.
>
> No matter how many times it is explained, there will always be
> another new user encountering @@@ or some other short cut for
> the first time prompting a new request for explanation.
The proper response might be, type ?@@@
>
> The existence of multiple explanations in this forum for @@@
> isn't an indication of "bad design".
Actually, I disagree. I think that is supportive evidence
of bad design that repeated explanations are needed.
It is simply due to the
> fact Mathematica uses certain strings as short cuts that don't
> have meaning outside of Mathematica. The same situation exists
> for virtually any programming language.
Sure. are they documented? do they make sense after being explained
once? (I think that u++ and ++u make sense after one explanation.)
That is for most if not
> all programming languages you can find some sequence of
> characters that have specific meaning in that language but not elsewhere.
Yes, but not so many, nor do they step on each others' feet quite
so much. e.g. .3/.3->4
>
> Your comments here and elsewhere in this thread seem to amount
> to Mathematica is not easy for a new or casual user to use
> proficiently. If so, I agree.
I think you read me correctly.
Though I would go further and say it is not easy for a person
attempting to make serious use, who attempts to use his/her
mathematical background and general knowledge of other
programming languages and (say) computer arithmetic to
make generalizations of how Mathematica should behave.
(simple example: why does Mathematica reverse the order
of arguments to arctan of 2 args?)
But I believe the same is true of
> many other if not most other programming languages.
But not all?
I try to make comparisons only with languages I am
familiar with.
RJf
>
>
[toc] | [prev] | [next] | [standalone]
| From | "djmpark" <djmpark@comcast.net> |
|---|---|
| Date | 2013-03-06 10:54 +0000 |
| Message-ID | <kh779c$pvo$1@smc.vnet.net> |
| In reply to | #13702 |
Reverse the order of what? ArcTan of one argument has only one argument and
how can that be reversed? What has two arguments is the coordinate
specification {x, y} and they are not reversed in ArcTan[x, y].
It is the one argument form ArcTan[y/x] that seems poorly designed and would
probably only be used when one knows the quotient and not x and y - so there
wouldn't be anything to reverse.
David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/index.html
From: Richard Fateman [mailto:fateman@cs.berkeley.edu]
(simple example: why does Mathematica reverse the order of arguments to
arctan of 2 args?)
RJf
[toc] | [prev] | [next] | [standalone]
| From | Richard Fateman <fateman@eecs.berkeley.edu> |
|---|---|
| Date | 2013-03-06 10:54 +0000 |
| Message-ID | <kh779h$pvs$1@smc.vnet.net> |
| In reply to | #13702 |
On 3/5/2013 7:54 PM, djmpark wrote:
> Reverse the order of what? ArcTan of one argument has only one argument and
> how can that be reversed? What has two arguments is the coordinate
> specification {x, y} and they are not reversed in ArcTan[x, y].
>
> It is the one argument form ArcTan[y/x] that seems poorly designed and would
> probably only be used when one knows the quotient and not x and y - so there
> wouldn't be anything to reverse.
>
>
> David Park
> djmpark@comcast.net
> http://home.comcast.net/~djmpark/index.html
>
>
>
>
> From: Richard Fateman [mailto:fateman@cs.berkeley.edu]
>
> (simple example: why does Mathematica reverse the order of arguments to
> arctan of 2 args?)
>
> RJf
>
>
ArcTan[x,y] in Mathematica gives the ArcTan[y/x] but in the correct
quadrant.
atan2 (y,x) in FORTRAN gives the arctangent of y/x). Note the order of
arguments.
in C++
in Pascal
in Java
in Lisp (atan y x)
in PHP
in Python v 3.3.0
in Ruby
I was able to find just one programming language that agrees with the
order in Mathematica.
That is Microsoft's Excel. Now it could be that compatibility with Excel is
more important than compatibility with those other languages. Google
docs has to
use the same order as Excel, but I think it is generally recognized as being
compatible with an error.
Just sayin'.
RJF
[toc] | [prev] | [next] | [standalone]
| From | Christoph Lhotka <christoph.lhotka@univie.ac.at> |
|---|---|
| Date | 2013-03-07 08:57 +0000 |
| Message-ID | <kh9kqn$1qb$1@smc.vnet.net> |
| In reply to | #13702 |
Dear group members,
At the beginning I did not want to enter this discussion at all, and
still I think it is not worthwhile doing so now.
I would just kindly like to ask you to give the right names for various
subject titles, and not to continue this thread under the one called "Mathematica and Lisp", since the content of your posts has nothing to do with this subject.
It is difficult enough to find the right information in the internet, one may be looking for, nowadays. If one tries to look up posts in this forum matching Lisp one is spammed by posts that have nothing to do with it.
This is annoying since Lisp and Mathematica are interesting subjects by themselves, and I would like to learn more about both of them.
I apologize that I have been entering your dispute about various things, and I hope you will find a common language soon.
Sincerely,
Christoph
On 03/06/2013 11:55 AM, Richard Fateman wrote:
> On 3/5/2013 7:54 PM, djmpark wrote:
>> Reverse the order of what? ArcTan of one argument has only one argument and
>> how can that be reversed? What has two arguments is the coordinate
>> specification {x, y} and they are not reversed in ArcTan[x, y].
>>
>> It is the one argument form ArcTan[y/x] that seems poorly designed and would
>> probably only be used when one knows the quotient and not x and y - so there
>> wouldn't be anything to reverse.
>>
>>
>> David Park
>> djmpark@comcast.net
>> http://home.comcast.net/~djmpark/index.html
>>
>>
>>
>>
>> From: Richard Fateman [mailto:fateman@cs.berkeley.edu]
>>
>> (simple example: why does Mathematica reverse the order of arguments to
>> arctan of 2 args?)
>>
>> RJf
>>
>>
> ArcTan[x,y] in Mathematica gives the ArcTan[y/x] but in the correct
> quadrant.
> atan2 (y,x) in FORTRAN gives the arctangent of y/x). Note the order of
> arguments.
> in C++
> in Pascal
> in Java
> in Lisp (atan y x)
> in PHP
> in Python v 3.3.0
> in Ruby
>
>
>
> I was able to find just one programming language that agrees with the
> order in Mathematica.
> That is Microsoft's Excel. Now it could be that compatibility with Excel is
> more important than compatibility with those other languages. Google
> docs has to
> use the same order as Excel, but I think it is generally recognized as being
> compatible with an error.
> Just sayin'.
> RJF
>
>
>
>
>
>
>
>
>
[toc] | [prev] | [next] | [standalone]
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Date | 2013-03-07 08:58 +0000 |
| Message-ID | <kh9kri$1qs$1@smc.vnet.net> |
| In reply to | #13702 |
The order of arguments of the 2-argument ArcTan seems to me merely an arbitrary choice.
I cannot imagine why anybody would make the slightest fuss about it. Unless, that is, he's just determined to find things in Mathematica to carp about.
On Mar 6, 2013, at 5:55 AM, Richard Fateman <fateman@eecs.berkeley.edu> wrote:
> On 3/5/2013 7:54 PM, djmpark wrote:
>> Reverse the order of what? ArcTan of one argument has only one argument and
>> how can that be reversed? What has two arguments is the coordinate
>> specification {x, y} and they are not reversed in ArcTan[x, y].
>>
>> It is the one argument form ArcTan[y/x] that seems poorly designed and would
>> probably only be used when one knows the quotient and not x and y - so there
>> wouldn't be anything to reverse.
>>
>>
>> From: Richard Fateman [mailto:fateman@cs.berkeley.edu]
>>
>> (simple example: why does Mathematica reverse the order of arguments to
>> arctan of 2 args?)
>>
>>
> ArcTan[x,y] in Mathematica gives the ArcTan[y/x] but in the correct
> quadrant.
> atan2 (y,x) in FORTRAN gives the arctangent of y/x). Note the order of
> arguments.
> in C++
> in Pascal
> in Java
> in Lisp (atan y x)
> in PHP
> in Python v 3.3.0
> in Ruby
>
>
>
> I was able to find just one programming language that agrees with the
> order in Mathematica.
> That is Microsoft's Excel. Now it could be that compatibility with Excel is
> more important than compatibility with those other languages. Google
> docs has to
> use the same order as Excel, but I think it is generally recognized as being
> compatible with an error.
> Just sayin'.
---
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]
| From | debguy <johnandsara2@cox.net> |
|---|---|
| Date | 2013-04-02 07:26 +0000 |
| Message-ID | <kje173$h0i$1@smc.vnet.net> |
| In reply to | #13702 |
I don't think studying Lisp is necessary unless you are using lisp
through Run[].
Study Mathematica Book is all.
my bookmark senses say...
avoid Haskell: it's not mature, not much used, or well laid out.
Standard ML is worth a review abstract language just as much as Lisp
is.
http://en.wikipedia.org/wiki/Standard_ML
Finally. Mathematica's inner C language, smp, is worth a quick
review. Look into Mathematica's history. They used X windows,
Postscript, ideas and abilities from many languages and gui toolkits.
Amazing how it all came together. But smp drives the language part.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web