[sage-combinat-devel] CombinatorialFreeModule (again)
I am trying to construct the fee module on the set of instances of a class G. I start with M = CombinatorialFreeModule(QQ,G) If f,g are instances of G I then continue with a = M.monomial(f) b = M.monomial(g) and I can then form a+a , a+b etc. and a - a is indeed 0. However if I try 2*a I get a TypeError If I try M = CombinatorialFreeModule(QQ,NonNegativeIntegers()) a = M.monomial(3) then 2*a seems to work fine. Can anyone tell me what I am doing wrong and/or explain this? Thanks -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
Re: [sage-combinat-devel] CombinatorialFreeModule (again)
Hi Bruce, On Thu, Sep 02, 2010 at 03:33:21AM -0700, Bruce wrote: I am trying to construct the fee module on the set of instances of a class G. I start with M = CombinatorialFreeModule(QQ,G) If f,g are instances of G I then continue with a = M.monomial(f) b = M.monomial(g) and I can then form a+a , a+b etc. and a - a is indeed 0. However if I try 2*a I get a TypeError If I try M = CombinatorialFreeModule(QQ,NonNegativeIntegers()) a = M.monomial(3) then 2*a seems to work fine. Can anyone tell me what I am doing wrong and/or explain this? I'm in a hurry. so this is only a very short answer. It is maybe a bug but in the usual usage in M = CombinatorialFreeModule(QQ,G) G is supposed to be an Parent (mathematical object) and ont a class (python stuff). I'm not sure if this is enforced or not. Cheers, Florent -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
[sage-combinat-devel] Re: CombinatorialFreeModule (again)
On Sep 2, 3:33 am, Bruce brucewestb...@gmail.com wrote: I am trying to construct the fee module on the set of instances of a class G. It would be good to give a complete example, that is, with a particular G. Can anyone tell me what I am doing wrong and/or explain this? Thanks -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
[sage-combinat-devel] Re: CombinatorialFreeModule (again)
O.K. Then a minimal example to start with would be class G: blah = 0 f = G() g = G() On Sep 2, 3:00 pm, bump b...@match.stanford.edu wrote: On Sep 2, 3:33 am, Bruce brucewestb...@gmail.com wrote: I am trying to construct the fee module on the set of instances of a class G. It would be good to give a complete example, that is, with a particular G. Can anyone tell me what I am doing wrong and/or explain this? Thanks -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
[sage-combinat-devel] Re: CombinatorialFreeModule (again)
Hi Florent I am not sure if you mean it is a bug that a + b works or that 2*a doesn't. The documentation describes a Parent as a set. In these terms the Parent I want is the set of instances of the class G. I don't know how to construct this as a Parent or even if this is allowed. On Sep 2, 12:49 pm, Florent Hivert florent.hiv...@univ-rouen.fr wrote: Hi Bruce, On Thu, Sep 02, 2010 at 03:33:21AM -0700, Bruce wrote: I am trying to construct the fee module on the set of instances of a class G. I start with M = CombinatorialFreeModule(QQ,G) If f,g are instances of G I then continue with a = M.monomial(f) b = M.monomial(g) and I can then form a+a , a+b etc. and a - a is indeed 0. However if I try 2*a I get a TypeError If I try M = CombinatorialFreeModule(QQ,NonNegativeIntegers()) a = M.monomial(3) then 2*a seems to work fine. Can anyone tell me what I am doing wrong and/or explain this? I'm in a hurry. so this is only a very short answer. It is maybe a bug but in the usual usage in M = CombinatorialFreeModule(QQ,G) G is supposed to be an Parent (mathematical object) and ont a class (python stuff). I'm not sure if this is enforced or not. Cheers, Florent -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
[sage-combinat-devel] Re: CombinatorialFreeModule (again)
I have played around following Florent's comment and the following seems to work (while at the same time displaying my ignorance) class G: blah = 0 f =G() g=G() p=parent(f) M=CombinatorialFreeModule(QQ,p) a=M.monomial(f) b=M.monomial(g) (2/3)*a+(4/5)*b -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
Re: [sage-combinat-devel] Re: CombinatorialFreeModule (again)
Hi Bruce, Incidentally, the following works for me, with sage 4.5.2, which I think was your minimal counter-example. Did I misunderstand? What version of sage are you using? sage: class G: : blah = 0 : sage: f = G() sage: g = G() sage: M = CombinatorialFreeModule(QQ, G) sage: a = M.monomial(f) sage: b = M.monomial(g) sage: a + b B[__main__.G instance at 0xb39928c] + B[__main__.G instance at 0xb3992cc] sage: a - a 0 sage: 2*a 2*B[__main__.G instance at 0xb39928c] However, this is not really the way this whole construct was intended to be used. Your G is a *class* which has *instances*. What you should be passing in is a Parent (in sage-speak) or a *set* (in math-speak) which has *elements*. For example, if I say: sage: class G: : blah = 0 : sage: f = G() then f is an instance of the class G (think: 'an example of a G'); this is different from being 'an element of G'. This is why constructions such as sage: C = CombinatorialFreeModule(QQ,[1,2,3]) will work. Sage can easily interpret [1,2,3] as a set. So what you probably want to do is to define two classes, one of which inherits from the class Parent and represents a set, the other of which inherits from SageObject (or something more specific) and represents the elements of the first class. There are few specific lines of codes here that you must include here, that I will undoubtedly mess up if I try to write them on the fly. Does anyone know of a minimal example where a Parent and Element class are defined? Cheers, Jason On 09/02/2010 02:39 PM, Bruce wrote: I have played around following Florent's comment and the following seems to work (while at the same time displaying my ignorance) class G: blah = 0 f =G() g=G() p=parent(f) M=CombinatorialFreeModule(QQ,p) a=M.monomial(f) b=M.monomial(g) (2/3)*a+(4/5)*b -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
[sage-combinat-devel] Re: CombinatorialFreeModule (again)
On Sep 2, 3:33 am, Bruce brucewestb...@gmail.com wrote: I am trying to construct the free module on the set of instances of a class G. Did you also ask this on ask.sagemath.org? I've posted some possibly related ideas in the thread http://ask.sagemath.org/question/94/using- combinatorialfreemodule. -- John -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-de...@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
Re: [sage-devel] Re: non-stable .spkgs (alpha, beta, svn/cvs snapshots etc)
On 2 Sep, 05:55, François Bissey f.r.bis...@massey.ac.nz wrote: Who would agree with making this a policy and so adding to the Sage Developers Guide a few sentences saying that any updates of packages that are not to a stable release (i.e snapshots, alpha, beta, release candidates etc) should be discussed on sage-devel first? +1 or -1 ? +1 but how do you make it more visible? I do not understand what you mean. Do you mean visible in the Sage Developers Guide? Since I think it's quite important, putting part of it in bold might be a good idea. Or do you mean more visible on sage-devel? Perhaps a subject line of Can we upgrade $package to a non-stable release? might be a good idea. on sage-devel, yes more like [request to upgrade to unstable] may even be better. My point was that a thread doesn't necessarilly get a lot of attention. Do you want to have a vote as well? I'd not really considered that. I guess a vote would be a good idea, though I think the main thing is that it is discussed I guess it could be followed by a vote. We are probably defining policy here. Given comments from some other threads in which I abstained to participate there should be a minimum number of votes set to proceed on something. There was a very short thread about numpy-1.5 before the dev opened the ticket and started coding. Of course a ticket opened with code in it doesn't mean that it can be blindly merged so there could be a second gate at this point before a decision is made to merge. Francois True. But if person A creates the ticket, person B reviews it and the release manager finds it passes, it may end up getting merged. I see that as someone not doing there job properly if we were to decide that a vote is required in that case. Let's face it, we can always imagine a scenario where safeguards fails. We are just minimizing risks and damages. Francois -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: sage -spkg may hang
Hi Mitesh, On Sep 2, 12:42 am, Mitesh Patel qed...@gmail.com wrote: ... If you still have a copy of the hanging package directory, could you try print-debugging to isolate the problem? Possibilities include the system calls to 'tar' and to 'sage -hg diff'. I reconstructed the hanging package directory, and additional print statements in spkg-pkg located the problem: I have a print statement before and after the line p = Popen(cd %s; sage --hg diff % dir, shell=True, stdout=PIPE, stderr=PIPE) *Both* print statements are executed. Then, I inserted print p.stdout.read() which was executed as well. Amazing enough, *with* that additional line, the package was created! Then, I replaced it by print p.stderr.read() and this is what hangs. Indeed, the next line in the unmodified script is if len(p.stderr.read()) != 0: So, that's the problem. Why is p.stderr.read() hanging? And why does it not hang if p.stdout.read() is called first? Cheers, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Random banter about Sage standards
On Wed, Sep 1, 2010 at 6:08 PM, Jason Grout jason-s...@creativetrax.com wrote: On 9/1/10 10:32 AM, Bill Hart wrote: Tim, all screwing around aside for a moment. I broadly agree with your sentiments. However, there are also some issues with what you are suggesting. And I mean to make these observations in all seriousness. I'm reading this thread with great interest. Though I don't have strong feelings one way or the other at this time, your post made a lot of sense to me. Thanks for the post. Jason I've written a blog post that is relevant to this thread: http://389a.blogspot.com/2010/09/purple-sage.html -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] New component on trac - PLEASE CHANGE
As you may have noticed, if you create a ticket on trac, the default component is algebra, as that is the first component in alphabetical order. That means anyone that forgets to set a component properly will get it set to algebra and it assigned to AlexGhitza. I've added a component PLEASE CHANGE and made that the default component. That should prevent Alex Ghitza getting all the tickets where someone forgot to set the component. Hopefully, being in all capitals, will attract someone's attention that they need to change it. It would be good if one could not create a ticket at all without setting the component, but I don't know how to do that. It may not be possible at all. Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Random banter about Sage standards
William Stein wrote: On Wed, Sep 1, 2010 at 6:08 PM, Jason Grout jason-s...@creativetrax.com wrote: On 9/1/10 10:32 AM, Bill Hart wrote: Tim, all screwing around aside for a moment. I broadly agree with your sentiments. However, there are also some issues with what you are suggesting. And I mean to make these observations in all seriousness. I'm reading this thread with great interest. Though I don't have strong feelings one way or the other at this time, your post made a lot of sense to me. Thanks for the post. Jason I've written a blog post that is relevant to this thread: http://389a.blogspot.com/2010/09/purple-sage.html As I understand your post, you are creating software for your own personal use. Clearly the only standards that matter are your own. Do you agree that creating software that the world should use might require different standards? What would you expect those standards to be? Should the code be required to do more than just compile and run a simple test? -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Trac components
A few questions I have about trac. 1) There are components of graph theory and group_theory. Is the underscore on group_theory supposed to make it less easy to confuse with graph theory, or is it just a mistake and so the underscore should be removed? 2) Should there be a linear programming component now GLPK is in Sage? 3) What's the point of the packages component? It seems that tons of tickets could be put in that. I can't see any individual wanting to be sent tickets on any of nearly 100 packages in Sage. Not surprisingly, it is owned by tbd - i.e. nobody. 4) Could some of the other tickets usefully add a package name to them. i.e. linear algebra, put linear algebra: ATLAS etc? As a non-mathematician, I often find it very difficult to know what to categorise some random .spkg under. Even when I read the web sites, I'm often none the wiser. Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] PhD position Industrial Algebra available (aka The PolyBoRi PhD)
Hello everybody, I'm looking for a suitable PhD candidate for a position at the Fraunhofer ITWM in Kaiserslautern, Germany. The topic is Industrial Algebra : Hopefully, there's somebody out there with the following skills: * Computer Algebra, in particular Gröbner methods * Experience with at least one Computer Algebra System (for instance Sage, Singular, Magma, PolyBoRi) * Software development (C, C++, nice to have Python) * (Applied) Algebraic Geometry * Commutative Algebra Nice to have would be some experience with in some of the following areas: digital systems, cryptoanalysis, model checking or formal verification. The candidate should speak fluently English or German, or both of it. If you are interested, please contact me via e-mail as soon as possible (best before end of September)! Best regards, Alexander Dreyer -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: PhD position Industrial Algebra available (aka The PolyBoRi PhD)
PS: You may also use Reply to Author to contact me. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Random banter about Sage standards
On Sep 2, 5:28 am, William Stein wst...@gmail.com wrote: On Wed, Sep 1, 2010 at 6:08 PM, Jason Grout jason-s...@creativetrax.com wrote: On 9/1/10 10:32 AM, Bill Hart wrote: Tim, all screwing around aside for a moment. I broadly agree with your sentiments. However, there are also some issues with what you are suggesting. And I mean to make these observations in all seriousness. I'm reading this thread with great interest. Though I don't have strong feelings one way or the other at this time, your post made a lot of sense to me. Thanks for the post. Jason I've written a blog post that is relevant to this thread: http://389a.blogspot.com/2010/09/purple-sage.html PSAGE could in the long run lead to a more modular approach to Sage itself. For example, the PSAGE library will be a Python library like any other, and it should be possible to just install it into an existing Sage as an optional package. But could it become incompatible with other Sage stuff? For instance, probably even in existing spkgs there could be competing definitions of this or that thing... or maybe not? It would be helpful to have it be an optional package from the beginning, so that if we ever (!) got automated testing, one could just take a fresh build, install psage, and then run doctests. If what I'm saying doesn't make sense (maybe because of namespaces not conflicting?), sorry for the noise. It would just be nice to make sure that some of the prophecies occasionally made on this list about Sage's death didn't happen prematurely because a lot of active developers realized psage was more useful to them without it being totally compatible from the start :) - kcrisman -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: consistent style for sagemath.org and sage documentation
On Sep 1, 11:33 pm, Niles nil...@gmail.com wrote: Here's a screenshot of some very basic changes, using the colors from sagemath.org: http://www.nilesjohnson.net/sage-style-docs.png Nice, but some time ago I picked some colors for the website and if I'll ever give it some refreshment, at least the basic layout and the colors, I'll use the ones from here: http://boxen.math.washington.edu/home/schilly/newColorScheme.html so, your top bar probably: #1919b3 with white text the light-blue area is #c8c8ff Test 4 for the headers and if you are fed up with blue, use yellow/orange/brown for the fonts or other elements. if this really goes in, let's flip your proposal and i'm very motivated to give the website some more colors according to the styling of the documentation pages ;) And when you edit the CSS, there was once an issue reported with a too narrow column on the index page here: http://www.sagemath.org/doc/reference/genindex-K.html (if it looks fine for you after scrolling to the right, make your window smaller. the width of that element is set to 100% but since the text strings are much longer, it overlaps to the right. either make it wider or enable linebreaks. i don't know what is the best solution for that) i can also design you a better logo, just tell me the dimensions via email and i'll create it for you. H -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: consistent style for sagemath.org and sage documentation
After a while, I decided to see how hard this might be to change . . . as you would expect, it was totally trivial (at least for a first pass). Here's a screenshot of some very basic changes, using the colors from sagemath.org: http://www.nilesjohnson.net/sage-style-docs.png That's a great start, nice to see how quickly customizable a lot of this is. Does this discussion belong (also) on sage-marketing, by the way? Unified color schemes are a hot topic in that realm, as Harald implies in this thread elsewhere. - kcrisman -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Random banter about Sage standards
Is it pronounced Piss-ige or Pee-Sage? What does the P stand for? I know that dogs, etc. mark locations this way, so maybe that has to do with geometry? see sage-flame for a snarkier comment. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: consistent style for sagemath.org and sage documentation
Hello all, A ticket for this now exists at http://trac.sagemath.org/sage_trac/ticket/9850 and it contains the patch with a screenshot. On Sep 1, 9:21 pm, Jason Grout jason-s...@creativetrax.com wrote: On 9/1/10 5:17 PM, Rob Beezer wrote: The sick green has always been a bit jarring to my eye. Maybe a light beige or cream? But not puce. +1 to changing the green to something more pleasing. What color is your bikeshed? ;-) As for sick green, I've attempted to replace this with light sage. Aside from the pun(!), there's another reason not to stray too far from the default: maintaining contrast with the many different colors used for text in code blocks (orange, dark blue, light blue, dark green, medium green, black by default). I haven't yet figured out how to change them--it will probably be easy, but not in the same way that it's easy to change the color of code blocks. Yes, off-white or beige will probably be fine too . . . but now you can put your suggestions with corresponding patches on the trac ticket ;) thanks for reading, Niles -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: A Mathematica parser for Sage.
On 09/ 2/10 06:10 AM, rjf wrote: the mathematica syntax parser that I wrote appears to run inside Maxima, so you can, if you wish, feed such text to the mma-in-maxima system. Sorry to sound green, but I barely know Maxima, and do not know Lisp at all. I do know Mathematica - though I'm certainly not at expert at it. There's no README file in the source code I found of yours, so it's far from obvious to me how I would use it. Are there any differences between the paper I found on your web site, and the paper published in a peer reviewed journal? Certainly from reading the paper, it gives no indication that this runs as part of Maxima. It gives the impression to me that this is written in lisp, to run under the lisp interpreter directly - not under Maxima. I'm a bit confused on this issue. The intent in that project is mainly to take mma syntax for expressions and map it into maxima, and not take the big step of having a more-or-less full mathematica evaluator in Maxima. How complex in your opinion would it be to create a parser for Mathematica in C/C++/Python/Lisp/whaterver-is-most-suitable which could call the right part of Sage for a particular tasks? In other words, call Maxima for integration, perhaps the GSL for Bessel functions, etc. I realise a complete parser would be impossible due to the fact Sage simply does not have all the functionality of Mathematica. I'm pretty sure this is a non-trivial project, but my background is engineering, not maths or computer science, so I don't have a lot of understanding of the complexity involved. I just bought a book on Lex + Yacc (around the US equivalent of $1 used). I've no idea if they would be suitable tools or not, but at 1$ I'm not going to go bankrupt. I gather there are several types of parser LL, LR etc. I've no idea what type is best for parsing Mathematica. Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: consistent style for sagemath.org and sage documentation
On Sep 2, 1:59 pm, kcrisman kcris...@gmail.com wrote: Does this discussion belong (also) on sage-marketing, by the way? Indeed; I'm forwarding it now. Dear sage-marketing, Here's the link to the beginning of this thread http://groups.google.com/group/sage-devel/browse_thread/thread/73e3c4c995577df0 I did try to make a version using the color scheme Harald pointed me to, but I wasn't so happy with it and decided it's probably easier for interested parties to tweak the colors themselves than to explain to me what they're thinking. Here (again) is the trac ticket with screenshot and patch: http://trac.sagemath.org/sage_trac/ticket/9850 -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: A Mathematica parser for Sage.
On Sep 2, 2:23 pm, Dr. David Kirkby david.kir...@onetel.net wrote: On 09/ 2/10 06:10 AM, rjf wrote: the mathematica syntax parser that I wrote appears to run inside Maxima, so you can, if you wish, feed such text to the mma-in-maxima system. Sorry to sound green, but I barely know Maxima, and do not know Lisp at all. I do know Mathematica - though I'm certainly not at expert at it. There's no README file in the source code I found of yours, so it's far from obvious to me how I would use it. um, I don't know where you looked, but here is one place.. http://www.cs.berkeley.edu/~fateman/mma1.6/ I forget exactly, but I think it is approximately, get all those files in that directory. start a lisp in that directory. (load capsonlyparser.lisp) (in-package :mma) (p) then type some mathematica and hit two returns. Better lisps that don't do everything in caps would use the regular parser file, which is easier to read and modify. Are there any differences between the paper I found on your web site, and the paper published in a peer reviewed journal? probably not Certainly from reading the paper, it gives no indication that this runs as part of Maxima. Right. The adaptation was the work of someone else to load it into Maxima. Check sourceforge. John Lapeyre was the author. It gives the impression to me that this is written in lisp, to run under the lisp interpreter directly - not under Maxima. I'm a bit confused on this issue. My program can run without Maxima. The intent in that project is mainly to take mma syntax for expressions and map it into maxima, and not take the big step of having a more-or-less full mathematica evaluator in Maxima. How complex in your opinion would it be to create a parser for Mathematica in C/C++/Python/Lisp/whaterver-is-most-suitable which could call the right part of Sage for a particular tasks? In other words, call Maxima for integration, perhaps the GSL for Bessel functions, etc. Well, if you want to load GSL or whatever into lisp, then you can use the parser that is already in Lisp. As for a whatever is most suitable to create a parser for Mathematica, that would have to be Mathematica, since it is already done. If you want an #2, I would say Lisp. I realise a complete parser would be impossible due to the fact Sage simply does not have all the functionality of Mathematica. You could still have a complete parser.You would not have an evaluator that was complete. I'm pretty sure this is a non-trivial project, but my background is engineering, not maths or computer science, so I don't have a lot of understanding of the complexity involved. I just bought a book on Lex + Yacc (around the US equivalent of $1 used). I've no idea if they would be suitable tools or not, but at 1$ I'm not going to go bankrupt. Unfortunately, WRI does not give you a context free grammar for Mathematica, nor does it give you a description of the tokens that you can use. So Lex and Yacc are not directly applicable. I gather there are several types of parser LL, LR etc. I've no idea what type is best for parsing Mathematica. Since Mathematica's language is not a context free language, as far as I can tell, none of these abstract classes of parsers will entirely work. There are constructs in Mathematica that appear to require ad hoc parsing techniques. Though much of it can be done by some kind of table-driven parser, e.g. LALR or LL. The MockMMA lexer and parser are modified from a recursive descent parser with variable look-ahead. My suggestion is that you find someone who knows lisp, or is willing to learn it, and then use the parser, free. or I suppose you could have someone write a parser in Python, but then you'd might have to write a substantial portion of Lisp, too, for the representation and manipulation of the intermediate expressions. So Lisp turns out to be a pretty substantial win. RJF -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: sage -spkg may hang
On 09/02/2010 03:17 AM, Simon King wrote: On Sep 2, 12:42 am, Mitesh Patel qed...@gmail.com wrote: ... If you still have a copy of the hanging package directory, could you try print-debugging to isolate the problem? Possibilities include the system calls to 'tar' and to 'sage -hg diff'. I reconstructed the hanging package directory, and additional print statements in spkg-pkg located the problem: I have a print statement before and after the line p = Popen(cd %s; sage --hg diff % dir, shell=True, stdout=PIPE, stderr=PIPE) *Both* print statements are executed. Then, I inserted print p.stdout.read() which was executed as well. Amazing enough, *with* that additional line, the package was created! Then, I replaced it by print p.stderr.read() and this is what hangs. Indeed, the next line in the unmodified script is if len(p.stderr.read()) != 0: So, that's the problem. Why is p.stderr.read() hanging? And why does it not hang if p.stdout.read() is called first? I just noticed this Warning Use communicate() rather than .stdin.write, .stdout.read or .stderr.read to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking the child process. near http://docs.python.org/library/subprocess.html#subprocess.Popen.kill Maybe it's relevant? Could you give a link to a compressed archive of the directory? -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] broken links on sagemath.org
Hello sagemath.org web people, I have a link to http://www.sagemath.org/why/muntingh-sage-review/muntingh-sage-review/node2.html which is broken. There's a link to the same kind of page from http://wiki.sagemath.org/SAGE_in_the_News which is also broken. Can someone with access to the sagemath.org web server find that review and put it back up? Or find a different link that works? Thanks! Dan -- --- Dan Drake - http://mathsci.kaist.ac.kr/~drake --- signature.asc Description: Digital signature
Re: [sage-devel] broken links on sagemath.org
Hi Dan, On Fri, Sep 3, 2010 at 1:13 PM, Dan Drake dr...@kaist.edu wrote: Hello sagemath.org web people, I have a link to http://www.sagemath.org/why/muntingh-sage-review/muntingh-sage-review/node2.html which is broken. I think that broken link came about during the redesign of the library category. There's a link to the same kind of page from http://wiki.sagemath.org/SAGE_in_the_News which is also broken. Can someone with access to the sagemath.org web server find that review and put it back up? Or find a different link that works? You can easily link to this URL http://georgm.blogspot.com/2007/03/sage-computer-algebra-system.html which is the same review. A PDF is available at http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.127.8164 I have edited the wiki page http://wiki.sagemath.org/SAGE_in_the_News to point to http://georgm.blogspot.com/2007/03/sage-computer-algebra-system.html -- Regards Minh Van Nguyen -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org