[sage-devel] Re: Google wants to make Python 5x faster

2009-06-15 Thread bsdz

On 15 June, 17:48, javier  wrote:
> This looks like good news for sage:
>
> http://code.google.com/p/unladen-swallow/wiki/ProjectPlan

The idea of rewriting of Python's VM to use LLVM is a similar goal to
that of Parrot's VM (http://www.parrot.org/). What makes it more
interesting is that they plan to port the existing Python 2.6 code
base instead writing a new Python interpreter like we are in the Pynie
project (http://code.google.com/p/pynie/).

Looks very interesting. I hope it pans out :)
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Using --enable-framework on Mac OS X?

2009-08-03 Thread bsdz

On 3 Aug, 20:17, Ondrej Certik  wrote:
> On Mon, Aug 3, 2009 at 1:07 PM, William Stein wrote:
> >> Also, what is the state of the windows port of Sage --- will it be
> >> possible to just maintain one spkg and it would build on windows, or
> >> will it be necessary to maintain one spkg for linux/mac and another
> >> one for windows?
>
> > At present the Windows port spkg's are completely different than on 
> > Linux/mac.
> > Obviously that's not what we want in the long run.  However, things
> > are *very* different in Windows land than UNIX land, and something
> > that works under UNIX isn't going to "just work" under native Windows.
>
> Thanks for the clarification. Unfortunately I can't help with the
> windows port in the next couple weeks.
>
> My biggest problem is that if I want to try something on windows, I
> need to bootup my virtualbox with windows 7, then the net connection
> usually doesn't work, so I need to restart windows and it just takes
> too much time. On mac, I just log to bsd.math and quickly
> port/try/test something, it only takes a minute. Another problem is
> that I am very slow doing any changes in the windows terminal, I can't
> easily copy things in and out of the virtualbox etc.
>
> Is there some way to install openssh into windows, so that I can leave
> it running on my workstation somewhere and just use my terminal + ssh
> to log into there and port to windows using this approach? That would
> make me way more effective and I could help more with the porting and
> testing my code in windows.
>
> Ondrej

Perhaps install Cygwin on Windows box along with openssh package. Then
run the sshd-config script (from memory - so please check).

Also http://www.rdesktop.org/ might allow you to connect to the
virtual server using RDP. A bit like VNC.
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Using --enable-framework on Mac OS X?

2009-08-03 Thread bsdz

On 3 Aug, 20:07, William Stein  wrote:
> On Mon, Aug 3, 2009 at 12:02 PM, Ondrej Certik wrote:
>
> > On Wed, May 13, 2009 at 10:46 AM, Brian Granger 
> > wrote:
>
> >> I just pinged the pythonmac-sig group about why and when a framework
> >> build is actually needed.  A while back I created an spkg for qt/pyqt
> >> and I remember that I needed to do a framework build to get it to
> >> work.  My recollection is that if you want Python to be able to do
> >> anything with the native Mac GUI, it needs to be a framework build.
> >> If this is indeed the case, I think it would be a great idea to have
> >> the Sage python be a framework build and I have an older spkg around
> >> somewhere that does this without any bugs (that I know of ;-)).  I
> >> know that in SPD, we would like to be able to have an spkgs for
> >> matplotlib that includes real GUI support.  Plus I know that some
> >> folks are obviously linterested in VTK, Mayavi stuff as well.
>
> >> I will dig up my framework python spkg and get back after I hear from
> >> the pythonmac-sig folks.
>
> > Could you please share it? I have created sip (sip is something like
> > swig, needed to built pyqt) and pyqt packages here:
>
> >http://femhub.googlecode.com/files/sip.spkg
> >http://femhub.googlecode.com/files/pyqt.p1.spkg
>
> > the sip is 0.5MB, pyqt is 1MB, sip builds instantly, pyqt in about 10
> > min on my laptop and 7 min on my workstation (not in parallel).
>
> > So it nicely works on linux, however on mac, the sip package refuses
> > to build, because python is not built with framework support.
>
> > I will use pyqt using traits-qt backend for my gui applications.
>
> > VTK also doesn't build without the framework support, but we'll look
> > at it at scipy09 with Prabhu, so maybe we'll fix it. however, from
> > what I understood above, there is no way to fix pyqt to work with Sage
> > on Mac, unless we use framework.
>
> > Am I missing something? If that is the case, then it's an absolute
> > showstopper for me, if I can't use Sage as a framework for our gui
> > apps. I don't have time thought to invest it into porting things to
> > mac, so for the time being I chose the strategy to disable packages
> > that just don't build on Mac in our distribution (femhub.org) and
> > that's it.
>
> > Also, what is the state of the windows port of Sage --- will it be
> > possible to just maintain one spkg and it would build on windows, or
> > will it be necessary to maintain one spkg for linux/mac and another
> > one for windows?
>
> At present the Windows port spkg's are completely different than on Linux/mac.
> Obviously that's not what we want in the long run.  However, things
> are *very* different in Windows land than UNIX land, and something
> that works under UNIX isn't going to "just work" under native Windows.
>
>  -- William

