On 22/08/2008, at 5:27 PM, William Stein wrote:

>
> On Thu, Aug 21, 2008 at 11:28 PM, David Philp  
> <[EMAIL PROTECTED]> wrote:
>
>> I hope one can't own such things but I don't want a legal fight.
>
> If I were afraid, then Sage would be nowhere today.

I just don't think Mathematica reimplementation is a worthy enough  
thing that it's worth risking a legal fight with Wolfram.  There are  
other ways to make Sage really good.

>> Otherwise, I agree.  A mathematica-like parser would be useful.
>> Though I'd be surprised if the concepts map across well enough for it
>> to be anything other than an ugly hack.
>
> Why?

I don't think it's useful for me to keep going much more until I know  
more about sage.   But I will explain where the bad feeling came from:

All the explanations that "sage can do that" have involved python  
lists, because I used names and examples like 'data = {1, 2, 3}'.  But  
the power of ReplaceAll (the /. operator) is that it places no  
requirements on the form of the 'data' argument.

I.e. the example:
[(0 if d < 0 else d) for d in data]

is an illustration of how to write a for-each expression in python,  
but it has nothing much to do with ReplaceAll.  The difference is that  
ReplaceAll is used for transforming 'data' not 'the elements of data'.

E.g.
x + a*y + z[w + v] /. Plus -> List

yields {x, a y, z[{v, w}]}  (That sort of manipulation has been useful  
to me sometimes.)

It reads much the same as before: expr, but with sums replaced by lists.

If someone proposes an implementation I can try and shoot it down or  
improve it.  But I don't know sage well enough to know whether there  
is an obvious way to do it all.  My guess is that this is a natural  
task for Lisp and the wrong task for Python.

D


==================================
David J Philp
Postdoctoral Fellow
National Centre for Epidemiology and Population Health
Building 62, cnr Mills Rd & Eggleston Rd
The Australian National University
Canberra ACT 0200 Australia

T: +61 2 6125 8260
F: +61 2 6125 0740
M: 0423 535 397
W: http://nceph.anu.edu.au/

CRICOS Provider #00120C



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to