Languages similar to Mathematica?
  Home FAQ Contact Sign in
comp.lang.functional only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.functional Profile…
 Up
Languages similar to Mathematica?         


Author: Szabolcs
Date: Oct 25, 2006 09:38

This question is primarily aimed at people who are familiar with
Mathematica.

Is there any general purpose computer language (preferably with a
freely available implementation) that is based on the same (or similar)
principles as Mathematica, namely expression evaluation and pattern
matching? I mean a language that would allow for a relatively simple
implementation of the example in section 2.3.14 of the Mathematica book
(http://documents.wolfram.com/mathematica/book/section-2.3.14) and can
also handle large and complicated datasets.

If there is such a language, how does it compare to Mathematica (what
are the main differences and similarities)?

Please be gentle with your answers, as, unlike most people here, I
haven't "officially" studied computer science (I am a physics student).

Szabolcs
48 Comments
Re: Languages similar to Mathematica?         


Author: wooks
Date: Oct 25, 2006 10:07

Szabolcs wrote:
> This question is primarily aimed at people who are familiar with
> Mathematica.
>
> Is there any general purpose computer language (preferably with a
> freely available implementation) that is based on the same (or similar)
> principles as Mathematica, namely expression evaluation and pattern
> matching? I mean a language that would allow for a relatively simple
> implementation of the example in section 2.3.14 of the Mathematica book
> (http://documents.wolfram.com/mathematica/book/section-2.3.14) and can
> also handle large and complicated datasets.
>
> If there is such a language, how does it compare to Mathematica (what
> are the main differences and similarities)?
>
> Please be gentle with your answers, as, unlike most people here, I
> haven't "officially" studied computer...
Show full article (0.94Kb)
no comments
Re: Languages similar to Mathematica?         


Date: Oct 25, 2006 10:20

"Szabolcs" gmail.com> writes:
> If there is such a language, how does it compare to Mathematica (what
> are the main differences and similarities)?

That level of pattern matching is more part of the algebra system than
a general language. You could look at Prolog or Mozart, or some other
algebra system like Macsyma. Anyway sci.math.symbolic may be a better
place to ask.
1 Comment
Re: Languages similar to Mathematica?         


Author: Hans Aberg
Date: Oct 25, 2006 11:12

In article <1161794321.465694.158300@e3g2000cwe.googlegroups.com>,
"Szabolcs" gmail.com> wrote:
> This question is primarily aimed at people who are familiar with
> Mathematica.
>
> Is there any general purpose computer language (preferably with a
> freely available implementation) that is based on the same (or similar)
> principles as Mathematica, namely expression evaluation and pattern
> matching? I mean a language that would allow for a relatively simple
> implementation of the example in section 2.3.14 of the Mathematica book
> (http://documents.wolfram.com/mathematica/book/section-2.3.14) and can
> also handle large and complicated datasets.
>
> If there is such a language, how does it compare to Mathematica (what
> are the main differences and similarities)?

When I taught a symbolic math grad course more than a decade ago, we used
Maple, because the sources were essentially open, and one could write ones
own symbolic routines. Book: Heck, "Introduction to Maple". The Wikipedia
now says that Axiom is open source and for free:
41 Comments
Re: Languages similar to Mathematica?         


Author: Szabolcs
Date: Oct 25, 2006 11:38

Thanks for all the replies! (I am taking a look at the suggested
languages right now.)

I'm not specifically looking for an algebra system, but for any general
purpose language that has similar capabilities to Mathematica (not in
the terms of built-in functions aimed for doing algebraic computations,
such as Factor or Integrate, but language features: the possibility to
use very general patterns, ReplaceAll, the availability of powerful
list manipulation functions etc.). Probably the example from the
Mathematica book was not a good one because it is mathematically
oriented. I do not aim to solve one specific problem. I'd just like to
experiment with such systems and broaden my knowledge.

Szabolcs
40 Comments
Re: Languages similar to Mathematica?         


Date: Oct 25, 2006 11:42

"Szabolcs" gmail.com> writes:
> oriented. I do not aim to solve one specific problem. I'd just like to
> experiment with such systems and broaden my knowledge.

You should read Structure and Interpretation of Computer Programs if
you haven't.

http://mitpress.mit.edu/sicp/
1 Comment
Re: Languages similar to Mathematica?         


Author: Hans Aberg
Date: Oct 25, 2006 12:15

In article <7xslhc44qp.fsf@ruckus.brouhaha.com>, Paul Rubin
<http://phr.cx@NOSPAM.invalid> wrote:
>> oriented. I do not aim to solve one specific problem. I'd just like to
>> experiment with such systems and broaden my knowledge.
>
> You should read Structure and Interpretation of Computer Programs if
> you haven't.
>
> http://mitpress.mit.edu/sicp/

And if one is interested in Prolog style resolution, there is a MiniProlog
that comes with Hugs <http://haskell.org/hugs/>.

--
Hans Aberg
no comments
Re: Languages similar to Mathematica?         


Author: Greg Buchholz
Date: Oct 25, 2006 12:37

Szabolcs wrote:
> Is there any general purpose computer language (preferably with a
> freely available implementation) that is based on the same (or similar)
> principles as Mathematica, namely expression evaluation and pattern
> matching? I mean a language that would allow for a relatively simple
> implementation of the example in section 2.3.14 of the Mathematica book

Just for fun, here's a Prolog implementation of that problem...

integrate(Y+Z, X, A+B) :- integrate(Y,X,A), integrate(Z,X,B).
integrate(C*Y, X, C*A) :- freeQ(C,X), integrate(Y,X,A).
integrate(C,X,C*X) :- freeQ(C,X).
integrate(X,X,X^2).
integrate(X^N,X,X^N1/N1) :- freeQ(N,X), N =\= -1, N1 is N + 1.
integrate(1/(A * X + B),X,log(A*X+B)/A) :- freeQ(A,X),freeQ(B,X).
integrate(exp(A*X+B),X,exp(A*X+B)/A) :- freeQ(A,X), freeQ(B,X).
integrate(E,X,integrate(E,X)).

freeQ(C,X) :- \+ bound(C,X).
Show full article (1.84Kb)
no comments
Re: Languages similar to Mathematica?         


Date: Oct 25, 2006 12:51

Paul Rubin schreef:
> algebra system like Macsyma

See also http://maxima.sourceforge.net/

(beware, the ScienTek-Macsyma-site is currently "owned")

--
Affijn, Ruud

"Gewoon is een tijger."
no comments
Re: Languages similar to Mathematica?         


Author: Ingo Menger
Date: Oct 26, 2006 01:40

Szabolcs wrote:
> Thanks for all the replies! (I am taking a look at the suggested
> languages right now.)
>
> I'm not specifically looking for an algebra system, but for any general
> purpose language that has similar capabilities to Mathematica (not in
> the terms of built-in functions aimed for doing algebraic computations,
> such as Factor or Integrate, but language features: the possibility to
> use very general patterns, ReplaceAll, the availability of powerful
> list manipulation functions etc.). Probably the example from the
> Mathematica book was not a good one because it is mathematically
> oriented.

No, it's okay.
To be sure, the task should be simple one for any decent functional
language. Let me sketch it in Haskell:

-- we need a type for mathematical expressions
Show full article (1.09Kb)
16 Comments
1 2 3 4 5