The packages work in a different way but in theory if you provide an
spkg-windows.bat script in the root of your spkg and following the
simple set of rules set out in the Windows' port "spkg\examples\"
folder (renamed in next release to "local\build_lib\templates\") then
you're mostly there. However, you will still need to make sure your
package builds with Visual Studio and/or nmake.
--~--~-~--~~~---~--~~
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
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] syntax highlighting in notebook textareas

2009-01-06 Thread bsdz

Hi,

I dabbled a little with the vmware version of Sage and was able to
install EditArea, a javascript syntax highlighting library (http://
www.cdolivet.net/index.php?page=editArea). It is quite useful when
editing Python and can be turned on or off. It also allows callbacks
so pressing the save button can run evaluate_cell. It might be an
alternative to using the It's All Text Firefox plug-in.

The installation is very easy.

1) Install the EditArea library under /usr/local/sage/data/extcode/
notebook/javascript.

2) Edit /usr/local/sage/devel/sage-main/build/sage/server/notebook/
notebook.py and add the line: -

head += '\n\n'

after

head += '\n\n'

in function _html_head.

3) Edit /usr/local/sage/devel/sage-main/build/sage/server/notebook/
cell.py and add the lines: -

s += """

  editAreaLoader.init({
  id: "cell_input_%s"
  ,start_highlight: true
  ,allow_resize: "y"
  ,allow_toggle: true
  ,language: "en"
  ,syntax: "python"
  ,save_callback: "evaluate_cell('%s', false)"
  ,toolbar: "save,|, search, go_to_line, |, undo, redo, |,
select_font, |, change_smooth_selection, highlight, reset_highlight,
|, help"
  ,replace_tab_by_spaces: 4
  ,min_height: 350
  ,show_line_colors: true
});

"""%(id, id)

after

s += """
   %s
"""%(cls, r, ncols, id, id, id, id, id, id, t)

in the function html_in.

4) Restart the notebook server.

Hope it might be useful.
Blair


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



[sage-devel] Re: syntax highlighting in notebook textareas

2009-01-08 Thread bsdz

I must admit I did consider TinyMCE amongst many others but I liked
EditArea since it could syntax highlight python code. Other
highlighters either didn't allow editing or didn't have built in
python lexers. I notice the other thread has recently become more
active so I may follow that.

Thanks for the update.

