Instructions for (sort of) using my MockMMA, if you have Maxima, follow.
As best as I can tell from what I've downloaded... here are instructions.
I hope that Hunter will correct this as necessary.
Note: Wxmaxima does NOT work with MockMMA since it expects interactions
that look like Maxima's input and output.
So
1. Download from sourceforge the mockmma source to a file directory.
call it c:/maxima.
After unpacking it you will have c:/maxima/trunk/.....
2. Start up a command-line maxima. (I am using the GCL-based windows
version)
3. Type to_lisp(); <return>
4. Type
(system::chdir "c:/maxima/trunk") ;; or where ever you put the files
5. Type
(load "init2.lisp") ;; this loads some of the code written initially
by Richard Fateman, constituting a parser etc
6. Type
(mma:tl)
You will now be in the mockmma top level and can type commands like this:
x+x
Rat[%]
Int[%,x]
Sqrt[49]
f[Sin[x_]]:=S[x]
f[Cos[x_]]:=C[x]
f[Sin[zz]]
I don't know what changes have been made by others to the code I wrote,
and I don't have much confidence that a program can be constructed that
"translates Mathematica files into Maxima files" except for trivial
expressions. For example, the definition of "f" above in Maxima would be
something
like
f(h):= if atom(h) then 'f(h) else if part(h,0)="sin" then s(h) else if
part(h,0)="cos" then c(h) else 'f(h).
The issue of upper and lower case identifiers seems to be handled
incorrectly.
If someone wants to translate trivial expressions like a+b*c from
mockmma to maxima, it should take about 1/3 of a page of lisp, plus a
table that contains equivalents, e.g.
((|Plus| . mplus) (|Sin| . $sin) .... )
There are probably such programs already written, but writing a new one
would be less work than finding one.
Also in the sourceforge tar file..
....There seem to be a pile of programs in the Maxima language for doing
combinatorial stuff in a subdirectory maxpackages.
translated (presumably by hand) from mathematica package in mmapackages.
There is also a copy of some perl code that I have not tried to use,
which changes character strings
that look like Mathematica code into character strings that look like
Maxima code, sometimes.
RJF
Sheldon Newhouse wrote:
> Hunter Monroe wrote:
>
>> John,
>>
>> Please let me know if you can share the lisp files for Maxima compatibility
>> with Mathematica.
>>
>> If anyone wants to try out Mockmma please free to check out the sourceforge
>> project and share your experience. Soon I will be posting a few tweaks to
>> wxMaxima that will let you see the Mathematica-style command line.
>>
>> Would "Maximatica" be a better name than "Mockmma"?
>>
>> Hunter
>>
>> -----Original Message-----
>> From: John Lapeyre [mailto:pdl at johnlapeyre.com]
>> Sent: Friday, June 05, 2009 3:02 PM
>> To: Hunter Monroe; maxima at math.utexas.edu
>> Subject: Re: Mockmma
>>
>>
>>
>>> Would you have any objection to me including your Mathematica
>>> compatibility tools for maxima in a sourceforge project? This project
>>> would develop a capability to translate Mathematica files into .mac
>>> files and provide a Mathematica-style command line. This could also
>>> build on Mockmma and work by Andrei Siver which has been discussed on
>>> the maxima mailing list. A modest first objective might be to handle
>>> the Combinatorica package created by Pemmaraju and Skiena (who hold
>>>
>>>
>> copyright).
>>
>> Yes, you are certainly welcome to use it. I suddenly got an opportunity for
>> a new, more demanding, job and have not touched the project for some time.
>>
>> I think I only posted the perl version. In the meantime I put a lot of work
>> into modifiying Richards' parser (mostly because I was learning lisp) to
>> replace this perl, because it was so slow. I also began to recode many
>> compatibility functions in lisp, because I had a difficult time getting the
>> maxima language to behave like I wanted it to. My proof of concept goal was
>> to take a real-world collection of routines and get the translator and
>> compatibility functions to such a state that they could translate this
>> particular collection. I actually made a good bit of progress to that end.
>> However, as Richard pointed out, some of the most interesting and powerful
>> features of Mma are very difficult or impossible to duplicate, so such a
>> project has this large inherent limitation. But, I imagine there is a good
>> bit of application code, like the example that I was working on, that does
>> not used these interesting features.
>>
>> I can send some of these other things, if you are interested.
>>
>> thanks,
>> John
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>> .
>>
>>
>>
> Just a word of caution.
> So far maxima is not threatening to other CAS systems and can function
> just fine. I would be somewhat worried about lawsuits if names and
> codes are very close to commercial CAS systems. This is especially true
> in the US where the people who evaluate the validity of this or that
> software don't have much expertise, and those with sufficient funds can
> usually intimidate others.
> For instance, the fairly trivial definitions used in Interval
> arithmetic have been patented (in a completely unfair way). This has
> caused more than a few implementers using Interval Analysis to keep
> their software from being consipicuously made available.
>
> A discussion related to these kinds of 'porting' issues took place on
> this list some time ago in regard to ideas of porting algorithms in the
> "Numerical Recipes" books to maxima--even though many of those
> algorithms were not original to Numerical Recipes. They were simply
> encoded in various high level languages and published in the Numerical
> Recipes books.
>
> Why not keep the Mockmma name for awhile to see how it goes?
>
> -sen
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>