Mathematica 6.0 Changes Everything

  • Mathematica
  • Thread starter Crosson
  • Start date
  • Tags
    Mathematica
In summary: I find distinct applications for both. I use both daily. If I had to give up one, though, it'd be Mathematica.
  • #1
Crosson
1,259
4
Wolfram Research has unveiled the new Mathematica 6.0, heralding it as their most significant product since its first release twenty years ago .

Mathematica 5.2 was already the #1 technical computing software, and was also gaining ground in new market areas, replacing cobwebs of specialized packages. Now I see it replacing loads more software:

http://www.wolfram.com/products/mathematica/newin6/ [Broken]

IMO the most incredible part is the way that the core Mathematica system has adapted the changes. The goal has always been to integrate as many features of technical computing as possible in a coherent and unified way. In the long run, I think Wolfram Research will be the only ones computing with Microsoft on the unified front, and by the looks of how smooth the current addition of functionality is with version 6, I think they will be come out ahead on the coherent front.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
You sound like an ad.

I'm sure it will never replace Matlab, but I'm curious if they're trying to.
 
  • #3
Xezlec said:
You sound like an ad.

Pardon me for being excited, only time will tell the true impact of this software.

I'm sure it will never replace Matlab, but I'm curious if they're trying to.

Your right; after all, there are hundreds of millions of lines of COBOL (business language circa 1965) in use, more than mathematica and MATLAB combined.

Out of curiosity, I wonder what Matlab does better then Mathematica? I have student versions of both, I'd love to see Matlab do something well.
 
  • #4
MATLAB is almost complementary to Mathematica. Anything that one does well, the other tends to do pretty poorly. MATLAB is excellent for any kind of numerical calculation, and does a very good job of automating many engineering tasks (like developing digital filters, or simulating a control loop). Mathematica, on the other hand, excels at symbolic computation and plotting features. MATLAB does include a symbolic toolbox, which is identical to Maple, but it's pretty kludgy compared to Mathematica.

MATLAB is also much easier for most people to pick up -- it uses simple syntax and only has one data type: matrices of double-precision floating point numbers, which are incredibly easy to grasp. Mathematica, on the other hand, pretty much treats everything like a symbol. Mathematica sometimes makes it pretty hard to tell what the hell is going on internally, since it uses some incredibly complicated data structures, but MATLAB tends to be clear as a bell, since every intermediate result is just another matrix, which you can just view directly.

To take a real-world example: if you want to numerically integrate a complicated real integral, for example, MATLAB can do it in a couple of lines of code that almost anyone can figure out in a couple of minutes. Mathematica will probably bog you down in a ton of mostly annoying complaints about whether or not constants are real, etc, requiring you to continually revise your instructions until you've got 12 pairs of nested braces to deal with. The syntax can be so frustrating that even I, with 15 years of programming experience, often have to scratch my head and go thumb through users' guides.

I find distinct applications for both. I use both daily. If I had to give up one, though, it'd be Mathematica.

- Warren
 
Last edited:
  • #5
MATLAB can do it in a couple of lines of code that almost anyone can figure out in a couple of minutes.

Your right, Matlab will return a number ("do it" as you say).

Mathematica will probably bog you down in a ton of mostly annoying complaints about whether or not constants are real, etc, requiring you to continually revise your instructions until you've got 12 pairs of nested braces to deal with.

Wait a minute, are we talking about a numerical integral (NIntegrate), or a symbolic integral (Integrate) ?

If it was a numeric integral, then every symbol needs a value, and I don't see why it would then wonder if these values were real (since they evaluate to literals).