On 8 Jan, 20:24, mabshoff  wrote:
> On Jan 6, 1:33 am, bsdz  wrote:
>
> > Hi,
>
> Hi Blair,
>
> > I dabbled a little with the vmware version of Sage and was able to
> > install EditArea, a javascript syntax highlighting library 
> > (http://www.cdolivet.net/index.php?page=editArea). It is quite useful when
> > editing Python and can be turned on or off. It also allows callbacks
> > so pressing the save button can run evaluate_cell. It might be an
> > alternative to using the It's All Text Firefox plug-in.
>
> 
>
> > Hope it might be useful.
> > Blair
>
> You might want to check out the discussion 
> athttp://groups.google.com/group/sage-devel/browse_thread/thread/a4ba0e...
> about adding support for TinyMCE. It seems that it doesn't support
> syntax highlighting, but that might be an orthogonal issue anyway. At
>
>  http://www.spencerkellis.net/articles.php?post=merging-google-syntax-...
>
> there is a link to a html syntax highlight plugin for TinyMCE, so
> there might be something similar for Python. But I guess it is worth
> checking out, especially if is an an feature one can easily turn on
> and off.
>
> Cheers,
>
> Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: syntax highlighting in notebook textareas

2009-01-09 Thread bsdz

I admit it wouldn't be for everyone. Initially I tried loading it in
using a GreaseMonkey script but discovered that was too late in the
DOM tree. What would be nice is if one could add plug-ins. Perhaps
they could be loaded using xml files much like Google allows. These
initially could be to personalize an environment but I don't see why
one couldn't also include remote python libraries (some security
issues might need to be dealt with mind you).

On Jan 9, 4:25 pm, "William Stein"  wrote:
> On Fri, Jan 9, 2009 at 2:30 AM, Martin Albrecht
>
>
>
>  wrote:
>
> >> Sure. I think that what you want is still orthogonal to the TinyMCE
> >> effort, but having another edit widget in the tree "just" for
> >> highlighting ought to be well thought out and the burden of
> >> maintenance must be taken into account, i.e. if somehow TinyMCE could
> >> be extended to do Python and all the other languages the notebook
> >> supports syntax highlighting via some plugins that would be
> >> preferable. As far as I understand we don't use TinyMCE to edit the
> >> cells themselves yet, but that could be something we might do in the
> >> future.
>
> > One concern I'd have about this is that this added convenience could slow 
> > down
> > the creation and work with the input cells. They're quite snappy now and I
> > would like to keep them that way (rather them being bloated).
>
> > Martin
>
> I also share this concern, having done a lot of the work to make the
> notebook snappy and not bloated.  Last year, Tom Boothby did integrate
> the EditArea code editor into the notebook, and we tried it
> extensively, but it just plain "felt slow", so we didn't go forward
> with including it in Sage at the time.
>
> Tom likes to push the notebook quite hard, e.g., editing dozens of
> very large cells in a single worksheet, so he's pretty sensitive to
> the bloat versus speed issue.
>
>  -- William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: sage/sets/primes.py -- Petition to remove old code

2009-01-23 Thread bsdz

I use it! Actually in my first notebook. Please don't remove.

On Jan 23, 1:43 pm, Robert Miller  wrote:
> Does anyone use this module anymore? It seems, well, a little silly...
>
> sage: P = Primes()
> sage: P
> Set of all prime numbers: 2, 3, 5, 7, ...
> sage: 3 in P
> True
> sage: 4 in P
> False
> sage: P.cardinality()
> +Infinity
> sage: for p in P:
> :     print p
> :     if p > 20: break
> :
> 2
> 3
> 5
> 7
> 11
> 13
> 17
> 19
> 23
> sage: P.list()
> 
>
> That's about all it does.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Windows

2009-01-26 Thread bsdz

I feel one fairly big problem with the VMware installation is the
sheer size of the binary to download. Other issues are performance;
running a Sage server in a VMware session is noticeable slower than
connecting to an on-line Linux version. Then there are some practical
problems such as accessing the VMware file-system. After some playing
around I managed to find a way to SSH to the server and see the files
that way.

