[sage-support] Re: Dimensional Analysis or Unit Conversion capability?
On Jun 12, 2009, at 3:07 PM, Maurizio wrote: Hi I'm going to suggest that interested parties just write a new package for Sage, after reviewing existing packages, instead of trying to bolt one of the existing packages onto Sage. I have honestly taken this into account, but there are a couple of cons: - nobody is volunteering, so the amount of work-time seems very limited - I don't like to reinvent the wheel, that's why I like SAGE so much - I have very limited experience about Python programming (especially classes and stuff like that) - I would like to take advantage of others' experience about designing a package like that Unit conversion and dimensions analysis isn't very complicated, so it's probably easier to just write it anew. The existing packages have various features, so someone can just pick and choose the features they want. Yep, it's not very hard, but it's apparently not very important either (relative to other stuff going on). By the way, do you think is it convenient to create a new wiki page about this topic to summarize all this stuff? I have two questions: first of all, I don't know how to do that, even if it seems pretty easy to modify an existing page. The second question is: on the wiki itself, the developers suggest to create a trac ticket with a wish list, instead of creating wiki pages. Nonetheless, there is that SEP (SAGE Enhancement Proposal) there, which seems a suitable place to write. Last doubt: is anybody going to read it? :) A wiki page has a much more permanent and easy to read than an email thread. A wishlist trac ticket is good for smaller, easily defined chunks, but not for collaboratively deciding (and recording) what the plan of attack is. It also makes it easier to pick up and see what the current status of something is. This is more like a SEP (albeit a small one) than a ticket. - Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Interior points of a parametric graph
2009/6/12 Ethan Van Andel evlu...@gmail.com: I want to evaluate a function on points in the interior of a parametric function. Essentially what I'm trying to do is call complex_plot on the interior of a figure. To do this, I need some way to check whether a given point is in the figure, or simply generate a good list of points that are in. What is the best way to do this? It seems like when sage has to do something to the interior of a figure (like fill a parametric plot) it uses a polygon which presumable knows/can generate points in the interior. However, I cant track down, in the documentation, the code that does this. Where should I look? The code that does this is in the matplotlib library, which is a Python library Sage includes to do plotting. -- William Thanks to everyone who has answered my questions so far. -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Optimization Resources
2009/6/12 evlu...@gmail.com evlu...@gmail.com: I'm working on some code that is very computationally intensive. I'm pretty sure my algorithm is good, but I know that tiny differences in wording in sage can make a huge runtime difference. Is there any site/ blog/whatever that I could look at to find out what makes for fast sage code? I figure this is preferable to constantly spamming sage- support with optimization questions. In my experience, if you want to write really fast code using Sage or any other software there is no substitute for putting in the work to deeply understand the algorithms you are using and how they are implemented.Nothing beats reading the source code, etc. If foo is any Sage function one way to get started reading the sources for foo is to type foo?. Often code in any math software system is far from optimal, and only gets (a lot) faster when somebody decides to build something using that software, and either improves Sage or at the least complains about parts of the software that are two slow -- e.g., yesterday somebody complained to me that determinants of sparse matrices over ZZ in Sage are currently really slow compared to dets of dense matrices, so I'll likely fix this. -- William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Optimization Resources
On Sat, Jun 13, 2009 at 5:27 PM, William Steinwst...@gmail.com wrote: 2009/6/12 evlu...@gmail.com evlu...@gmail.com: I'm working on some code that is very computationally intensive. I'm pretty sure my algorithm is good, but I know that tiny differences in wording in sage can make a huge runtime difference. Is there any site/ blog/whatever that I could look at to find out what makes for fast sage code? I figure this is preferable to constantly spamming sage- support with optimization questions. In my experience, if you want to write really fast code using Sage or any other software there is no substitute for putting in the work to deeply understand the algorithms you are using and how they are implemented. Nothing beats reading the source code, etc. If foo is any Sage function one way to get started reading the sources for foo is to type foo?. Just to add to William's comments, the command sage: foo? shows the online documentation of the function foo. To get the source code for foo, do sage: foo?? That is, type two question marks after the function name. Both foo? and foo?? also show the path to the source file in which foo can be found, so that should be an indication of where to look. In my experience, a choice of data structure is also important. For example, searching with a dictionary is usually way faster than implementing your own search algorithm. One needs to work on a case by case basis. -- Regards Minh Van Nguyen --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: show(integrate(sin(x^2))) does not format correctly
2009/6/12 jon mr.j.stewart@btinternet.com: I have just installed Sage Version 4.0.1 vmware image on windows XP. I am using the Sage notebook. Browser is firefox 3.0.6 (with the TeX fonts installed for jsMath) Typeset is checked in the notebook. When I evaluate the fields in the demo page the result for the show (integrate(sin(x^2))) does not format correctly. The latex formatted result should be as below. \frac{{\sqrt{ \pi } \left( {\left( {\sqrt{ 2 } i} + \sqrt{ 2 } \right) \text{erf} \left( \frac{{\left( {\sqrt{ 2 } i} + \sqrt{ 2 } \right) x}} {2} \right)} + {\left( {\sqrt{ 2 } i} - \sqrt{ 2 } \right) \text{erf} \left( \frac{{\left( {\sqrt{ 2 } i} - \sqrt{ 2 } \right) x}}{2} \right)} \right)}}{8} (This is in the html of the flat demo page included in the install) But when I click on evaluate the formatted result changes to this: \frac{1}{8} \, {(\left(I - 1\right) \, \sqrt{2} \mbox{\text{erf}}\left (\left(\frac{1}{2} I - \frac{1}{2}\right) \, \sqrt{2} x\right) + \left (I + 1\right) \, \sqrt{2} \mbox{\text{erf}}\left(\left(\frac{1}{2} I + \frac{1}{2}\right) \, \sqrt{2} x\right))} \sqrt{\pi} The latex formatting is different and the square root of -1 is being returned as I (uppercase) and not as i (lowercase). Is there a configuration change I have to make to get my installation to behave the same as the installation the demo page was saved on? No. The version of Sage in which the sample worksheet was created is different than the version of Sage that ships with sage-vmware-4.0.1. I should just update the sample worksheet using the new version of Sage. William -- William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] strange behavior
Hay I am a bit annoyed by sage... I just want to print a function two times and sage gives me an error... this is the first script #!/usr/bin/env sage -python import sys from sage.all import * import functions from functions import * grav_const = 4.3e-06 pi = 3.14159265358979323846 sat_mass = 20. print Ok... dann legen wir mal los!\n print step1: definition of the density profile r = 0.08 print rho(r),\n print step3: definition of the integrated mass print mass(r).n(),\n print step3: definition of the integrated mass print mass(r).n(),\n the function definition is the following import sys from sage.all import * def rho(r): return 1.32419e+08/(1.+(r/0.81))**3 def mass(r): pi = 3.14159265358979323846 x=var('x') assume(x0) i_term = integral(x**2*rho(x), x, 0, r) return i_term*4.*pi; so I just try to plot the mass two times... the error message of sage is not very helpful (at least to me) thanks for any help florian --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Help! Why the polynomial is not generated for Multivariate Polynomial Ring in y0, y1, y2, y3, y4, y5, y6, y7, x0, x1, x2, x3, x4, x5, x6, x7 over Finite Field of size 2
sage: hg_sage.patch('sbox_call_and_rest.patch'); cd /usr/local/bin/sage-3.4.2/devel/sage hg status cd /usr/local/bin/sage-3.4.2/devel/sage hg status cd /usr/local/bin/sage-3.4.2/devel/sage hg import /usr/local/ bin/sbox_call_and_rest.patch applying /usr/local/bin/sbox_call_and_rest.patch patching file doc/en/reference/cryptography.rst Hunk #1 FAILED at 16 1 out of 1 hunks FAILED -- saving rejects to file doc/en/reference/ cryptography.rst.rej patching file sage/crypto/mq/sbox.py Hunk #1 FAILED at 0 Hunk #2 FAILED at 45 Hunk #3 FAILED at 105 Hunk #4 FAILED at 115 Hunk #5 FAILED at 126 Hunk #6 FAILED at 134 Hunk #7 FAILED at 163 Hunk #8 FAILED at 191 Hunk #9 FAILED at 204 Hunk #10 FAILED at 246 Hunk #11 FAILED at 262 Hunk #12 FAILED at 270 Hunk #13 FAILED at 287 Hunk #14 FAILED at 301 Hunk #15 FAILED at 319 Hunk #16 FAILED at 329 Hunk #17 FAILED at 349 Hunk #18 FAILED at 375 Hunk #19 FAILED at 392 Hunk #20 FAILED at 401 Hunk #21 FAILED at 420 Hunk #22 FAILED at 432 Hunk #23 FAILED at 468 Hunk #24 FAILED at 487 Hunk #25 FAILED at 499 Hunk #26 FAILED at 522 Hunk #27 FAILED at 550 Hunk #28 FAILED at 590 Hunk #29 FAILED at 598 Hunk #30 FAILED at 682 Hunk #31 FAILED at 713 31 out of 31 hunks FAILED -- saving rejects to file sage/crypto/mq/ sbox.py.rej abort: patch failed to apply Still Error! On May 29, 1:14 am, LBerlioz luisberl...@gmail.com wrote: maybe this quick tutorial can be useful:http://www.sagemath.org/doc/developer/producing_patches.html --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Help! Why the polynomial is not generated for Multivariate Polynomial Ring in y0, y1, y2, y3, y4, y5, y6, y7, x0, x1, x2, x3, x4, x5, x6, x7 over Finite Field of size 2
Hi Saj, On Sat, Jun 13, 2009 at 9:32 PM, Sajammasa...@gmail.com wrote: SNIP First, you should create another copy of the main Sage library. This is called cloning. Here, I switch to the main Sage repository, then clone it, naming my clone 6139 to reflect the ticket number that I'm dealing with: {{{ [mv...@darkstar sage-4.0]$ ./sage -b main system messages [mv...@darkstar sage-4.0]$ ./sage -clone 6139 more system messages }}} After cloning, I then switch to the cloned repository and start applying patches: {{{ [mv...@darkstar sage-4.0]$ ./sage -br 6139 more system messages -- | Sage Version 4.0, Release Date: 2009-05-29 | | Type notebook() for the GUI, and license() for information.| -- Loading Sage library. Current Mercurial branch is: 6139 sage: hg_sage.apply(http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/sbox_call_and_rest.patch;) Attempting to load remote file: http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/sbox_call_and_rest.patch Loading: [...] cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg import /home/mvngu/.sage/temp/darkstar/6309/tmp_1.patch applying /home/mvngu/.sage/temp/darkstar/6309/tmp_1.patch sage: hg_sage.apply(http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/trac_6139-reviewer.patch;) Attempting to load remote file: http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/trac_6139-reviewer.patch Loading: [.] cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg import /home/mvngu/.sage/temp/darkstar/6309/tmp_2.patch applying /home/mvngu/.sage/temp/darkstar/6309/tmp_2.patch }}} Now I quit Sage, start it again using the 6139 branch, and proceed with working using that branch: {{{ sage: exit Exiting SAGE (CPU time 0m0.41s, Wall time 0m44.16s). [mv...@darkstar sage-4.0]$ ./sage -br 6139 more system messages -- | Sage Version 4.0, Release Date: 2009-05-29 | | Type notebook() for the GUI, and license() for information.| -- Loading Sage library. Current Mercurial branch is: 6139 sage: S = mq.SBox(3, 0, 1, 3, 1, 0, 2, 2) sage: S(0) 3 sage: S([0,0,0]) [1, 1] }}} Anyway, I noticed in previous emails on this thread that you installed Sage in a system-wide directory, i.e. somewhere under /usr/local. That's only recommended if other users besides yourself on the system will be using the Sage installation. You don't need to install Sage in a system-wide directory. You can install it under your home directory. Hope the tips help. -- Regards Minh Van Nguyen --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Help! Why the polynomial is not generated for Multivariate Polynomial Ring in y0, y1, y2, y3, y4, y5, y6, y7, x0, x1, x2, x3, x4, x5, x6, x7 over Finite Field of size 2
Thanks Minh Nguyen. It worked great! On Jun 13, 5:17 pm, Minh Nguyen nguyenmi...@gmail.com wrote: Hi Saj, On Sat, Jun 13, 2009 at 9:32 PM, Sajammasa...@gmail.com wrote: SNIP First, you should create another copy of the main Sage library. This is called cloning. Here, I switch to the main Sage repository, then clone it, naming my clone 6139 to reflect the ticket number that I'm dealing with: {{{ [mv...@darkstar sage-4.0]$ ./sage -b main system messages [mv...@darkstar sage-4.0]$ ./sage -clone 6139 more system messages}}} After cloning, I then switch to the cloned repository and start applying patches: {{{ [mv...@darkstar sage-4.0]$ ./sage -br 6139 more system messages -- | Sage Version 4.0, Release Date: 2009-05-29 | | Type notebook() for the GUI, and license() for information. | -- Loading Sage library. Current Mercurial branch is: 6139 sage: hg_sage.apply(http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/sbox_ca...;) Attempting to load remote file:http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/sbox_ca... Loading: [...] cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg import /home/mvngu/.sage/temp/darkstar/6309/tmp_1.patch applying /home/mvngu/.sage/temp/darkstar/6309/tmp_1.patch sage: hg_sage.apply(http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/trac_61...;) Attempting to load remote file:http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6139/trac_61... Loading: [.] cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg status cd /home/mvngu/usr/bin/sage-4.0/devel/sage hg import /home/mvngu/.sage/temp/darkstar/6309/tmp_2.patch applying /home/mvngu/.sage/temp/darkstar/6309/tmp_2.patch}}} Now I quit Sage, start it again using the 6139 branch, and proceed with working using that branch: {{{ sage: exit Exiting SAGE (CPU time 0m0.41s, Wall time 0m44.16s). [mv...@darkstar sage-4.0]$ ./sage -br 6139 more system messages -- | Sage Version 4.0, Release Date: 2009-05-29 | | Type notebook() for the GUI, and license() for information. | -- Loading Sage library. Current Mercurial branch is: 6139 sage: S = mq.SBox(3, 0, 1, 3, 1, 0, 2, 2) sage: S(0) 3 sage: S([0,0,0]) [1, 1]}}} Anyway, I noticed in previous emails on this thread that you installed Sage in a system-wide directory, i.e. somewhere under /usr/local. That's only recommended if other users besides yourself on the system will be using the Sage installation. You don't need to install Sage in a system-wide directory. You can install it under your home directory. Hope the tips help. -- Regards Minh Van Nguyen --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Mac OS X 10.4 32bit G4 Support
I think it is about time to do a serious audit of the Sage distribution and figure out precisely why it has got so large.I'm puzzled though by the 680MB compressed, since the binaries here are much smaller than that: http://sagemath.org/bin/apple_osx/intel/index.html Did you use sage -bdist 4.0.1-OSX10.4-PowerPC to make the binary? If not, then you've made one that would be too big. Well, I downloaded the source code http://www.sagemath.org/src/sage-4.0.1.tar and typed make. Afterwards, I created the .dmg file with Disk Utility command FileNewCreate Image from Folder. There's only one compression grade. XCode version is 2.5 on Mac OS X 10.4.11 (my machine is too old for OS X 10.5). Hope this helps. Regards, Lukas --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Mac OS X 10.4 32bit G4 Support
2009/6/13 paramaniac luka...@student.ethz.ch: I think it is about time to do a serious audit of the Sage distribution and figure out precisely why it has got so large. I'm puzzled though by the 680MB compressed, since the binaries here are much smaller than that: http://sagemath.org/bin/apple_osx/intel/index.html Did you use sage -bdist 4.0.1-OSX10.4-PowerPC to make the binary? If not, then you've made one that would be too big. Well, I downloaded the source code http://www.sagemath.org/src/sage-4.0.1.tar and typed make. Afterwards, I created the .dmg file with Disk Utility command FileNewCreate Image from Folder. There's only one compression grade. XCode version is 2.5 on Mac OS X 10.4.11 (my machine is too old for OS X 10.5). Hope this helps. That's definitely the wrong thing to do. You should make the dmg by typing ./sage -bdist 4.0.1-OSX10.4-PowerPC and then wait 15 minutes and look in the SAGE_ROOT/dist directory. William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: strange behavior
2009/6/13 Florian Beutler florian.beut...@gmx.de: Hay I am a bit annoyed by sage... I just want to print a function two times and sage gives me an error... this is the first script #!/usr/bin/env sage -python import sys from sage.all import * import functions from functions import * grav_const = 4.3e-06 pi = 3.14159265358979323846 sat_mass = 20. print Ok... dann legen wir mal los!\n print step1: definition of the density profile r = 0.08 print rho(r),\n print step3: definition of the integrated mass print mass(r).n(),\n print step3: definition of the integrated mass print mass(r).n(),\n the function definition is the following import sys from sage.all import * def rho(r): return 1.32419e+08/(1.+(r/0.81))**3 def mass(r): pi = 3.14159265358979323846 x=var('x') assume(x0) i_term = integral(x**2*rho(x), x, 0, r) return i_term*4.*pi; so I just try to plot the mass two times... the error message of sage is not very helpful (at least to me) thanks for any help florian The error message might be helpful to somebody besides you, so perhaps you could post the error message here? William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: notebook doesn't open
Did you ever get a reply? This is my problem also. On Apr 24, 9:58 pm, Yo-Yo yohannes...@gmail.com wrote: Hello all. hope all is well w/ all of u. anywho, when ever i try to use the sage program by writing note as it instructs me to do so, it doesn't appear to work. i am getting an error which states, sh: cannot createnotebook.log: Permission denied echo: write erro: Broken pipe Does any one kno how to fix this problem. your help is dearly appreciated. Thank you all... --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Dimensional Analysis or Unit Conversion capability?
I created the wiki page for this in SEP: http://wiki.sagemath.org/SEP Unfortunately, it seems I don't have the rights to modify the page I created. I attach here that page, can somebody upload it? Any comment is greatly appreciated. Maurizio --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~--- Unit of Measurement.wiki Description: Binary data