If you attempt to numerically integrate a function containing symbolic parameters, it says `Integrand is not numeric'. If you attempt such an integral symbollically, it is sometimes the case that the result depends on the domain of the parameters (e.g. it converges for some values and not others).

Here is an example:

Code:
Integrate[ Exp[ -a x^2] , {x, 0 , Infinity}]

[tex]\text{If}\left[\Re(a)>0,\frac{\sqrt{\pi }}{2 \sqrt{a}},\text{Integrate}\left[e^{-a x^2},\{x,0,\infty
   \},\text{Assumptions}\to \Re(a)\leq 0\right]\right][/tex]

If we would rather receive a result, with no concern for correctness we may do:

Code:
Integrate[ Exp[ -a x^2] , {x, 0 , Infinity}, GenerateConditions->False]

[tex]\frac{\sqrt{\pi }}{2 \sqrt{a}}[/tex]

Here is another solution, which I prefer because it is less blind (recall that the underscore _ matches any pattern):
Code:
Integrate[ Exp[ -a x^2] , {x, 0 , Infinity}, Assumptions->(_ > 0)]

[tex]\frac{\sqrt{\pi }}{2 \sqrt{a}}[/tex]

No offense, but it looks like you are arguing against Mathematica because its difficult to learn. But why would anyone learn Mathematica and Matlab, when they can do it all in Mathematica? I could understand if someone learned Matlab, and then realized they needed extra features of mathematica (symbolics, graphics, typesetting, multi-paradigmatic programming, etc), how that person would continue in a limbo of using both softwares. But as someone who knows Mathematica, but is forced to use Matlab to communicate with people who don't, I wish Matlab would go away.
 
  • #6
Crosson said:
No offense, but it looks like you are arguing against Mathematica because its difficult to learn.

I'm not arguing against either package. I use both almost daily, so obviously I find some value in Mathematica.

Mathematica's learning curve is extremely steep, but that's only part of the problem.

But why would anyone learn Mathematica and Matlab, when they can do it all in Mathematica?

Say what? It sounds like you've never used MATLAB. Look up the controls toolbox, the signal processing toolbox, Simulink, GUIDE, the C++ connectivity, and many other features which Mathematica simply has no analogue. Mathematica 6.0 appears to be trying to address some of these shortcomings, and if it does so successfully, I may begin to use it for more things. At the moment, I see the two programs as being almost polar opposites in fundamental approach: Mathematica is stodgy and academic and rigorous, for good reason. MATLAB is easy and free-wheeling and, while a little sloppy sometimes, immimently useful in an engineering context.

But as someone who knows Mathematica, but is forced to use Matlab to communicate with people who don't, I wish Matlab would go away.

If the additional features provided by MATLAB are not useful to you, I can understand why you'd like to stick to Mathematica. On the other hand, it's just plain fact that there are many, many things with are easy to do in MATLAB, yet are difficult or impossible to do in Mathematica. (To be fair, that's also true vice versa.) That's the reason the two products continue to exist side-by-side on the shelves -- not because people are too stupid to realize Mathemetica is plainly better.

- Warren
 
  • #7
Look up the controls toolbox, the signal processing toolbox, Simulink, GUIDE, the C++ connectivity, and many other features which Mathematica simply has no analogue.

All of these features are availible in Mathematica, so it is incorrect to say there is "no analogue" (in the sense that Matlab has no analogue for symbolic solutions of ODEs).

The Mathlink protocol can be used to establish two way communication between C++ apps and the mathematica kernel. In fact, I can pass models from Simulink into mathematica (I don't care for the diagram interface).

Mathematica has always had the ability to create real-time GUIs, but until now it always required java (just as GUIDE requires C++) and manual coding (unlike GUIDE) . The GUI creation system in mathematica 6 looks to be the most streamlined I have seen anywhere, but we will see.

Mathematica is stodgy and academic and rigorous, for good reason. MATLAB is easy and free-wheeling and, while a little sloppy sometimes, immimently useful in an engineering context. That's the reason the two products continue to exist side-by-side on the shelves -- not because people are too stupid to realize Mathemetica is plainly better.

Your right, I was too stupid to realize that there is room for both products. I have been blinded by naively pure academic inclinations, without concern for brutal practicalities. Matlab is much cheaper, and much better suited to the field of engineering for ever reason: the engineers, the type of work they do, and the way they do it. It will take many more upgrades to Mathematica before it will begin encroach on this domain of application.
 
  • #8
Crosson said:
All of these features are availible in Mathematica, so it is incorrect to say there is "no analogue" (in the sense that Matlab has no analogue for symbolic solutions of ODEs).

What are you talking about, man? Mathematica has no package for creating digital filters. If I'm wrong, prove it.

The Mathlink protocol can be used to establish two way communication between C++ apps and the mathematica kernel.

Okay, I'll concede this one.

In fact, I can pass models from Simulink into mathematica (I don't care for the diagram interface).

There are various mechanisms to make MATLAB talk to Mathematica, but that doesn't change the fact that, in isolation, Mathematica has nothing even resembling Simulink.

Mathematica has always had the ability to create real-time GUIs, but until now it always required java (just as GUIDE requires C++)

You know what, Crosson? You have no idea what you're talking about. Why are you arguing this? You apparently know far too little about MATLAB to give it any fair comparison. GUIDE is MATLAB's graphical GUI development environment. It requires no C++, nor any kind of hand-coding.

and manual coding (unlike GUIDE) . The GUI creation system in mathematica 6 looks to be the most streamlined I have seen anywhere, but we will see.

The lack of competent GUI tools in Mathematica is a major handicap, and it always has been. I'm happy to see that Wolfram has decided to stop trying to sell the world on his deranged cellular automata obsession, and has instead decided to improve his software.

Your right, I was too stupid to realize that there is room for both products. I have been blinded by naively pure academic inclinations, without concern for brutal practicalities. Matlab is much cheaper, and much better suited to the field of engineering for ever reason: the engineers, the type of work they do, and the way they do it. It will take many more upgrades to Mathematica before it will begin encroach on this domain of application.

Are you actually rescinding your statement that Mathematica can do everything MATLAB can do? Or are you just being cheeky?

- Warren
 
  • #9
What are you talking about, man? Mathematica has no package for creating digital filters. If I'm wrong, prove it.

I said it was unfair to say it has "no analogue", I agree that Matlab has superior packages for creating filters, but it is totally false to say Mathematica has "no analogue". Here I will refer you to built-in tools for signal processing, although there are many 3rd - party packages for doing so.

http://documents.wolfram.com/applications/signals/index.html [Broken]

There are various mechanisms to make MATLAB talk to Mathematica, but that doesn't change the fact that, in isolation, Mathematica has nothing even resembling Simulink.

I don't like the GUI for simulink, but the built-in libraries are valuable. You can get something similar from MathModelica:

MathModelica System Designer Professional makes it possible to develop advanced multiengineering models by simple drag-and-drop construction, making it an ideal platform for multiengineering simulation and model-based design of dynamic systems. It also provides an interactive graphical environment and a customizable set of component libraries.

http://www.wolfram.com/products/applications/mathmodelica/ [Broken]

Again, all of this is to show how wrong you are in saying "no analogue" and "nothing resembling", that is a total mischaracterization. When I say that Matlab has no analogue to symbolic differential equation solving, I mean that it would take 10 years to develop an inferior package to do this task, not that there are existing packages on the market that are nearly as good.

You know what, Crosson? You have no idea what you're talking about. Why are you arguing this? You apparently know far too little about MATLAB to give it any fair comparison. GUIDE is MATLAB's graphical GUI development environment. It requires no C++, nor any kind of hand-coding.

I don't appreciate the personal attack, especially when you misread my post. I clearly said that GUI creation in Mathematica required manual coding, unlike GUIDE. Upon review I was not as clear as I could have been. My further point is that I don't like to click through a "wizard" to make my interfaces, I would rather create it by typing a few lines as in Mathematica 6 (which also includes wizards, btw).

You apparently know far too little about MATLAB to give it any fair comparison.

I did, afterall, ask the community to provide examples where Matlab is superior. But I do know enough to object to your "no analogue" claim, and that's what I did.

Are you actually rescinding your statement that Mathematica can do everything MATLAB can do? Or are you just being cheeky?

No I am not rescinding, I am saying that you have shown me that there is room for both softwares on the shelf. That Matlab is the best choice for engineers. I am not being cheeky, with your help I realized how the appeal of Mathematica is academic. As an example, I briefly considered defending my "everything the other can do" by saying that they are both Turing Complete (ha!), then I realized that, left to myself, my criterion for evaluating software is very abstract.
 
Last edited by a moderator:
  • #10
Crosson said:
I don't like the GUI for simulink, but the built-in libraries are valuable. You can get something similar from MathModelica:

I don't really think it's fair to start including third-party packages in this discussion. After all, when I assert "Mathematica can't do this," I mean Mathematica itself. If you want to redefine the word "Mathematica" to mean "Mathematica itself and everything ever written on top of it," then fine -- but that's not how we began this discussion.

When I say that Matlab has no analogue to symbolic differential equation solving,

...Except it has a built-in symbolic library which includes ode solvers. Open MATLAB and type 'help desolve':

Code:
>> help dsolve
 DSOLVE Symbolic solution of ordinary differential equations.
    DSOLVE('eqn1','eqn2', ...) accepts symbolic equations representing
    ordinary differential equations and initial conditions.  Several
    equations or initial conditions may be grouped together, separated
    by commas, in a single input argument.
 
    By default, the independent variable is 't'. The independent variable
    may be changed from 't' to some other symbolic variable by including
    that variable as the last input argument.
 
    The letter 'D' denotes differentiation with respect to the independent
    variable, i.e. usually d/dt.  A "D" followed by a digit denotes
    repeated differentiation; e.g., D2 is d^2/dt^2.  Any characters
    immediately following these differentiation operators are taken to be
    the dependent variables; e.g., D3y denotes the third derivative
    of y(t). Note that the names of symbolic variables should not contain
    the letter "D".
 
    Initial conditions are specified by equations like 'y(a)=b' or
    'Dy(a) = b' where y is one of the dependent variables and a and b are
    constants.  If the number of initial conditions given is less than the
    number of dependent variables, the resulting solutions will obtain
    arbitrary constants, C1, C2, etc.
 
    Three different types of output are possible.  For one equation and one
    output, the resulting solution is returned, with multiple solutions to
    a nonlinear equation in a symbolic vector.  For several equations and
    an equal number of outputs, the results are sorted in lexicographic
    order and assigned to the outputs.  For several equations and a single
    output, a structure containing the solutions is returned.
 
    If no closed-form (explicit) solution is found, an implicit solution is
    attempted.  When an implicit solution is returned, a warning is given.
    If neither an explicit nor implicit solution can be computed, then a
    warning is given and the empty sym is returned.  In some cases involving
    nonlinear equations, the output will be an equivalent lower order
    differential equation or an integral.
 
    Examples:
 
       dsolve('Dx = -a*x') returns
 
         ans = C1*exp(-a*t)
 
       x = dsolve('Dx = -a*x','x(0) = 1','s') returns
 
         x = exp(-a*s)
 
       y = dsolve('(Dy)^2 + y^2 = 1','y(0) = 0') returns
  
         y =
         [  sin(t)]
         [ -sin(t)]
 
       S = dsolve('Df = f + g','Dg = -f + g','f(0) = 1','g(0) = 2')
       returns a structure S with fields
 
         S.f = exp(t)*cos(t)+2*exp(t)*sin(t)
         S.g = -exp(t)*sin(t)+2*exp(t)*cos(t)
 
       dsolve('Dy = y^2*(1-y^2)') returns
 
       Warning:Explicit solution could not be found; implicit solution returned.
 
       ans =
       t+1/2*log(y-1)-1/2*log(y+1)+1/y+C1=0
 
       dsolve('Df = f + sin(t)', 'f(pi/2) = 0')
       dsolve('D2y = -a^2*y', 'y(0) = 1, Dy(pi/a) = 0')
       S = dsolve('Dx = y', 'Dy = -x', 'x(0)=0', 'y(0)=1')
       S = dsolve('Du=v, Dv=w, Dw=-u','u(0)=0, v(0)=0, w(0)=1')
       w = dsolve('D3w = -w','w(0)=1, Dw(0)=0, D2w(0)=0')
       y = dsolve('D2y = sin(y)'); pretty(y)
 
    See also solve, subs.


    Reference page in Help browser
       doc dsolve

- Warren
 
  • #11
chroot said:
MATLAB is also much easier for most people to pick up -- it uses simple syntax and only has one data type: matrices of double-precision floating point numbers

False. MATLAB has cell arrays, tuples, structures, objects, strings, etc. And matrices can be in any of a wide range of numeric data types and sizes. Double precision is just the default. Where I work, we routinely switch large matrices between different data types to save space and to read/write certain file formats. Does Mathematica have good, efficient ways of dealing with multi-gigabyte arrays?

The low cost thing seems important. We have hundreds of MATLAB licenses. Also, speed is critical for us (we run insanely long and large processing jobs). How fast is Mathematica? I honestly don't know -- I've never used it.

Another thing I'm curious about: is Mathematica easy to program and debug? We write a lot of code, and MATLAB gets used as sort of a quick-and-dirty language, and a "glue" language like Perl (our numeric calculations are for real-world stuff, and have to get "hooked up" to other systems and software in the real world).

Programmer time can be expensive. MATLAB's code editors, profilers, optimiaztion tools, and debuggers are excellent. How easily could I write a weird-text-file-format-to-XML translator in something like Mathematica?

I'm just askin'.

EDIT: By the way, I've never heard anyone where I work say "gee, I wish I had software to solve this differential equation symbolically". I mean, do people still do that? Most real-world DEs don't even have closed-form solutions, right? And what use would they be if they did? The first thing you'd do is plot the solution numerically, anyway!
 
Last edited:
  • #12
The low cost thing seems important. We have hundreds of MATLAB licenses. Also, speed is critical for us (we run insanely long and large processing jobs). How fast is Mathematica? I honestly don't know -- I've never used it.

Mathematica and Matlab are similar in performance. Mathematica has a few performance pitfalls, but so does Matlab. If programmed correctly, either one can be within 10 to 100 times slower than Fortran.

As far as cost, I really like the cost of Matlab. The student cost of Mathematica is a miracle, but the professional cost is appalling.

Another thing I'm curious about: is Mathematica easy to program and debug? We write a lot of code, and MATLAB gets used as sort of a quick-and-dirty language, and a "glue" language like Perl (our numeric calculations are for real-world stuff, and have to get "hooked up" to other systems and software in the real world).

By any reasonable measure, the Mathematica programming language is the most advanced in the world. Leaving aside the libraries of built in functions, the core language is extremely powerful. The weird-text-file-format-to-XML translator is a project for which Mathematica is ideally suited. The pattern matching features make it so that parsing foreign source is as straight forward as inputing the translation rules in virtually human readable form. You could write a semantically intact compiler for a language like BASIC using less than 20 lines of Mathematica code.

By the way, I've never heard anyone where I work say "gee, I wish I had software to solve this differential equation symbolically". I mean, do people still do that? Most real-world DEs don't even have closed-form solutions, right? And what use would they be if they did? The first thing you'd do is plot the solution numerically, anyway!

Mathematica will find solutions to most systems of ODEs (forget about symbolic PDEs except for academic interest) in terms of the worlds largest catalogue of special functions. This is useful for many real-world applications, where it is often important to determine the "eigenvalues" of a high dimensional ODE system with boundary conditions, and this is not always numerically straight forward. Symbolic solutions can also be useful for design purposes, which is one reason to use Matlab and Mathematica together (passing simulink models for symbolic processing).

Except it has a built-in symbolic library which includes ode solvers.

Our different ways of looking at the meaning of "built-in" and "part of a sytem" show the differences in the practical vs academic viewpoint. To me the Matlab symbolic functionality is not "part of Matlab" because it is an unplanned add-on licensed from a 3rd party (maplesoft). To you this is absurd, since it's there and it gets the job done. Too me, it is like a sore thumb, just like many parts of Matlab (highly practical parts!). On the other hand Mathematica has such general principles behind its uniform structure of expressions that every package I have used (mostly free ones) fits in seamlessly.
 
Last edited:
  • #13
Crosson said:
By any reasonable measure, the Mathematica programming language is the most advanced in the world.

This gave me a chuckle. What languages are you comparing it against? What features make it so much better?

You could write a semantically intact compiler for a language like BASIC using less than 20 lines of Mathematica code.

I'd love to see this. Do you even understand what exactly the word 'compiler' means?

Our different ways of looking at the meaning of "built-in" and "part of a sytem" show the differences in the practical vs academic viewpoint. To me the Matlab symbolic functionality is not "part of Matlab" because it is an unplanned add-on licensed from a 3rd party (maplesoft).

It all comes in one box, and it gives you the same answer Mathematica would give you. What's wrong with it? Some sense of "design aesthetics" getting in your way? To me, Mathematica's syntax is a programmer's vision of hell -- it rails against my sense of design aesthetics. Yet I still feel that Mathematica is a very valuable program...

- Warren
 
  • #14
This gave me a chuckle. What languages are you comparing it against? What features make it so much better?

I'm so glad you asked. I wonder how much you know about the design issues of programming languages? I ask because most of your arguments in favor of Matlab are not programming language issues, they are issues having to do with availible libraries. This is not interesting to me; the C language does not include Input/Output, so someone else has to write the library, but this does not have weight in the discussion of C as a language.

1) Mathematica has fully integrated support for all programming paradigms - Functional, Logical, Procedural and Object Oriented. (Do you know 5 examples of each type of language?)

2) Full support for pattern matching and high-level replacement rules. Patterns can be created to match any data structure, and replacement rules can search for and operate on any class of datastructures, anywhere inside of a larger datastructure. To give you an example, I am working on an AI simulation that has to recognize a data structure that is not entirely known at compile time! It builds the pattern, and proceeds to use it, at run-time. No other general purpose language can do this in such a concise manner, and I am only aware of comparable pattern matching abilities in a few special purpose research languages.

3) Programs and data are treated on the same footing, they are all called expressions. There is a uniform structure of expressions, they are all built from atoms by composition of functions. This leads to an unequaled level of orthogonality and transparency of semantics.

4) The syntax that you dislike:

Some sense of "design aesthetics" getting in your way? To me, Mathematica's syntax is a programmer's vision of hell -- it rails against my sense of design aesthetics.
I am interested in functionality, not aesthetics. I have long argued that the language C is so named for the word "Cool", because if pressed, most of its proponents will cite its syntax as asthetic (and other reasons). To my epistemology this is laughable, I think our minds can acclimate to arbitrarily complex syntax. More practically, I bet there was a time when mathematical equations and symbolics looked very differently to you then they do now.

I will pick on Matlab. In various contexts, the appearance of A(5) can be interpreted as:

a) Call the function A and pass it the parameter 5.

b) Access the 5th element of the array A by index.

Now is there a conceptual reason for this? Can a be seen as a special case of b, or vice versa? No, because there is a clear divide between data and functions. In other words, the justification for this syntax is convenience and aesthetics. This rails against my sense of design ISSUES.

I could continue on in this manner, but its too easy because the claim I am supporting is true.
I'd love to see this. Do you even understand what exactly the word 'compiler' means?

You seem very derogatory towards me. A compiler is a system that translates source code into machine instructions. It looks like you don't know what an interpretive compiler is, and you think compilation is all about producing executable files - that's fine, from your non-academic perspective I don't think you would be interested in an elegant system for doing lexical analysis of a small "toy" language like BASIC.
 
Last edited:
  • #15
Crosson said:
I'm so glad you asked. I wonder how much you know about the design issues of programming languages?

*Yawn*

I've been programming computers for 17 years. I learned a language called HyperTalk back in the day, then moved to C, C++ (even before it became an ANSI standard). Later, I moved into Java and Perl, then Python and Ruby. I have experience in a handful of shell scripting languages, plus a number of niche languages like Tcl/Tk and PHP. (You do realize I coded all of the custom parts of this very site... don't you?)

If you're interested to see just how much I know about "design issues" involved in programming, here's a screen shot of some of my professional work:

http://www.virtualcivilization.org/WaveVision.jpg [Broken]

1) Mathematica has fully integrated support for all programming paradigms - Functional, Logical, Procedural and Object Oriented. (Do you know 5 examples of each type of language?)

What is this, a quiz? Do you really think you're so much smarter than me that you can talk down to me? :rofl:

2) Full support for pattern matching and high-level replacement rules. Patterns can be created to match any data structure, and replacement rules can search for and operate on any class of datastructures, anywhere inside of a larger datastructure. To give you an example, I am working on an AI simulation that has to recognize a data structure that is not entirely known at compile time! It builds the pattern, and proceeds to use it, at run-time. No other general purpose language can do this in such a concise manner, and I am only aware of comparable pattern matching abilities in a few special purpose research languages.

Manipulating a data structure not known at compile-time?! Oh wow! What a challenge! :rolleyes: Python can. Ruby can. Get real, man. Duck-typing and weak-typing have been around for decades. You're just showing your ignorance.

3) Programs and data are treated on the same footing, they are all called expressions. There is a uniform structure of expressions, they are all built from atoms by composition of functions. This leads to an unequaled level of orthogonality and transparency of semantics.

Oooh, teacher, explain to me what an expression is!

I am interested in functionality, not aesthetics. I have long argued that the language C is so named for the word "Cool", because if pressed, most of its proponents will cite its syntax as asthetic (and other reasons).

C has some of the most archaic and unintuitive syntax on the planet. If you really think programmers think C has "cool syntax," you're clueless. There's really no better way to say this: you're clueless.

To my epistemology this is laughable, I think our minds can acclimate to arbitrarily complex syntax.

Did you just get hit in the face with a thesaurus, or what? What's with this motivation to constantly sound superior to other people? Again, I'll ask you directly: do you think you're smarter than me? If not, drop the attitude. It's just making you look like a dweeb.

I will pick on Matlab. In various contexts, the appearance of A(5) can be interpreted as:

a) Call the function A and pass it the parameter 5.

b) Access the 5th element of the array A by index.

Indeed, MATLAB's syntax is inconsistent and sometimes downright weird. That would be a major flaw, if you were to consider it a general-purpose language... except it isn't. Neither is Mathematica. If you'll note, I never said MATLAB's syntax was ideal or even aesthetically pleasing -- I only said that it's syntax is easy to pick up. Almost any newbie can read a MATLAB program and understand what's going on. Moreover, they can almost always start modifying it straight away and get something useful out of it. In a constantly-changing market with constantly-changing collaborations between different companies and different groups, this is incredibly important. It's worth it to have a messy, incosistent language sometimes, because people can immediately understand it.

You seem very derogatory towards me. A compiler is a system that translates source code into machine instructions. It looks like you don't know what an interpretive compiler is, and you think compilation is all about producing executable files - that's fine, from your non-academic perspective I don't think you would be interested in an elegant system for doing lexical analysis of a small "toy" language like BASIC.

A compiler produces machine code. That's a definition. It's not my definition. It's the definition. The reason I'm calling you out is because lately all your posts seem to be is a bunch of big words and academic chest-beating interspersed with very few facts, half of which you've gotten wrong. If only your arguments were more sound, there'd be no need to inquire of you whether or not you know what a compiler is.

And if all you're talking about is a goddamn BASIC lexer, of course I don't care! I can write that in far fewer than 20 lines using ANTLR or even flex, both of which are F-R-E-E!

- Warren
 
Last edited by a moderator:
  • #16
It's worth it to have a messy, incosistent language sometimes, because people can immediately understand it.

The unexamined life is not worth living. If all your experience has taught you anything, how about this: messy inconsistencies die hard.

I am trying to talk about how a top tier product, relevant to members on this board, has under gone a dramatic upgrade to become something that is new, and I think will have an increasing impact with time. Furthermore, I am alluding to the way that the excellent design and organization of Mathematica made this upgrade possible, a milestone in the history of software progression.

There's really no better way to say this: you're clueless.

I can't discuss how smart anybody is, and I can't discuss how much experience you have, all I can discuss with you are facts and insights. I thought that this forum was not a place for personal attacks, I'm honestly hurt that you are so mean to me. You imply that you are doing a service to everyone by "calling me out".

Edit - Just stop attacking me. I don't want any more personal attacks. If you want to have an argument (a logically connected sequence of facts intended to establish a proposition) then please begin doing so. Just cool it on the personal language, and stop attacking me.
 
Last edited:
  • #17
A compiler produces machine code. That's a definition. It's not my definition. It's the definition.

I'm sorry Chroot, its just your definition.

Here is a definition which I prefer:

Mathematics of Program Construction by Jan L. A. van de Snepscheut

(In the context of just having defined the semantics of a simple language and a simple instruction set)

"A compiler is a function that takes a program and produces a machine state so that the behavior of both (context) are identical"

I used the word "instructions" to mean "state". This definition does not rely on the persistence of "code" that induces this state.

Now that you have explained that your status on these boards, I understand that I came across as insulting you, and I'm sorry. I was being genuine (as if your were any stranger) when I was "quizzing" you (not everyone who has 15 years of experience is competent, but you are the reason that these forums are some of the best on the web, transcending topics).
 
Last edited:
  • #18
Crosson said:
The unexamined life is not worth living.

I use Mathematica almost every single day! I'm just not so naive as to think it's the greatest programming language on the planet, or that other tools never beat it. It's a great program, and it does what it does very well. I'm looking forward to seeing Version 6.0 It just happens that there are often many other solutions that are either cheap or free, and they're worth considering.

If all your experience has taught you anything, how about this: messy inconsistencies die hard.

If all your experience has taught you anything, how about this: always begin a job by finding the best tool.

I can't discuss how smart anybody is, and I can't discuss how much experience you have, all I can discuss with you are facts and insights.

That's the problem, Crosson -- your "facts" are things like "GUIDE requires C++" and "You could write a...compiler for a language like BASIC using less than 20 lines of Mathematica code" and "Matlab has no analogue to symbolic differential equation solving."

These are not facts. They're not even insights. At best, they're falsehoods; at worst, they are lies.

Now, I've been honest enough in this thread to concede when shown wrong. For example, I thought that Mathematica had no C++ interface -- I was wrong, and said so. That's all I'm asking you to do here, Crosson -- be honest enough to admit that have made false statements in this thread.

I thought that this forum was not a place for personal attacks, I'm honestly hurt that you are so mean to me. You imply that you are doing a service to everyone by "calling me out".

You began the personal attacks by questioning my knowledge of computer programming, by calling me some kind of a "non-academic," etc. If a Master's from Stanford doesn't qualify me as "academic enough" in your eyes, that's fine, but I won't tolerate anyone making passive-aggressive comments belittling my experience in the world.

Edit - Just stop attacking me. I don't want any more personal attacks.

Yeah, let's stop. If I could, I'd offer you a beer. I learned some things in this thread, and I just hope you did, also.

- Warren
 
  • #19
Crosson said:
Mathematica has a few performance pitfalls, but so does Matlab. If programmed correctly, either one can be within 10 to 100 times slower than Fortran.

Yep, that sounds about right. Cool! And as you might expect, people where I work use a lot of Fortran, too. Even F77! Fortunately, I haven't had to mess with it. :yuck:

Crosson said:
I'm so glad you asked. I wonder how much you know about the design issues of programming languages? I ask because most of your arguments in favor of Matlab are not programming language issues, they are issues having to do with availible libraries. This is not interesting to me; the C language does not include Input/Output, so someone else has to write the library, but this does not have weight in the discussion of C as a language.

This is an argument I think all programmers are familiar with. But the fact is, the runtime libs do matter. Even if it's not "interesting" to you. I confess, it didn't use to interest me either, until I discovered how much it matters.

Think about it: language itself doesn't matter. Any language that supports functions basically supports all programming paradigms automatically. It may not have some magic syntax to shave off a few characters, but you can do any style of programming in any turing-complete language. The question is, do you have to write all the libraries to do this yourself? If the answer is yes, you'll find you spend a lot more time writing all that junk than you think.

So I would argue that it is ONLY the runtime library that matters. The syntax of the language is almost irrelevant. I found that out through experience. If you have a very complete OO-style function library and set of idioms, you feel like you're writing OO code. Even if it's in pure C. If you have a nice library of functions and a set of idioms for manipulating logic rules, you feel like you're doing logical programming.

Syntax is hidden behind the veil of the mind's ability to think in concepts rather than keyboard characters. I think your meaning of "language" doesn't matter all that much in practice. Who the hell cares whether array indexing is parentheses or brackets?

1) Mathematica has fully integrated support for all programming paradigms - Functional, Logical, Procedural and Object Oriented.

Yeah, OK, like Perl et al.

It builds the pattern, and proceeds to use it, at run-time. No other general purpose language can do this in such a concise manner, and I am only aware of comparable pattern matching abilities in a few special purpose research languages.

Huh? Perl (famously) does this quite nicely.

I am interested in functionality, not aesthetics.

That would seem to contradict your statements of distaste about the fact that MATLAB indexes arrays and calls functions the same way. Also your unhappiness with the aesthetic inconsistency between different packages that have been bolted onto MATLAB. These things don't impact functionality, which I think was chroot's point.

I have long argued that the language C is so named for the word "Cool", because if pressed, most of its proponents will cite its syntax as asthetic (and other reasons).

Whaaaaaaah? :bugeye:

I've been coding in mostly C for many years and I have never heard anyone describe C's syntax as aesthetically pleasing. Never.

I think our minds can acclimate to arbitrarily complex syntax.

What the heck are you talking about? Are you actually claiming that the human mind has infinite processing capacity for syntactic analysis? Shall I invent an insanely complex syntax just to prove you wrong? I mean come on! I think it's obvious that there's a limit to the complexity of anything (syntax or otherwise) that the human brain can physiologically deal with. I mean, even the working memory requirements alone run up against the brain's maximum working memory.

And that's leaving aside the fact that people who write code in languages with more complex syntax, and regularly use all the available features, more frequently tend to overlook things and make errors. It's a lot easier to screw up Perl syntax in some subtle, imperceptible way than C syntax, I promise you.

A compiler is a system that translates source code into machine instructions. It looks like you don't know what an interpretive compiler is, and you think compilation is all about producing executable files

Do you mean a bytecode compiler? Are you actually talking about writing a bytecode compiler for BASIC?

that's fine, from your non-academic perspective I don't think you would be interested in an elegant system for doing lexical analysis of a small "toy" language like BASIC.

Isn't "elegant" a synonym for "aesthetically pleasing"? I always thought so. You seem to think otherwise, judging by the fact that you criticize MATLAB's practical (inelegant, unaesthetic, ugly, but functional) syntax for being inelegant.

It seems like on the one hand, it bothers you that MATLAB's syntax is all complicated and not consistent or beautiful, but on the other hand, you make the argument that languages shouldn't be evaluated in terms of their consistency and beauty. Which is it?
 
  • #20
Yeah, OK, like Perl et al.

I wouldn't say that Perl fully supports functional programming, one reason being that functions in Perl are not treated as first class values the same way they are in LISP or Mathematica.

Huh? Perl (famously) does this quite nicely.

Maybe we are talking about the same thing, maybe not. I'd study any example you provided.

This is an argument I think all programmers are familiar with. But the fact is, the runtime libs do matter. Even if it's not "interesting" to you. I confess, it didn't use to interest me either, until I discovered how much it matters.

Think about it: language itself doesn't matter.

That is a judgement of what you prioritize. Instead of "don't matter" say "doesn't interest me" because it matters a lot to some people.

I take what your saying is that for getting work done, run-time libs are most important, and I agree. Libraries are what make the world go round when I am doing work, not finding the necessary libraries just means more work, I understand.

A different criterion for evaluating languages is based on how important it is in the long run. We all must admit that what we have now will be vastly inadequate at some point, and so studying design is important.
Quote:
I am interested in functionality, not aesthetics.
That would seem to contradict your statements of distaste about the fact that MATLAB indexes arrays and calls functions the same way. Also your unhappiness with the aesthetic inconsistency between different packages that have been bolted onto MATLAB.

No, my issue with Matlab runs much deeper then aesthetics. The issue is RELIABILITY. All programmers make mistakes, and although it is a hassle to fix those caught at compile time, in this day and age it can literally be FATAL if the error is exposed at run time.

Thus one of the goals since the early days is to catch as many errors at compile time as possible. Suppose you make a typo when typing the call to a function, but all that happens is that you instantiate an array of garbage. This is an overly simplistic example of what can go wrong when you have something like A(5).

My problem with the "bolt on packages" is the lost oppurtunity for an orthogonal design that they cause, and that is a design issue, not aethetics. Aesthetics is about visual appeal, but there are many other more important design issues for syntax.

So I would argue that it is ONLY the runtime library that matters. The syntax of the language is almost irrelevant. I found that out through experience.

Only the runtime libs matter to you, for what you do. For what you do, the syntax of the language is irrelevant. Thats what you found from your experience. Like I said, some people spend their careers working on these design issues, so it is not irrelevant.

Do you mean a bytecode compiler? Are you actually talking about writing a bytecode compiler for BASIC?

No, I'm not. I am referring to a compiler in the sense of my previous post, in this case an interpreted compiler.

What the heck are you talking about? Are you actually claiming that the human mind has infinite processing capacity for syntactic analysis? Shall I invent an insanely complex syntax just to prove you wrong? I mean come on! I think it's obvious that there's a limit to the complexity of anything (syntax or otherwise) that the human brain can physiologically deal with. I mean, even the working memory requirements alone run up against the brain's maximum working memory.

Our brains are very powerful; they interpret raw sensory data, which is a syntax more complex than any that has been constructively imagined.

And that's leaving aside the fact that people who write code in languages with more complex syntax, and regularly use all the available features, more frequently tend to overlook things and make errors. It's a lot easier to screw up Perl syntax in some subtle, imperceptible way than C syntax, I promise you.

I agree, my aesthetic feeling towards perl is that its 'loose'. This is a very important argument against complexity, and I think Mathematica attempts to solve this issue, but of course does not entirely succeed.
Isn't "elegant" a synonym for "aesthetically pleasing"? I always thought so. You seem to think otherwise...

It seems like on the one hand, it bothers you that MATLAB's syntax is all complicated and not consistent or beautiful, but on the other hand, you make the argument that languages shouldn't be evaluated in terms of their consistency and beauty. Which is it?

I use elegant as one would refer to a clever mathematical proof as elegant. Within limits, this is independent of notation. Non-elegant programs typically overspecify tasks, and elegant programs read more similarly to natural language instructions. Think of using subprocedures to improve the understandibility of a program, some ways are more elegant than others i.e. a few subprocedures that work together well vs. many highly independent and special case functions.
 
  • #21
Crosson said:
I wouldn't say that Perl fully supports functional programming, one reason being that functions in Perl are not treated as first class values the same way they are in LISP or Mathematica.

In what sense? What can I not do to a function in Perl? I checked Wikipedia, and it says first-class functions are one of Perl's strengths.

Maybe we are talking about the same thing, maybe not. I'd study any example you provided.

You can certainly build regular expressions, compile them, and use them all at runtime in Perl (and several other languages).

That is a judgement of what you prioritize. Instead of "don't matter" say "doesn't interest me" because it matters a lot to some people.

Well OK, point taken, but I'll go with "isn't useful to me". To me, interest and usefulness are not synonymous. That may have been our misunderstanding.

No, my issue with Matlab runs much deeper then aesthetics. The issue is RELIABILITY. All programmers make mistakes, and although it is a hassle to fix those caught at compile time, in this day and age it can literally be FATAL if the error is exposed at run time.

You don't have to talk down to me. I think it's pretty clear that chroot and I are both professional software developers with rigorous college educations. Believe it or not, I am familiar with the concept of reliability being important, but this is the first time you've mentioned that as a reason for preferring Mathematica.

In fact, the tradeoffs between reliability, writability, maintainability, functionality, etc. are fairly well known in the world of computer science. I can name other high-reliability languages. MATLAB (like Perl) was, quite explicitly, not intended to be a high-reliability language. Both are optimized for rapid development and should not be used in situations where catching and fixing bugs is hard. MATLAB would be the wrong tool for the job in those cases. If that's a strength of Mathematica, fine. It then occupies a crowd of languages that are optimized for safety.

Suppose you make a typo when typing the call to a function, but all that happens is that you instantiate an array of garbage.

Wait, can you write a code example? Not that I'm claiming that MATLAB is very safe (even MATLAB doesn't make that claim), but in this particular case I don't see what you mean. An array is instantiated when it appears on the LHS of an assignment statement, something you can't usually do with functions. And when you instantiate an array, you don't get garbage, at least in MATLAB.

My problem with the "bolt on packages" is the lost oppurtunity for an orthogonal design that they cause, and that is a design issue, not aethetics.

Orthogonal design means splitting up code in such a way that the pieces are not interdependent. It has little to do with syntax. While there certainly are issues with syntax design, they are engineering issues (tradeoffs between competing goals), not "right versus wrong" issues.

No, I'm not. I am referring to a compiler in the sense of my previous post, in this case an interpreted compiler.

Did you invent this term for the purposes of this conversation? In my giant Webster's dictionary, and in all 5 of the definitions on dictionary.com (one of which is from a specialized computing jargon dictionary), and on Wikipedia, and in every programming-related college course I've ever taken, a compiler is defined as a program that turns source code into some lower-level language, usually machine code. I think the term you are actually looking for is "lexer".

Our brains are very powerful; they interpret raw sensory data, which is a syntax more complex than any that has been constructively imagined.

Well how would you expect to imagine it if it's supposed to be beyond what a human can process? (Just kidding.)

No, it isn't. Sensory data is not a syntax. What's more, it is processed by specialized brain structures devoted to processing that specific data. Syntax of languages (including computer languages) is processed in a different region of the brain. And http://www.unreasonableman.net/2005/03/how_many_variab.html" [Broken] that humans can only handle about 4 variables in a problem before they lose track.

Non-elegant programs typically overspecify tasks, and elegant programs read more similarly to natural language instructions.

Actually, you're confusing two different properties. I can write code that is not very readable, but does not "overspecify" much at all, and I can write code that "overspecifies" a lot in the interests of improving readability. And yes, sometimes it's nice to strive for both qualities, when I don't have to worry much about other considerations.

By the way, overspecifying is not something "generally agreed" to be a bad thing. It makes it less likely that one minor mistake will cause your program to do something entirely different from what you intended, without any errors. And, it can make code more readable.

I know (all too well) that mathematicians despise this "redundant information", but experienced programmers gradually learn to love it. Redundant information can be great. It can be a really good thing because it gets your point across firmly (both to the reader and the compiler). Redundant information can be good. It can be good.

Think of using subprocedures to improve the understandibility of a program, some ways are more elegant than others i.e. a few subprocedures that work together well vs. many highly independent and special case functions.

Actually, the latter is preferred in all cases I know of except in languages where function calls have high overhead. Highly independent, special case functions are "orthogonal design". We generally want that, unless we don't have time. It's a huge win for many reasons.
 
Last edited by a moderator:
  • #22
Oops. One more thing. If Mathematica is "information dense" (i.e., it doesn't overspecify much), then it is not likely to be all that reliable. Reliability actually comes from languages that force you to overspecify. As far as I know, the only advantage of information-dense, minimally specified syntax is pure aesthetic prettiness. I don't know of any practical merit to such things.
 
  • #23
Sorry to bud into the argument here, but I'm fairly new to programming, and to computer-math-programs. Quite a few of my friends use Maple for their calculations. I was wondering if any of you guys could tell me what the strengths and weaknesses of each (mathematica and matlab) are, and if you have any experience with it, Maple as well.

I'm in my 3rd year, undergrad mathematical physics and I've been thinking about buying one, but can't decide which to go with (note, at the moment, I only intend to purchase one of them). If you guys could help me out, and let me know what each one does well that would be great.

Also, any other recommendations for languages/programs that would be helpful to me in my university/career would be good too.
 
  • #24
NeoDevin said:
I'm in my 3rd year, undergrad mathematical physics and I've been thinking about buying one, but can't decide which to go with (note, at the moment, I only intend to purchase one of them).

I'm guessing Mathematica (though I've never used it). MATLAB is really intended more for numerical simulation type stuff, and from what I've heard, "mathematical physicists" (if I'm interpreting that correctly) find the things they want in Mathematica. But this might not be a good thread to ask on (so far, it's just been one giant argument that has gotten rather heated at some points).
 
  • #25
I realize that, and may yet start a new thread. But this one seemed to have at least a couple of people semi-knowledgeable on MATLAB and mathematica.
 
  • #26
In what sense? What can I not do to a function in Perl? I checked Wikipedia, and it says first-class functions are one of Perl's strengths.

In the Perl that I know, function names are passed to other functions the same way that they are in C, "by reference".

Well OK, point taken, but I'll go with "isn't useful to me". To me, interest and usefulness are not synonymous. That may have been our misunderstanding.

I think Mathematica is interesting, in the grand sense I described, and useful at the same time.

You don't have to talk down to me. I think it's pretty clear that chroot and I are both professional software developers with rigorous college educations. Believe it or not, I am familiar with the concept of reliability being important, but this is the first time you've mentioned that as a reason for preferring Mathematica.

The reason 'I talked down' is because I thought someone with a 'rigorous' understanding of reliability would understand my example. Now I understand better who I am dealing with.

Wait, can you write a code example? Not that I'm claiming that MATLAB is very safe (even MATLAB doesn't make that claim), but in this particular case I don't see what you mean. An array is instantiated when it appears on the LHS of an assignment statement, something you can't usually do with functions. And when you instantiate an array, you don't get garbage, at least in MATLAB.

I had the forsight to see this exact objection, but that was my half-hearted attempt to explain reliability to someone who doesn't get it, and feels the need to call me out.

In fact, the tradeoffs between reliability, writability, maintainability, functionality, etc. are fairly well known in the world of computer science.

This is a weak objection, surely you understand that languages improve in all the categories you mention, over time.

If that's a strength of Mathematica, fine. It then occupies a crowd of languages that are optimized for safety.

Mathematica is optimized for completeness, and universality. You can be safe, you can be sloppy, you can strain the idea that these two are opposing goals. It seems like you are ignoring the idea that its possible. That's fine, but at least aknowledge that this is what Mathematica is about and point out where it fails.

Did you invent this term for the purposes of this conversation?

You show your immaturity by your hostility. I already gave a mathematical definition of a compiler several post above. I am sorry that you don't know what interpreted compilation is, with your attitude I could careless to enlighten you.

I think the term you are actually looking for is "lexer".

No, I didn't. Instead of putting words in my mouth, try to figure out what I am saying.

No, it isn't. Sensory data is not a syntax. What's more, it is processed by specialized brain structures devoted to processing that specific data. Syntax of languages (including computer languages) is processed in a different region of the brain. And it has been shown that humans can only handle about 4 variables in a problem before they lose track.

Psycology is not conclusive, and the property you cite about variables does not relate to the issue.

Highly independent, special case functions are "orthogonal design".

Only on opposite day! This is exactly not the case.

If Mathematica is "information dense" (i.e., it doesn't overspecify much), then it is not likely to be all that reliable

This does not take into account progress. Please do not criticize things because you think progress is not happening.

Sorry to bud into the argument here, but I'm fairly new to programming, and to computer-math-programs. Quite a few of my friends use Maple for their calculations. I was wondering if any of you guys could tell me what the strengths and weaknesses of each (mathematica and matlab) are, and if you have any experience with it, Maple as well.

Obviously I am going to recommend Mathematica, here is a comparison to Maple:

1) Mathematica has much better support for numerics. Most applied work is better when symbolics calculations can be done side by side numerical ones.

2) Better algorithms for solving equations. Algebraic, Differential, Recursive, symbolic, numeric; it solves more symbolic cases then Maple.

3) Similarly, Mathematica has a larger library of special functions and the most powerful capabilities for integration and symbolic differential equations.

4) Mathematica has more speed and more functions with respect to combinatorics, graph theory, and number theory.

5) Mathematcia has better ypesetting and document creation.

Maple is only better if you want to stick closely to the procedural programming style, and what a smaller system dedicated to pure math. If you are very casual about the use of software, I might recommend Maple.
 
  • #27
From my reading elsewhere, it seems to me as though mathematica and MATLAB are the standard in industry, with mathematica being more common in science applications, and MATLAB being used more often in engineering. Maple on the other hand seems to be mostly used in academia, with all three sharing the market in academia.

Is this correct?
 
  • #28
From my reading elsewhere, it seems to me as though mathematica and MATLAB are the standard in industry, with mathematica being more common in science applications, and MATLAB being used more often in engineering. Maple on the other hand seems to be mostly used in academia, with all three sharing the market in academia.

Is this correct?

Yes, I generally agree. Mathematica is used by the top 50 Universities in the world, all the fortune 50 companies, and all 15 branches of the U.S. federal government.

I was involved in a project that emailed over 150 professors at top universities around the country, asking their advice on the most useful computational physics curriculum, and the overwhelmng response was to teach C and Mathematica.

Maple and Matlab are much more specialized then Mathematica, and so if your specialization matches exactly the nitch of these softwares, that is the clear choice. For example, it is very convenient to work with finite fields of polynomials in Maple. In Mathematica it is more cumbersome because finite fields are a much smaller part of a larger system. All the functionality is still there, but it takes longer to learn because it is part of a huge framework.

Also, Maple goes well with Apple Macs. There is something about "think different" in Maple, and it is suitable for those who don't want behaviors that are reminiscent of numerics and applied work.

I have always thought that the trio of Math softwares is too different to be compared directly, we much is examine each on the basis of its intended application. Maple is world-class mathematics, especially algebra and combinatorics, with easy typesetting and great graphics. Matlab is industrial-strength matrix computation, with a lagre library of engineering tools and a small symbolic toolbox (licensed from Maple) to make it more palatable for general technical education. Mathematica has world-class symbolics + numerics, the largest most advanced library of Mathematics in the world, document creation and typesetting (books have been published in Mathematica), is excellent for doing graphics, animations, and presentations, and a very modern programming language that unifies it all.
 
  • #29
Crosson said:
In the Perl that I know, function names are passed to other functions the same way that they are in C, "by reference".

Then you must know a different Perl than the rest of the world. In the Perl that I use, you can create closures (instances of a function with its own copy of the static variables internal to that function) dynamically and return them as values. I'm sure that, internally, they are stored as pointers to things, but in interpreted languages that is always the case. They are syntactically not treated as references. Have you bothered to look this up?

This is a weak objection, surely you understand that languages improve in all the categories you mention, over time.

I don't agree with that, and as far as I know, that isn't consistent with mainstream computer science thought. Feel free to correct me if I'm wrong, but I would appreciate a reference for your unusual position, if you happen to have one handy.

Languages that are not really optimized yet may still be in the process of improving in all those categories, but well-established languages are generally somewhere near the edge of those tradeoffs. And please don't deride my arguments as "weak" unless you have at least some evidence for your point of view.

Mathematica is optimized for completeness, and universality.

I'm not familiar with those criteria. This sounds a little like saying the language is optimized for"goodness". Can you be more specific, or give examples of these ill-defined qualities? Everyone has his/her favorite language, and they all think their language is optimal. I was just wondering if you had any specific rationale for your position. "No" is an acceptable answer, and I won't think less of you or your favorite programming language for it. There's no reason to get defensive.

You can be safe, you can be sloppy, you can strain the idea that these two are opposing goals. It seems like you are ignoring the idea that its possible. That's fine, but at least aknowledge that this is what Mathematica is about and point out where it fails.

Ignoring it? You haven't demonstrated that, and it goes against what I was taught in college, and seems counterintuitive. I won't lend credence to such claims without any justification. They certainly become opposing goals at some point.

I can't point out anything about Mathematica, because I've never used it. I was asking you about it, and you proceeded to make some claims about it that I found suspicious. Your apparent lack of familiarity with several basic computer science topics then increased my skepticism, so I pressed the issue in hopes of getting down to some real hard facts about Mathematica. It hasn't happened yet.

You show your immaturity by your hostility. I already gave a mathematical definition of a compiler several post above. I am sorry that you don't know what interpreted compilation is, with your attitude I could careless to enlighten you.

You found something I said "hostile"? Nothing in any of my posts thus far has been intended as such, and I genuinely apologize if I have somehow offended you. Until this point, I thought we were having a friendly conversation. I still have respect for you based on the many physics posts you've made that have been useful to me. There's no need to start making personal attacks. And I will not descend to that level.

I agree with the mathematical definition you provided. I (respectfully) disagree with your interpretation of that definition, and I can't find anyone who has heard of "interpretive compilation" in your sense. If you don't wish to discuss it any more then I won't.

Psycology is not conclusive, and the property you cite about variables does not relate to the issue.

The fact that there are combinations of sensory input which humans find too complex demonstrates that there is a limit to the complexity of "information in general" that humans can understand. Even if you insist on the (long-discredited, I believe) notion that language processing is the result of some "general intelligence", this suffices to demonstrate that human syntax processing cannot possibly handle arbitrary complexity.

Incidentally, syntax processing in general is NP-complete. That too is evidence that the human brain would eventually run into a limit.

Only on opposite day! This is exactly not the case.

Well here's a http://en.wikipedia.org/wiki/Orthogonal#Computer_science" for my point of view. If you feel that "orthogonal design" should refer to the exact opposite of factoring a system into small, special-purpose parts that don't depend on one another, then I would argue that your "orthogonal deisgn" is a bad thing, for reasons discussed amply on Wikipedia.

This does not take into account progress. Please do not criticize things because you think progress is not happening.

I hope you don't believe that "progress" will eventually disprove the axioms of information theory. Information dense codings (yes, that includes programming languages) are more vulnerable to corruption by noise. This is not an opinion. It is http://en.wikipedia.org/wiki/Shannon%27s_theorem" [Broken].

Again, please don't be offended by my disagreement with you on these issues. Relax. Like I said, I still respect you. I just think maybe CS isn't your field and you're a little rusty. Believe it or not, I'm actually trying to be helpful.
 
Last edited by a moderator:
  • #30
Thank you for your response Xezlec.

Then you must know a different Perl than the rest of the world. In the Perl that I use, you can create closures (instances of a function with its own copy of the static variables internal to that function) dynamically and return them as values.

I don't think we disagree very badly. I am not picking at "by reference" or "by copy" (these have identical semantics). First class values was a bad thing to pick on. Are all Perl programs built from atoms by composition of functions? I thought that this was not the case, and that is why I said Perl does not fully support functional programming. I may be wrong, and I got too much exposure to the other style of programming in Perl.

I don't agree with that, and as far as I know, that isn't consistent with mainstream computer science thought. Feel free to correct me if I'm wrong, but I would appreciate a reference for your unusual position, if you happen to have one handy.

The mainstream position is that reliability. writability, etc. are trade-offs in the short term, and that they all improve in the long-term. I reference you to Fortran - less writable, less readable, less reliable, less functional etc. then languages created more recently.

Also, it is difficult for any mainstream science to deal with radical advances. The short history of CS is full of these.

Ignoring it? You haven't demonstrated that, and it goes against what I was taught in college, and seems counterintuitive. I won't lend credence to such claims without any justification. They certainly become opposing goals at some point.

I can't point out anything about Mathematica, because I've never used it. I was asking you about it, and you proceeded to make some claims about it that I found suspicious. Your apparent lack of familiarity with several basic computer science topics then increased my skepticism, so I pressed the issue in hopes of getting down to some real hard facts about Mathematica. It hasn't happened yet.

Your right, I should give more concrete support. Mathematica is designed to do everything that technical professional needs to do. This is obviously a very long list, and the wolfram people have already done the work of showing how it compares in various areas:

http://www.wolfram.com/products/mathematica/analysis/

Indeed, Mathematica, like all software, attempts to achieve goodness. Unlike some software, it also strives for universality in application.

I agree with the mathematical definition you provided. I (respectfully) disagree with your interpretation of that definition, and I can't find anyone who has heard of "interpretive compilation" in your sense.

Maybe I misinterpreted the definition, and in that case I mispoke. But more importantly, to understand what I meant by compiler would be to understand how I interpreted the definition, and the answer isn't "lexer" --- but from now on I will give less "radical" examples that involve "interpretations".

Incidentally, syntax processing in general is NP-complete. That too is evidence that the human brain would eventually run into a limit.

It is evidence that, if we solved syntax, we would solve it all. You are acting as if NP has been shown to be not equal to P. The fact that syntax processing is NP-complete, and yet the human brain seems to do it in polynomial time, suggests to me that P = NP. I really hope P = NP.

I hope you don't believe that "progress" will eventually disprove the axioms of information theory. Information dense codings (yes, that includes programming languages) are more vulnerable to corruption by noise. This is not an opinion. It is a mathematical theorem.

Axioms are not elligible for proof or disproof (I will excuse this, and not question that you don't know what an axiom is). The theorem you linked me to has very little to do with the topic at hand, besides analogy (show me wrong, describe exactly how the theorem applies to what we are talking about, or reference someone who has).

I find this 'theorem intimidation' to be a form of sophistry. The fact is that mathematics is inexact in its application to reality, and impossibility theorems are especially slippery to apply: usually someone circumvents them by a loophole in the hypothesis.

Again, please don't be offended by my disagreement with you on these issues. Relax. Like I said, I still respect you. I just think maybe CS isn't your field and you're a little rusty. Believe it or not, I'm actually trying to be helpful.

By this point I do see you as helping me clarify some things I said, so thank you. As far as me being rusty, the problem is more so that I am being too radical, and now that you point this out I am going to conservatively demonstrate my case.
 
  • #31
Crosson said:
The mainstream position is that reliability. writability, etc. are trade-offs in the short term, and that they all improve in the long-term. I reference you to Fortran - less writable, less readable, less reliable, less functional etc. then languages created more recently.

I don't know Fortran, but what I've been told is that it was (and still is) uniquely suited to be compiled to very fast code (faster than compiled C code). I've discussed this with people who use it to this day, and they point out things that seem like flaws, and show how those things improve "compilability". I also think it's considered more reliable than the average modern language, though I'm not sure.

I acknowledge that old versions of Fortran (such as F77) have some limitations that are not really necessary. That is, they have some drawbacks that don't give you anything in return (for example, 6-character function names). But my understanding was that as it has matured, it has "kept up" with the latest generation of programming languages in these respects (the 6-character limit is gone, for example), and has remained mostly a language optimized for compilation to fast code.

I suppose it can be said that genuine improvements have been made since the 1970s, but that was a long time ago, when "computer" was still an odd word to most people. Computers today are important enough and widespread enough that I think most major programming languages have come close to the edge of what can be achieved without trading off something. An exception to this is that most languages today are text-based, and it is conceivable that more sophisticated representations could become popular.

It is evidence that, if we solved syntax, we would solve it all. You are acting as if NP has been shown to be not equal to P. The fact that syntax processing is NP-complete, and yet the human brain seems to do it in polynomial time, suggests to me that P = NP. I really hope P = NP.

That's a surprising assertion. The human brain processes syntax in a small amount of time, and the syntax we use is simple syntax. I don't see how you come to the conclusion that we do it in polynomial time. We could even be doing it in exponential time. No way to know, since we don't know the "constant factor" involved, and since the problems we solve are very simple. And people make syntax errors all the time (you've made a few in this thread, and I probably have too). The more complex the syntax, the more errors people make. At least that's always been true for me. Maybe you would argue that I haven't had enough time to "adapt".

I'm going to have to create an example syntax that you can't figure out. Give me some time to work on it.

Also, I (along with the majority of CS experts) seriously doubt P=NP (new thread, maybe?). The problem has been explored so much, and the NP class of problems includes so many things that really "feel" similar to each other, and the known P problems "feel" so different from NP problems, it just seems intuitively unlikely that they are the same category. Besides which, they've both been explored so thoroughly and aggressively that I think the counterexample or "bridge" between the two would have been found by now if it existed.

Axioms are not elligible for proof or disproof (I will excuse this, and not question that you don't know what an axiom is).

I was specifically pointing out that it would be nonsense to make such a claim.

The theorem you linked me to has very little to do with the topic at hand, besides analogy (show me wrong, describe exactly how the theorem applies to what we are talking about, or reference someone who has).

I didn't mean it as only an analogy, I meant it quite literally. A programming language is literally a coding (think about the ASCII codes of the characters, if you need a bit stream). Programmer goofs are literally noise in this coding (the bitstream represents something different than the sequence of instructions in the programmer's mind). Compilers catching errors are literally using redundant information in the coding to detect bit errors (usually multi-bit).

Therefore, number of errors in the code that is sent through the "channel" (the human-computer interface) is directly dependent on how redundant your coding is.

I find this 'theorem intimidation' to be a form of sophistry. The fact is that mathematics is inexact in its application to reality, and impossibility theorems are especially slippery to apply: usually someone circumvents them by a loophole in the hypothesis.

I don't mean to intimidate. Maybe there is a loophole, but I've thought this way for some time, so if I am wrong I would honestly like to know how. When I look at languages that overspecify, which require you to type unnecessary extra information to do things, I find that the compiler catches more errors, because I'm unlikely to make the same mistake everywhere.

Let me use a concrete example. Imagine a language that does not require you to declare variable types. If the type is clear from the operations you perform on it, this information is redundant. Declarations are unnecessary.

But languages which require declarations remain popular precisely because they require this redundant information. With that information, the compiler can detect when you have mistakenly typed a nonexistent variable (like your MATLAB example), or when you are abusing a variable (trying to do something that doesn't apply to that data type). In a less overspecified language, these errors would compile just fine, but would be bugs.
 
  • #32
The ability to recognize complex patterns (with our eyes) is an NP problem. You can write a polynomial algorithm to check if you have a match with a given memory. No one has an algorithm to search for a match to the pattern in less than an exponential number of steps in the size of the problem. I agree we don't know how the brain works. I think P = NP, and 15 years ago the majority thought it was true.

Because mathematica wants to accommodate fast scripting and reliable projects, lots of reliability stuff is optional. For example you can define a function:

f [x_] = MyFavorite[SomeFunction[x]]

Where the x_ will match any expression (dynamic typing). If SomeFunction is made to act on integers, we could define it as:

f[x_Integer] = ...

More complex patterns can be allowed:

f[ {x_Integer, p_list} , y__ ] = ...

The first argument is a pair, with an integer followed by a list of a arbitrary types, then a sequence of arguments of optional (indefinite) length.

These features are not amazing, but they do show how the idea of type checking parameters has evolved since the 1980s.
 
  • #33
Crosson said:
Mathematica and Matlab are similar in performance. Mathematica has a few performance pitfalls, but so does Matlab. If programmed correctly, either one can be within 10 to 100 times slower than Fortran.

Can you substantiate that statement, for Matlab? (I neither know nor care about the performance of Mathematica).

It seems completely wrong, based on my experience with both languages (and I wrote my first Fortran program about 40 years ago). The computational kernels built into Matlab are usualy more efficient that the average programmer's attempt to do the same thing, in ANY language. Writing a Matlab program that doesn't use anything except its "low-level" programming language capabilities is (to put it politely) completely dumb. That's not what it's designed for.
 
  • #34
Writing a Matlab program that doesn't use anything except its "low-level" programming language capabilities is (to put it politely) completely dumb. That's not what it's designed for.

I was going to give you an example, but now I don't have to. All I was saying is that it is possible to be "dumb" in either language. Part of the design of a programming language is that people will use it in ways that it was not intended to be used, and in Matlab this can affect performance badly (using for loops instead of vector operations, for example). This is what I call a "performance pitfall" because someone new to the language could fall into it.

It seems completely wrong, based on my experience with both languages

Sounds like you had a pitfall in Mathematica, but learned Matlab more thoroughly. Or you used Mathematica exclusively before version 5.0, which was about 5 years ago.

The computational kernels built into Matlab are usualy more efficient that the average programmer's attempt to do the same thing, in ANY language.

That's an interesting usage of 'usually' followed by 'ANY'. Since you don't know and don't care about Mathematica, which is just one of the many languages, you obviously don't know what you are talking abot with the use of the universal quantifier.

Please recognize that you use Matlab because of its libraries, and not because of its efficiency in execution. Because Matlab code is interpreted, it is often 100 to 1000 times slower then compiled C++ code (on a basic For loop, for example). If you are relying on the strength of the Mathematics in the Matlab libraries, I would like to see an example of what you are saying Matlab does faster than an average programmer could in ANY language.
 
Last edited:
  • #35
Maybe I'm just weird but I'm suprised people are saying MatLab is easier to use off the bat than Mathematica. I had to learn to use one of the two of them at the beginning of the year and I tried MatLab first. Didn't have a clue WTF was going on. No idea how to make it do anything, despite reading the help documentation. Mathematica was much more straight forward. The help documentation made everything obvious and within a few minutes I'd managed to do a few basic things like plot graphs, algebraicly manipulate expressions etc.

I'd done some basic C coding a year or two before that and so get the whole defining variables thing but MatLab really just made no sense to me at all.
 
<h2>1. What are the major changes in Mathematica 6.0?</h2><p>The major changes in Mathematica 6.0 include significant improvements in speed and performance, a new user interface with enhanced graphics and visualization capabilities, and expanded functionality for data analysis and manipulation.</p><h2>2. How has the user interface changed in Mathematica 6.0?</h2><p>The user interface in Mathematica 6.0 has been completely revamped with a modern and streamlined design. It includes new features such as a customizable toolbar, improved notebook organization, and enhanced graphics and visualization tools.</p><h2>3. What improvements have been made in terms of speed and performance in Mathematica 6.0?</h2><p>Mathematica 6.0 has been optimized for faster computation, making it up to 10 times faster than previous versions. This is achieved through improved algorithms, parallel processing capabilities, and enhanced memory management.</p><h2>4. How does Mathematica 6.0 enhance data analysis and manipulation?</h2><p>Mathematica 6.0 includes new functions and tools for data analysis and manipulation, such as enhanced data import and export capabilities, statistical analysis functions, and improved handling of large datasets. It also has a new data visualization framework for creating interactive and dynamic visualizations.</p><h2>5. Can I still use my old Mathematica code in version 6.0?</h2><p>Yes, most old Mathematica code will still work in version 6.0. However, some functions and syntax may have changed, so it is recommended to check the documentation for any necessary updates. Additionally, some older functions may have been replaced with newer and more efficient ones in version 6.0.</p>

1. What are the major changes in Mathematica 6.0?

The major changes in Mathematica 6.0 include significant improvements in speed and performance, a new user interface with enhanced graphics and visualization capabilities, and expanded functionality for data analysis and manipulation.

2. How has the user interface changed in Mathematica 6.0?

The user interface in Mathematica 6.0 has been completely revamped with a modern and streamlined design. It includes new features such as a customizable toolbar, improved notebook organization, and enhanced graphics and visualization tools.

3. What improvements have been made in terms of speed and performance in Mathematica 6.0?

Mathematica 6.0 has been optimized for faster computation, making it up to 10 times faster than previous versions. This is achieved through improved algorithms, parallel processing capabilities, and enhanced memory management.

4. How does Mathematica 6.0 enhance data analysis and manipulation?

Mathematica 6.0 includes new functions and tools for data analysis and manipulation, such as enhanced data import and export capabilities, statistical analysis functions, and improved handling of large datasets. It also has a new data visualization framework for creating interactive and dynamic visualizations.

5. Can I still use my old Mathematica code in version 6.0?

Yes, most old Mathematica code will still work in version 6.0. However, some functions and syntax may have changed, so it is recommended to check the documentation for any necessary updates. Additionally, some older functions may have been replaced with newer and more efficient ones in version 6.0.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • Biology and Medical
Replies
1
Views
1K
  • STEM Career Guidance
Replies
1
Views
1K
  • Computing and Technology
Replies
2
Views
2K
  • Feedback and Announcements
2
Replies
35
Views
5K
Replies
10
Views
2K
  • Art, Music, History, and Linguistics
Replies
1
Views
1K
  • Computing and Technology
Replies
3
Views
1K
Back
Top