On 26 Jan, 03:10, William Stein  wrote:
> On Sun, Jan 25, 2009 at 6:04 PM, kcrisman  wrote:
>
> >> Is that September 2009? If we do not have something native on Windows
> >> then we are in deep trouble.
>
> > The technical discussion above was very interesting, as I know little
> > about Windows internals, and it sounds like tons of good work is going
> > on with supporting so many architectures.  I probably should have
> > asked a less cryptic question, though, so I am sorry - here is the
> > real one:
>
> > Will there be a sage.exe file (or something like that) that my
> > students can download straight from sagemath.org and use right away on
> > a Windows machine?
>
> > This would be similar to the .app solution that now exists for Mac
> > (see #4817, the resolution of which would make 3.3 even more
> > spectacular than it already is).  I can't overemphasize how much this
> > could transform the (silent) user base of Sage.
>
> > Re: Cygwin, I can convince a few hard-core students to download VMWare
> > +VMWare Sage image, but those are the same ones I can convince to try
> > using LaTeX for their homework ;)  It seems like Cygwin might be about
> > the same difficulty level for them as VMWare - i.e., not too hard but
> > just inconvenient enough to discourage most students.  Or is Cygwin
> > easier than VMWare?  I assume it at least doesn't have the downside of
> > only having available whatever virtual memory is allocated.
>
> Just out of curiosity, what is so difficult about installing VMware +
> VMware Sage?  Let me break this down into two questions:
>
> (1) What are some things that are difficult about installing VMware?
> This is a well-supported commercial product made by publicly traded
> company with an operating budget in the hundreds of millions (or
> more), so maybe it is easy to install?  Or maybe it isn't?  What
> happens in practice?
>
> (2) What are some things that are difficult about running the VMware
> Sage image?  I mean extracting a zip file then double-clicking that
> icon.    What goes wrong that makes this so hard?
>
> Of course, I think there are many very good reasons for having a
> native Windows port.  I want to be aware of what we need to do to make
> Sage easier to install on Windows, both now and in the long run.
>
>  -- William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Windows

2009-01-26 Thread bsdz

I see what you mean by the download size. Perhaps another option might
be to offer the source code as a separate download if any is included.

> VMware Sage is likely mostly going
> to be faster than a native windows port, especially on modern
> processors.

I'm not too sure if this sounds correct. The VMware session is running
its own OS thread/process scheduling within a single Windows process
(priority 8) that in turn is also being prioritised by the real OS
(Windows). So "faster" doesn't sound right at all here.

As for mounting Windows filesystems inside the VMware session, I admit
that is a solution but probably quite tricky for an ordinary Windows
user. I prefer to use WinSCP that gives the same look and feel as
Explorer.

--
Blair

On Jan 26, 8:48 pm, William Stein  wrote:
> Hi,
>
> I just want to thank bsdz for responding, and emphasize that the point
> of this thread is mainly to see what options there are to make the
> VMware-sage experience much better, while we wait for the native
> windows port.   There are likely many "highly annoying" issues people
> have with the vmware image that might be fully solvable with a little
> work.
>
> On Mon, Jan 26, 2009 at 12:31 PM, bsdz  wrote:
>
> > I feel one fairly big problem with the VMware installation is the
> > sheer size of the binary to download.
>
> If we used zip for the native windows version, then the size
> would be almost exactly the same.  What makes the VMware
> version big is almost entirely that Sage is big.
>
> Probably the Sage/vmware machine should switch to using
> 7zip but bundled as an .exe so that users don't have to install
> 7zip (yes, 7zip is supposed to support this).  Then the download
> size would be < 400MB.
>
> Also, the sage/vmware install includes a full latex system -- we
> could delete that saving probably at least 60MB of download size.
>
> We'll never get below about 350MB, since that's the size of Sage on
> linux already.  Sage is a big problem. Of course, the MATLAB download
> is over 3 GB (!)  (most of that is videos, data sets, etc.)
>
> > Other issues are performance;
> > running a Sage server in a VMware session is noticeable slower than
> > connecting to an on-line Linux version.
>
> For *raw computations* (cpu bound code, e.g., computing determinants,
> solving systems, etc.) VMware Sage is likely mostly going
> to be faster than a native windows port, especially on modern
> processors.  The main speed loss is in the user interface, since
> that goes via a virtual network connection.  One potential speed loss
> is because by default the VMware machine is configured to use
> 320MB of ram -- changing this involves changing a number in a text
> file that is in sage-vmware-*.zip.
>
> Do you have any precise benchmarks?
>
> > Then there are some practical
> > problems such as accessing the VMware file-system. After some playing
> > around I managed to find a way to SSH to the server and see the files
> > that way.
>
> This is a significantly annoying problem, but there is a way around
> it.  One can actually just mount any native Windows filesystems in
> vmware if you read the vmware instructions.  It's called using "VMware
> shared folders".  This can be setup in VMware player without having to
> pay any money.
>
> Somebody else remarks that we can't ship VMware player and Sage
> bundled together.  This is not quite true. One *can* as long as one
> gets permission from VMware.
>
> VirtualBox is also getting very good, by all accounts, and there are
> likely similar solutions to the problems listed above for VirtualBox.
>
> From a developer point of view, the biggest problem with using VMware
> for Sage on Windows is that it would be difficult to make it
> interoperate with programs like Microsoft Excel or other natives
> windows code.  Even that isn't impossible, since it could be done via
> a network connection and some native windows library that abstracts
> away that network connection from the API.
>
>  -- William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Bell Polynomials

2009-01-26 Thread bsdz

Hi

I have written a simple function that generates Bell Polynomials.

It is documented and published at http://sagenb.org:8000/home/pub/182/

Is there any where this could be added to the main distribution?

Cheers

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



[sage-devel] Re: Bell Polynomials

2009-01-26 Thread bsdz

Looks good to me except the note needs to be removed.

Also would it be possible to update the formula to

$B_{n,k}(x_1, x_2, \ldots, x_{n-k+1}) = \sum_{\sum{j_i}=k, \sum{i j_i}
=n} \frac{n!}{j_1!j_2!\ldots} \frac{x_1}{1!}^j_1 \frac{x_2}{2!}^j_2
\ldots$

Thanks

On Jan 27, 12:14 am, Mike Hansen  wrote:
> Hi Blair,
>
> On Mon, Jan 26, 2009 at 3:36 PM, bsdz  wrote:
> > Is there any where this could be added to the main distribution?
>
> I made a few modifications to your routine to match some of the style
> conventions used in Sage.  Also, instead of passing in the variables,
> I'm creating a polynomial ring and returning a polynomial.  If one
> wants to use different variables, then they can evaluate the
> polynomial at those variables.
>
> I put a patch up athttp://trac.sagemath.org/sage_trac/ticket/5109.
> Let me know if these changes are okay with you.
>
> --Mike
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Windows

2009-01-27 Thread bsdz

To use WinSCP start VMware Player session and login as "manage" user.
Switch to root user by typing "sudo su". Edit /etc/ssh/sshd_config and
ensure PermitRootLogin is set to "yes". Download WinSCP from
http://winscp.net/eng/download.php. Start WinSCP and use IP address of
VMware Player as Host name and username "root" and I think the
password is "sage".

Obviously would be better if the files were group writable by another
less powerful user.

Hope that helps.

ps: Still not sold on this Linux under VM is faster than native
Windows. Probably best forget it though.

On 27 Jan, 07:58, William Stein  wrote:
> On Mon, Jan 26, 2009 at 3:09 PM, bsdz  wrote:
>
> > I see what you mean by the download size. Perhaps another option might
> > be to offer the source code as a separate download if any is included.
>
> Almost no source code is included, except for the core sage library
> (which isn't that much, especially compressed).
>
> >> VMware Sage is likely mostly going
> >> to be faster than a native windows port, especially on modern
> >> processors.
>
> > I'm not too sure if this sounds correct. The VMware session is running
> > its own OS thread/process scheduling within a single Windows process
> > (priority 8) that in turn is also being prioritised by the real OS
> > (Windows). So "faster" doesn't sound right at all here.
>
> I won't try to argue this any further based on "pure thought".  It's
> best to use benchmarks.  In the informal benchmarks I've done,
> Windows and OS X (to a lesser extent)  aren't so optimized for
> scientific computing, whereas Linux seems quite good for that.   I've
> frequently found that in practice raw cpu-bound compute code runs in
> Linux under a virtual machine faster than natively on OS X and
> windows.    For code to run quickly on a given OS, sometimes
> developers have to "tune" it, and developers of open source math
> software are more likely at present to have tuned code to work well on
> Linux than other OS's.
>
> Of course, I and many other people wish Microsoft Windows was also
> first rate for running open source mathematical software; this is, in
> fact, one of the main motivations of the people at Microsoft who have
> given money to support Sage development (and also R development).
> Microsoft definitely wants open source math software to work extremely
> well on their OS.
>
> > As for mounting Windows filesystems inside the VMware session, I admit
> > that is a solution but probably quite tricky for an ordinary Windows
> > user. I prefer to use WinSCP that gives the same look and feel as
> > Explorer.
>
> Could write a paragraph about using WinSCP which I could add to the
> README.txt file?
>
>
>
>
>
> > --
> > Blair
>
> > On Jan 26, 8:48 pm, William Stein  wrote:
> >> Hi,
>
> >> I just want to thank bsdz for responding, and emphasize that the point
> >> of this thread is mainly to see what options there are to make the
> >> VMware-sage experience much better, while we wait for the native
> >> windows port.   There are likely many "highly annoying" issues people
> >> have with the vmware image that might be fully solvable with a little
> >> work.
>
> >> On Mon, Jan 26, 2009 at 12:31 PM, bsdz  wrote:
>
> >> > I feel one fairly big problem with the VMware installation is the
> >> > sheer size of the binary to download.
>
> >> If we used zip for the native windows version, then the size
> >> would be almost exactly the same.  What makes the VMware
> >> version big is almost entirely that Sage is big.
>
> >> Probably the Sage/vmware machine should switch to using
> >> 7zip but bundled as an .exe so that users don't have to install
> >> 7zip (yes, 7zip is supposed to support this).  Then the download
> >> size would be < 400MB.
>
> >> Also, the sage/vmware install includes a full latex system -- we
> >> could delete that saving probably at least 60MB of download size.
>
> >> We'll never get below about 350MB, since that's the size of Sage on
> >> linux already.  Sage is a big problem. Of course, the MATLAB download
> >> is over 3 GB (!)  (most of that is videos, data sets, etc.)
>
> >> > Other issues are performance;
> >> > running a Sage server in a VMware session is noticeable slower than
> >> > connecting to an on-line Linux version.
>
> >> For *raw computations* (cpu bound code, e.g., computing determinants,
> >> solving sys

[sage-devel] function name as string

2010-02-21 Thread bsdz
Hi

I used to be able to obtain a function name in Sage 3+ using something
like the following: -

fu = function('fu', x)
print fu._f._name
# would print "fu"

I notice that this does not work in Sage 4 and "fu" is no longer a
SymbolicFunctionEvaluation but an Expression.

Is there a way to obtain the function's name in the above?

Thanks
Blair

-- 
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: function name as string

2010-02-21 Thread bsdz
On Feb 21, 8:06 pm, Mike Hansen  wrote:
> Hello,
>
> On Sun, Feb 21, 2010 at 12:03 PM, bsdz  wrote:
> > I used to be able to obtain a function name in Sage 3+ using something
> > like the following: -
>
> > fu = function('fu', x)
> > print fu._f._name
> > # would print "fu"
>
> > I notice that this does not work in Sage 4 and "fu" is no longer a
> > SymbolicFunctionEvaluation but an Expression.
>
> > Is there a way to obtain the function's name in the above?
>
> Note that "fu" as defined above creates the function "fu" and then
> applies it to x.  If you leave out the x, then you get the function
> itself which has a name method.  If you have fu(something), then you
> can use the operator method on that to get the function back:
>
> sage: fu = function('fu')
> sage: fu.name()
> 'fu'
> sage: fu(x).operator().name()
> 'fu'
>
> --Mike

Ah, I see my mistake. Thanks Mike :)

-- 
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