[sage-devel] Banner not updated

2007-11-22 Thread Nathan Dunfield

I encountered the following minor bug while upgrading to 2.8.13,  
namely the file

$SAGEROOT/local/bin/sage-banner

was not updated.   So when I started sage after doing "sage -upgrade"  
it claimed that I was still on 2.8.8.1:

PBook ~ (12) sage
--
| SAGE Version 2.8.8.1, Release Date: 2007-10-21 |
| Type notebook() for the GUI, and license() for information.|
--

even though within the interpreter the function "version()" correctly  
returns 2.8.13.

sage: version()
'SAGE Version 2.8.13, Release Date: 2007-11-21'

Details: OS X, version 10.4.10/Core Duo 2/original version of sage  
2.7.1, upgraded several times.

Best,

Nathan



--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Banner not updated

2007-11-22 Thread Nathan Dunfield

> Try doing
>
> sage: hg_scripts.merge()
> sage: hg_scripts.commit()
>
> and answer any interactive questions.  

This doesn't seem to do anything:

sage: hg_scripts.merge()
cd "/pkgs/sage-2.7.1/local/bin" && hg merge
abort: there is nothing to merge - use "hg update" instead
sage: hg_scripts.commit()
cd "/pkgs/sage-2.7.1/local/bin" && hg diff  | less
cd "/pkgs/sage-2.7.1/local/bin" && hg commit
nothing changed

If I follow the suggestion of .merge() I get

sage: hg_scripts.update()
cd "/pkgs/sage-2.7.1/local/bin" && hg update
abort: untracked local file 'sage-wiki' differs from remote version

More to the point, I do recall being asked some questions by "hg"
during the upgrade process ("(k)eep or (d)iscard" or similar).   I
didn't pay much attention to them, but I guess I should have ;-).

Nathan






--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Banner not updated

2007-11-25 Thread Nathan Dunfield

On Nov 23, 4:20 am, mabshoff wrote:
> > More to the point, I do recall being asked some questions by "hg"
> > during the upgrade process ("(k)eep or (d)iscard" or similar).  ...
>
> It might have been captured in the log. Could you check there? It has
> come up at least twice with 2.8.13 and we should really get this issue
> resolved.

I didn't see anything relevant in SAGE_ROOT/install.log.   I've put
the file at

   http://dunfield.info/temp/install.log

if anyone wants to have a look.

On Nov 23, 11:18 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> See where it says "abort: ".  It's aborting at that point.
> If you do
>rm SAGE_ROOT/local/bin/sage-wiki
> then do hg_scripts.update() again, it won't abort for that reason
> and you'll get the new hg repo for scripts merged in.

Thanks, that fixed the problem.  Having done the above, the upgrade to
2.8.14 went smoothly, with the correct updated banner.

Best,

Nathan





--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: another Sage+tvtk interactive 3D graphics demo

2008-03-05 Thread Nathan Dunfield

> As before, you need to install mayavi (perhaps "sage -i
> mayavi_2.0.20080117" will work, at least under Linux); then run "sage -
> wthread",

This mayavi package didn't work for me on the following system:

OS: OS X version 10.4.11 with gcc 4.0.1 build 5367
Hardware: Intel Core 2 Duo
Sage: Clean version of 2.10.3.rc1 built from source.

In particular, I get the following error:

---

==
Building directory: enthought.tvtk_2.0.0b3

Executing: /pkgs/sage-2.10.3.rc1/local/bin/python setup.py release
build bdist_egg -d /pkgs/sage-2.10.3.rc1/spkg/build/
mayavi_2.0.20080117/mayavi_build/dist

**
ERROR: Build error: exited with value = 1
**


==
Building directory: enthought.type_manager_2.0.1b1

Executing: /pkgs/sage-2.10.3.rc1/local/bin/python setup.py release
build bdist_egg -d /pkgs/sage-2.10.3.rc1/spkg/build/
mayavi_2.0.20080117/mayavi_build/dist

==
Building directory: enthought.util_2.0.1b2

Executing: /pkgs/sage-2.10.3.rc1/local/bin/python setup.py release
build bdist_egg -d /pkgs/sage-2.10.3.rc1/spkg/build/
mayavi_2.0.20080117/mayavi_build/dist

WARNING: Could not build egg.info files: No module named enstaller.egg
Processing enthought.mayavi_2.0.2a1
Running setup.py -q bdist_egg --dist-dir /pkgs/sage-2.10.3.rc1/spkg/
build/mayavi_2.0.20080117/mayavi_build/enthought.mayavi_2.0.2a1/egg-
dist-tmp-yDYB1l
Adding enthought.mayavi 2.0.2a1.dev-r16569 to easy-install.pth file
Installing mayavi2 script to /pkgs/sage-2.10.3.rc1/local/bin

Installed /pkgs/sage-2.10.3.rc1/local/lib/python2.5/site-packages/
enthought.mayavi-2.0.2a1.dev_r16569-py2.5.egg
Processing dependencies for enthought.mayavi==2.0.2a1.dev-r16569
Searching for enthought.util>=2.0.1b2.dev,<3.0a
Best match: enthought.util 2.0.1b2
Processing enthought.util-2.0.1b2-py2.5.egg
creating /pkgs/sage-2.10.3.rc1/local/lib/python2.5/site-packages/
enthought.util-2.0.1b2-py2.5.egg
Extracting enthought.util-2.0.1b2-py2.5.egg to /pkgs/sage-2.10.3.rc1/
local/lib/python2.5/site-packages
Adding enthought.util 2.0.1b2 to easy-install.pth file

Installed /pkgs/sage-2.10.3.rc1/local/lib/python2.5/site-packages/
enthought.util-2.0.1b2-py2.5.egg
Searching for enthought.tvtk[plugin,wx]>=2.0.0b2.dev,<3.0a

Link to http://code.enthought.com/enstaller/eggs/source ***BLOCKED***
by --allow-hosts

Link to http://pypi.python.org/simple/enthought.tvtk/ ***BLOCKED*** by
--allow-hosts

Couldn't find index page for 'enthought.tvtk' (maybe misspelled?)
Scanning index of all packages (this may take a while)

Link to http://pypi.python.org/simple/ ***BLOCKED*** by --allow-hosts

No local packages or download links found for
enthought.tvtk[plugin,wx]>=2.0.0b2.dev,<3.0a
error: Could not find suitable distribution for
Requirement.parse('enthought.tvtk[plugin,wx]>=2.0.0b2.dev,<3.0a')

real7m1.218s
user3m23.485s
sys 1m54.947s
sage: An error occurred while installing mayavi_2.0.20080117



A complete install.log is at

http://dunfield.info/temp/install.log

Any suggestions for how to fix this?

Best,

Nathan


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



[sage-devel] Re: Cell splitting/merging in notebook

2008-04-03 Thread Nathan Dunfield

> One feature that would be really nice is to have distinct text cells,
> in html or even better latex mode.  A text cell could created by a hot key 
> (say
> ) in edit mode which displays the source latex or html, then toggled 
> out
> of edit mode to display the formatted text.  This could be nicer for
> preparing worksheets for teaching which combine latex formatted exercises with
> sage cells for code, rather than using

David,

I added a similar suggestion to trac a couple weeks back, see

http://trac.sagemath.org/sage_trac/ticket/2628

 Best,

 Nathan


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



[sage-devel] ACE optional package

2008-04-05 Thread Nathan Dunfield

The ace-5.0.spkg for the GAP component is broken --- it tries to copy
itself into the non-existent directory of GAP version 4.4.9 instead of
the current 4.4.10.   This is a one line fix to the spkg-install
file.   I've put a fixed version at

http://dunfield.info/temp/ace-5.0.spkg

I'm not sure the protocol on bug fixes for these optional packages...

Best,

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



[sage-devel] Re: Slightly OT: SCC 2008 & Braid Groups

2008-04-30 Thread Nathan Dunfield

> So, I vote +1 to include it at least as an optional package. Making it
> a standard part of SAGE
> should IMHO wait until a solid FreeGroup and FinitelyPresentedGroup
> (Python) class are created for SAGE. If I had more time I would do this 
> myself.

Yeah, it would be great if SAGE had support of those.   Some time ago,
I wrote a quick FinitelyPresentedGroup class here:

http://www.dunfield.info/misc/fpgroup.py

but all it can really do is move finitely presented groups back and
forth between GAP and MAGMA...

Nathan


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



[sage-devel] Problem with source introspection for a Cython extension

2008-05-12 Thread Nathan Dunfield

I'm working on an Cython extension module for Sage, but source code
introspection isn't working for me.

The extension is built from a single *.pyx file via the following
setup.py file:

-setup.py-
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

introtest = Extension(name = "introtest", sources = ["introtest.pyx"])
setup( name = "introtest", ext_modules = [introtest],  cmdclass =
{'build_ext': build_ext})
--

and then installed with "sage -python setup.py install".  However,
when I try

sage: introtest.intro??
Error getting source: arg is not a module, class, method, function,
traceback, frame, or code object
[..snip..]
Docstring [source file open failed]:

The contents of the *pyx file are below.

  Thanks,

   Nathan

- introtest.pyx 
def intro(int n):
cdef int i, a
a = 0
for i from 1 <= i <= n:
a += i*i
return a


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



[sage-devel] Re: Problem with source introspection for a Cython extension

2008-05-12 Thread Nathan Dunfield

> When you run the build command *precisely* what Cython and GCC
> commands are executed?  I.e., touch the .pyx file, rebuild it
> and paste the build log into an email.

William,

It's below

System: MacPro 8 core (Jan 2008) with OS 10.5
gcc: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
sage: 2.11

Also tested on OS 10.4 with Sage 3.0; same problem.

Thanks,

Nathan

MacPro ~/intro (7) sage -python setup.py install
running install
running build
running build_ext
cythoning introtest.pyx to introtest.c
building 'introtest' extension
creating build
creating build/temp.macosx-10.3-i386-2.5
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/pkgs/sage-2.11/local/
include/python2.5 -c introtest.c -o build/temp.macosx-10.3-i386-2.5/
introtest.o
creating build/lib.macosx-10.3-i386-2.5
gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/
introtest.o -o build/lib.macosx-10.3-i386-2.5/introtest.so
running install_lib
copying build/lib.macosx-10.3-i386-2.5/introtest.so -> /pkgs/sage-2.11/
local/lib/python2.5/site-packages
running install_egg_info
Removing /pkgs/sage-2.11/local/lib/python2.5/site-packages/
introtest-0.0.0-py2.5.egg-info
Writing /pkgs/sage-2.11/local/lib/python2.5/site-packages/
introtest-0.0.0-py2.5.egg-info


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



[sage-devel] Re: Problem with source introspection for a Cython extension

2008-05-12 Thread Nathan Dunfield

> Oh, that's annoying, it doesn't display the Cython command line.
> Anyway, if you don't give the -p or --embed-positions option to
> Cython, then source introspection should *not* work:

I cython'd on the command line with the -p option and then setup.py
installed.

I now get a different error message when I try introspection:

sage: import introtest
sage: introtest.intro??
Error getting source: s must be a string

instead of

Error getting source: arg is not a module, class, method, function,

Does the introtest.pyx file have to copied to somewhere in particular
for this to work, or is everything supposed to embedded in the *.so
module binary?

Best,

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



[sage-devel] Re: Problem with source introspection for a Cython extension

2008-05-12 Thread Nathan Dunfield

William and Nick,

With the default cythoning, introtest.intro.__doc__  is empty (as
there is no docstring).   If I invoke cython by hand with the -p
option, intro.__doc__ becomes

'File: introtest.pyx (starting at line 1)'

If I then copy introtest.pyx to $SAGEROOT/devel/sage, then source
introspection works.

As per Williams request, I filed ticket #3168.

Nathan



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



[sage-devel] Re: New Sage website

2008-05-14 Thread Nathan Dunfield

On May 14, 6:33 am, "David Joyner" <[EMAIL PROTECTED]> wrote:
> I cannot find the code browser or wiki links, both of which I use a lot.
> Maybe that is because it is so slow, I give up looking. For me, each page 
> takes
> 30 seconds. I guess sagemath.org is just slow this morning

I just tried looking at the new site, but the whole sagemath webserver
seems to be down (as of 7:30 am CDT).

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



[sage-devel] GAP interface: complicated objects

2007-05-28 Thread Nathan Dunfield

Dear All,

How does one create new GAP objects that require a multi-step
command?  For instance, to create a finitely presented group in GAP
one does:

gap: F := FreeGroup(2)

gap: G := F/[F.1*F.2*F.1^-1*F.2^-1]


I'm trying to hack up a quick finitely presented group class, and am
trying to write the _gap_init_ method.   In simple cases, _gap_init_
returns a string, but I can't come up with one that works; e.g. the
following fails

sage: gap.new("F := FreeGroup(2); F/[F.1*F.2*F.1^-1*F.2^-1]")
$sage21:=F := FreeGroup(2); F/[F.1*F.2*F.1^-1*F.2^-1];;
^

   executing $sage21:=F := FreeGroup(2); F/[F.1*F.2*F.1^-1*F.2^-1];;

Now, I could have _gap_init_ return a GAP object created in several
steps, e.g.

sage: gap.eval("F := FreeGroup(2)")
''
sage: G = gap.new("F/[F.1*F.2*F.1^-1*F.2^-1]");
sage: G


but this has the disadvantage of littering the GAP interpreter with a
bunch of useless variables (or worse, over-writing something from my
interactive session).

What's the right solution here?   I could assign some awful temporary
variable name in place of F, but there must be a better way...

Thanks,

Nathan


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: GAP interface: complicated objects

2007-05-31 Thread Nathan Dunfield

William, David, and Jack,

Many thanks for all the excellent suggestions.   Initially, I'll use
Jack's local variable trick, though as David says a more complete
implementation would probably want to keep track of the parent free
group.   There's also a clean multistep way that doesn't introduce any
variables in GAP:

sage: F = gap.new("FreeGroup(2)")
sage: G = F.FactorGroupFpGroupByRels([F.1*F.2*F.1**-1*F.2**-1])

Properly wrapping finitely presented groups would be a slightly tricky
task, and, unfortunately, this is not my current goal.   There's a lot
more to a fp-group besides just the generators and relations, e.g.
information about when a group is a subgroup of another group which is
need for comparing subgroups, computing homorphisms between groups,
etc.  One could, of course, just delegate most of these issue to GAP,
and that's certainly a reasonable approach to add finitely presented
groups to Sage.   Unfortunately, for what I typically do (e.g. find
low-index subgroups), Magma is *much* faster than GAP, so I'm only
aiming for a finitely presented group class which allows me to create/
keep track of fp-groups at the Python level, and will just have to
drop into the Magma interpreter for most of actual computational
work.

Best,

Nathan



--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: GAP interface: complicated objects

2007-05-31 Thread Nathan Dunfield

On May 31, 3:10 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> Do you understand why Magma is *much* faster than GAP at finding
> low-index subgroups? Is it just compiled versus interpreted code, or
> does MAGMA implement a much better algorithm?

William,

Both programs use the same basic coset enumeration approach to finding
low-index subgroups.  I don't understand more than the fundamentals of
this procedure, so I can't really comment on what might be going on
"under the hood"; however, as one increases the index for a fixed
group the performance differential of Magma over GAP does increase,
but pretty slowly.

Let me provide some timings here, though, as well as a quick fix that
improves GAPs times by a factor of about 4, at which point it's still
an order of magnitude slower than Magma.

Here is the sample group:

gap: F := FreeGroup("a", "b");; a := F.1;; b := F.2;; G := F/
[ a^2*b^-1*a^-1*b^-1*a^2*b^4,
a*b*a^-2*b*a^2*b^-1*a*b^-1*a*b^-1*a*b^-1*a^2*b*a^-2*b*a*b ];

Task: Find all subgroups of index 10, 11, 12, and 13 respectively;
times in seconds on a 1Ghz G4 laptop:

GAP:  7.6, 30.1, 127.5, 559.4
Magma: 0.3, 1.1, 4.3, 16.4

As you can see, Magma is 25-33x faster than GAP in this example.

At least part of it is just the compiled vs. interpreted issue.   In
fact, by compiling the relevant part of GAP into C-code (basically
analogous to Pyrex) --- as I'll describe below --- one can actually
speed GAP up by a factor of about 4.

GAP-compiled:  2.1, 7.3, 31.1, 132.1

Procedure for compiling a gap library module (results in much more
spead, sometimes, though sometimes not at all).

In main GAP directory:
 bin/i686*/gac -d lib/grpfp.gi
 cd bin/i686*
 mkdir compiled
 cd compiled
 mkdir lib
 cd lib
 mkdir gi
 mv ../../../../grpfp.so gi
 # Test
 gap -N -D (search for dynamic to make sure worked)

There is also an independent coset enumeration program, ACE, written
by a team lead by of the big experts on the subject, George Havas.
Now there is a GAP package that allows use of ACE within GAP, and
perhaps that offers better performance.   I'll give it a try tomorrow
and report back.

Best,

Nathan


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: GAP interface: complicated objects

2007-06-01 Thread Nathan Dunfield

On May 31, 11:38 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> > Now there is a GAP package that allows use of ACE within GAP, and
> > perhaps that offers better performance.   I'll give it a try tomorrow
> > and report back.
>
> I've made it an optional SAGE package and posted it to the repository.

William,

Thanks for packaging ACE.  It turns out that while ACE can replace
much of the coset enumeration code in GAP, the LowIndexSubgroups
routine is separate and appears to be pure GAP code.  So this doesn't
help with the speed issue.

Best,

Nathan


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: "What can Magma do that Sage can't do?"

2009-06-06 Thread Nathan Dunfield

> VIII. Finite Groups; Finitely-Presented Groups
>
>   * I'm not enough of a group theorist to appreciate differences
>     between what Sage provides via GAP and Magma.  They seem pretty
>     similar to me for group theory.  Sage exposes much of GAP's
>     functionality for groups.

William,

I think you're right that the capabilities of GAP and Magma are very
similar in the domain of group theory.   However, there's at least one
key thing that GAP has but Sage doesn't expose: finitely-presented
groups.  It's even in the title of this chapter of the Magma handbook,
so we definitely need it ;-)   So,

PROJECT:  Implement a finitely-presented group class in Sage.

N.B. this has been briefly discussed on sage-devel before, and there
are some ideas of where to start there.

Best,

Nathan


--~--~-~--~~~---~--~~
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: Seifert surfaces

2009-06-27 Thread Nathan Dunfield

> Much more complicated would it be to construct a Seifert surface of
> *minimal* genus. It is possible, though, based on the theory of normal
> surfaces that goes back to Wolfgang Haken.  In a nutshell (hope I
> remember things correctly):

Yes, you do.

> In the Wiki, I mention a package t3m, that, as much as I know, could
> do the above computation.

It could easily be made to do that, in those small cases where Haken's
algorithm is feasible.  However, in practice there are usually better
ways involving quick methods of finding (some) Seifert surfaces
combined with (twisted) Alexander polynomials to give lower bounds on
the genus.

> I don't know about visualisation, though.

No, it doesn't do that.

Best,

Nathan
--~--~-~--~~~---~--~~
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: cliquer

2009-08-20 Thread Nathan Dunfield

> If there are any OS X sysadmins out there that actually know how to
> create accounts remotely via the command line, let me know.

William,

The following works for me under 10.5.8:

sudo mkdir -p /Users/ta
sudo dscl . -create /Users/ta
sudo dscl . -create /Users/ta PrimaryGroupID 20
sudo dscl . -create /Users/ta RealName "Test Account"
sudo dscl . -create /Users/ta NFSHomeDirectory /Users/ta
sudo dscl . -create /Users/ta UserShell /bin/bash
sudo dscl . -create /Users/ta UniqueID 599
sudo passwd ta
sudo chown -R ta:staff /Users/ta

I have no idea why they make this so difficult...

Best,

Nathan

--~--~-~--~~~---~--~~
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: cliquer

2009-08-20 Thread Nathan Dunfield

On Aug 20, 10:22 am, William Stein  wrote:
> On Thu, Aug 20, 2009 at 7:59 AM, Nathan Dunfield wrote:
> >> If there are any OS X sysadmins out there that actually know how to
> >> create accounts remotely via the command line, let me know.
>
> > William,
>
> > The following works for me under 10.5.8:
>
> What OS X computer do you have access to?

I tested what I sent on a Mac Pro (early 2008, 8-cores @ 2.8 Ghz).

> It might already be all you need to resolve this cliquer issue.

Ah, I think you think I'm Nathann Cohen who started this thread and to
whom you were planning on giving an account on one of your machines.
But I'm not.  If this isn't the case, then I don't parse your sentence
above.

Best,

Nathan

--~--~-~--~~~---~--~~
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: cliquer

2009-08-21 Thread Nathan Dunfield

> Yes, I got confused between Nathans.  Sorry.  And many thanks again for the
> directions!!

You're welcome.  It's often annoying how hard it is to do certain
administrative tasks on OS X from the command line.  Even for just
creating an account, it's no harder to do a full screenshare via ssh
and VNC and then just use System Preferences to add the account as
always.   Indeed, here's how to do anything you want on the server
remotely from another OS X machine (though the local machine isn't
really important here).

On the server, download "VineServer3.0.dmg" from
http://sourceforge.net/projects/osxvnc/files/   Then do

remote% sudo open VineServer3.0.dmg
remote% cp -R /Volumes/Vine\ Server/Vine\ Server.app /Applications

On the local machine, install a VNC client (I used Chicken of the VNC
from http://sourceforge.net/projects/cotvnc/ ) and then start an ssh
tunnel

local% ssh -L 5900:localhost:5900 u...@remote.domain.com
remote% sudo /Applications/Vine\ Server.app/Contents/Resources/OSXvnc-
server -localhost -rfbnoauth

and now just start the VNC client and point it at localhost:5900 (For
COVNC this is the default connection it offers).  Now the remote
screen appears on your local one and you can do whatever you need to
do.

Best,

Nathan




--~--~-~--~~~---~--~~
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: Embedded SVG editor in the notebook?

2009-09-04 Thread Nathan Dunfield

On Sep 4, 12:26 am, "William A. Stein"  wrote:
> Also, it would just be very nice having an easy scratchpad anywhere in  
> an worksheet.

As a topologist, I couldn't agree more.  ;-)

Nathan
--~--~-~--~~~---~--~~
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: Topology software for Sage

2009-02-11 Thread Nathan Dunfield

> >  2. SnapPea
> > SnapPea is a program for creating and studying hyperbolic 3-manifolds
> > (http://www.geometrygames.org/SnapPea-old/index.html). It seems to be
> > widely used by computational topologists. AFAIK it can deal with ideal
> > triangulations, compute volume, has a census of hyperbolic manifolds,
> > can also work with hyperbolic knots, etc.
> > If I understand correctly, it is under GNU GPL and may be used as a
> > Python module.
>
> A longtime Sage user -- Nathan Dunfield -- I think wrote the Python
> interface, and uses SnapPea from Sage for his research.

Actually, most of the current Python interface was written by Jeff
Weeks, the author of SnapPea itself.  The most recent version is
available here:

http://www.math.uic.edu/~t3m/

However, Marc Culler and I are working on a new interface making use
of Cython.  It works with vanilla Python but includes some Sage-
specific features, in particular using GAP, Pari, and Magma (when
available) to do the algebraic heavy-lifting when finding finite
covers and computing homology (which boils down to finding the smith
normal form).

There is also a modified version of SnapPea called Snap:

http://snap-pari.sourceforge.net/

which uses the Pari C-library to compute arithmetic invariants of
hyperbolic 3-manifolds.  If one were writing it today, one would no
doubt use Sage instead.  Indeed, I implemented the most basic features
of Snap in just a few pages of Sage code as a proof of concept.
-
Some examples of using SnapPea and Sage together can be found at

http://dunfield.info/fibered-faces/

which is a computational supplement to my paper with Dinakar
Ramakrishnan:

http://arxiv.org/abs/0712.3243

Best,

Nathan
--~--~-~--~~~---~--~~
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: Topology software for Sage

2009-02-11 Thread Nathan Dunfield

> Having glanced at the other projects this one seems to be the most
> promising, but it certainly seems rather strange regarding build
> system and so on. I.e. I did not see any obvious way to build the
> kernel as a library for example. There is no meaningful documentation,
> but a longer worded version of RTFS :).  So I did poke around in the
> makefile and build some project foo I made up. Compilation of the 3.0
> release instantly failed because a 4 line comment was in
> fundamental_group.c:

Michael,

It sounds like you're using the version from GeometryGames.org:

http://www.geometrygames.org/SnapPea-old/SnapPea3.html

This has been superseded by the version at

www.math.uic.edu/~t3m/

One of the things that Marc and I fixed was the build system, so the
latter should compile in the usual pythonic way

cd SnapPeaPython/
sage -python setup.py build
sage -python setup.py install

at least on Unix-type operating systems.  Let me know if it doesn't
work for you.

> In any case: Besides the obvious build system cleanup required for
> this to stand a chance to become standard in Sage the licenses has the
> be clear. Currently I see
>
> [...]
>
> If that is the case and the license still forbids commercial use there
> is no chance this code will ever make it into standard Sage. It is
> also worrisome that the last dated release (3.0d3) was dates in 2000.

Jeff later relicensed the code under GPL 2+.   He continues to fix
bugs in the kernel, and Marc and I continue to make small tweaks to
the Python interface (most recently in July of 2008, according to
CVS).

As I mentioned, Marc and I have a new version of the Python interface
using Cython which should be a lot easier to maintain.  We hope to
have it up on web shortly, but for now you can grab a copy at

http://math.uic.edu/~t3m/SnapPy.tgz

This is called SnapPy instead of SnapPea since it's not backward
compatible.

Best,

Nathan


--~--~-~--~~~---~--~~
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: proposal to remove dsage from sage

2010-01-18 Thread Nathan Dunfield
[X] Yes, for removal.  I tried with little success to use dsage some
years ago, but quickly switched to the "processing" module.

Nathan
-- 
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] Problem with Maxima interface?

2010-04-14 Thread Nathan Dunfield
I'm having the following problem with basic symbolics in Sage 4.3.2.
I create some variables with "var", combine them into rational
functions, then take their numerator and denominator and coerce them
into a PolynomialRing.   This works fine most of the time, but very
occasionally (every few 1 usages) it chokes with following error
message:

TypeError: unable to make sense of Maxima expression
'"__SAGE_SYNCHRO_MARKER_202188656"' in Sage

If I use "pdb" to go up to frame at the top of the traceback, and
rerun the offending line, it works, as you can see below.

Sometimes it dies with other message complaining about the syntax of
seeming correct expressions, e.g.

TypeError: Error executing code in Maxima
CODE:
_tmp_ : -(a0-1)*a1^2*a3$
Maxima ERROR:

_tmp_ : -(a0-1)*a1^2*a3$
stdin:57338284:Incorrect syntax: Illegal use of delimiter )
(%i832002)
stdin:57338357:Incorrect syntax: Premature termination of input at ;.
(%i832003)

Any ideas of what's going on here?

Thanks,

Nathan

--
| Sage Version 4.3.2, Release Date: 2010-02-06   |
| Type notebook() for the GUI, and license() for information.|
--
sage: attach stavros/__init__.py
sage: %pdb
Automatic pdb calling has been turned ON
sage: test()
---
TypeError Traceback (most recent call
last)

/Users/dunfield/work/stavros3/ in ()

/Users/dunfield/work/stavros3/stavros/__init__.py in test()
226 N = OneCuspedManifold(M)
227 for S in N.NormalSurfaces:
--> 228 info = N.vertex_surface_info(S)
229 if info [:-3] == (True, False, False):
230 print M, N.NormalSurfaces.index(S), info

/Users/dunfield/work/stavros3/stavros/__init__.py in
vertex_surface_info(self, surface)
132 n = len(surface.Coefficients)
133 is_kabaya = min(surface.Coefficients) > 0
--> 134 is_ideal = self.comes_from_an_ideal_point(surface)
135 is_isolated = self.vertex_surface_is_isolated(surface)
136 return surface.BoundarySlope, is_isolated, is_kabaya,
is_ideal

/Users/dunfield/work/stavros3/stavros/__init__.py in
comes_from_an_ideal_point(self, surface)
121 R = PolynomialRing(QQ, ['a%d' % i for i in range(0,n)]
+ ['b%d' % i for i in range(0,n)])
122 eqns = self.first_order_equations(surface)
--> 123 poly_eqns = [ R(e.numerator() - e.denominator()) for e
in eqns]
124 gens = R.gens_dict()
125 blow_up_eqns = [ gens["a%d" % i] * gens["b%d" % i] - 1
for i in range(0, n)]

/pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/symbolic/
expression.so in sage.symbolic.expression.Expression.denominator (sage/
symbolic/expression.cpp:20432)()

/pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/structure/
parent.so in sage.structure.parent.Parent.__call__ (sage/structure/
parent.c:6206)()

/pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/structure/
coerce_maps.so in sage.structure.coerce_maps.NamedConvertMap._call_
(sage/structure/coerce_maps.c:4098)()

/pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/interfaces/
maxima.pyc in _symbolic_(self, R)
   1792 sqrt(2)
   1793 """
-> 1794 return R(self._sage_())
   1795
   1796 def __complex__(self):

/pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/interfaces/
maxima.pyc in _sage_(self)
   1773 from sage.calculus.calculus import
symbolic_expression_from_maxima_string
   1774 #return
symbolic_expression_from_maxima_string(self.name(),
maxima=self.parent())

-> 1775 return
symbolic_expression_from_maxima_string(repr(self))
   1776
   1777 def _symbolic_(self, R):

/pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/calculus/
calculus.pyc in symbolic_expression_from_maxima_string(x, equals_sub,
maxima)
   1964 return symbolic_expression_from_string(s, syms,
accept_sequence=True)
   1965 except SyntaxError:
-> 1966 raise TypeError, "unable to make sense of Maxima
expression '%s' in Sage"%s
   1967 finally:
   1968 is_simplified = False

TypeError: unable to make sense of Maxima expression
'"__SAGE_SYNCHRO_MARKER_202188656"' in Sage
> /pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/calculus/calculus.py(1968)symbolic_expression_from_maxima_string()
   1967 finally:
-> 1968 is_simplified = False
   1969

ipdb> up
> /pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/interfaces/maxima.py(1775)_sage_()
   1774 #return
symbolic_expression_from_maxima_string(self.name(),
maxima=self.parent())

-> 1775 return
symbolic_expression_from_maxima_string(repr(self))
   1776

ipdb> up
> /pkgs/sage-4.3.2/local/lib/python2.6/site-packages/sage/interfaces/

[sage-devel] Re: Problem with Maxima interface?

2010-04-14 Thread Nathan Dunfield
On Apr 14, 2:57 pm, William Stein  wrote:
> You should post exact code so that we can replicate your problem.

I've boiled down the problem into the example below.  Just attach and
then run "prob()".

One thing to note is that's just doing the exact same thing again and
again, but eventually it up and crashes.  On my system, which is
detailed below, it dies after about 10-20 minutes at the 4000ish
iteration.

System details:  MacPro3,1 with 2 Quad-Core Xeon Processors @ 2.8 Ghz,
running 10.5.8.
Sage 4.3.2 self-compiled with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1
(Apple Inc. build 5493)

Thanks,

Nathan

--begin code-


datum = ([0, 1, 0, 2, 0, 2], [([-1, -2, -1, 1, -1, 0], [1, 2, 1, 0, 1,
0], -1), ([2, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0], 1), ([-1, 2, 0, -1,
0, 0], [-1, 0, -1, 1, 0, 0], 1), ([0, 0, 1, 1, 0, -1], [0, -1, 1, -2,
-2, 2], -1), ([0, 0, 0, -1, 2, 1], [0, 0, -1, 1, 0, 0], -1), ([0, 0,
0, 0, -1, 0], [0, 0, 0, 0, 1, -2], -1)])

class Surface():
def __init__(self, datum):
self.Coefficients, self.RawEquations = datum

def eval_eqn( (a,b,c), z):
ans = c
for i, z in enumerate(z):
ans *= z**a[i] * (1 - z) ** b[i]
return ans

class OneCuspedManifold():
def raw_natural_gluing_equations(self, surface):
return surface.RawEquations

def natural_gluing_equations(self, surface):
n = len(surface.Coefficients)
z = var(" ".join(["z%d" % i for i in range(n)]))
return [eval_eqn(eqn, z) for eqn in
self.raw_natural_gluing_equations(surface)]

def first_order_equations(self, surface):
V = [int(e) for e in list(surface.Coefficients)]
n = len(V)
a_vars = var(" ".join(["a%d" % i for i in range(n)]))
t = var('t')
base_eqns = self.raw_natural_gluing_equations(surface)
z = [ a * t ** e for a, e in zip(a_vars, V) ]
eqns = [eval_eqn(eqn, z).subs(t=0) for eqn in base_eqns]
return eqns

def comes_from_an_ideal_point(self, surface):
n = len(surface.Coefficients)
R = PolynomialRing(QQ, ['a%d' % i for i in range(0,n)] + ['b
%d' % i for i in range(0,n)])
eqns = self.first_order_equations(surface)
poly_eqns = [ R(e.numerator() - e.denominator()) for e in
eqns]

def prob():
count = 0
while 1:
M = OneCuspedManifold()
S = Surface(datum)
M.comes_from_an_ideal_point(S)
count += 1

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

To unsubscribe, reply using "remove me" as the subject.


[sage-devel] Re: Problem with Maxima interface?

2010-04-14 Thread Nathan Dunfield
Here is a more concise, but essentially equivalent, code snippet which
exhibits the problem.   Just attach and run "prob()"  Again, it takes
10-12 minutes to crash on my MacPro3,1 with 2 Quad-Core Xeon
Processors @ 2.8 Ghz, running 10.5.8, with Sage 4.3.2 self-compiled
with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build
5493).

Best,

Nathan

--- problem code begins -

datum = ([0, 1, 0, 2, 0, 2], [([-1, -2, -1, 1, -1, 0], [1, 2, 1, 0, 1,
0], -1)])
coefficients, raw_natural_gluing_equations = datum

def eval_eqn( (a,b,c), z):
ans = c
for i, z in enumerate(z):
ans *= z**a[i] * (1 - z) ** b[i]
return ans

def first_order_equations():
n = len(coefficients)
a_vars = var(" ".join(["a%d" % i for i in range(n)]))
t = var('t')
base_eqns = raw_natural_gluing_equations
z = [ a * t ** e for a, e in zip(a_vars, coefficients) ]
eqns = [eval_eqn(eqn, z).subs(t=0) for eqn in base_eqns]
R = PolynomialRing(QQ, ['a%d' % i for i in range(n)])
poly_eqns = [ R(e.numerator()) for e in eqns]

def prob():
for i in xrange(100):
first_order_equations()

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

To unsubscribe, reply using "remove me" as the subject.


[sage-devel] Re: Problem with Maxima interface?

2010-04-14 Thread Nathan Dunfield
> Here is a more concise, but essentially equivalent, code snippet which
> exhibits the problem.   Just attach and run "prob()"  Again, it takes
> 10-12 minutes to crash on my MacPro3,1 with 2 Quad-Core Xeon
> Processors @ 2.8 Ghz, running 10.5.8, with Sage 4.3.2 self-compiled
> with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build
> 5493).

To follow up on myself one last time, here's what appears to be the
minimal example exhibiting this problem

def prob():
for i in xrange(100):
a = var('a')
eqn = (a - 1)/(a)
eqn.numerator()

Note: If you run it once and it crashes, and then you run it again (w/
o quiting Sage) it crashes much faster.

Best,

Nathan

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

To unsubscribe, reply using "remove me" as the subject.


[sage-devel] Re: Problem with Maxima interface?

2010-04-15 Thread Nathan Dunfield
> I can confirm that the above function eventually desynchronizes Maxima;
> I'm using Sage 4.3.5 with Ubuntu 9.10 on a quad-core Core 2 processor.

One more date point: I reproduced the problem on my Mac Book, which
has a dual-core Core 2.  Despite the fact that it's a lot slower than
my Mac Pro, it crashes in about half the time...

Nathan

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

To unsubscribe, reply using "remove me" as the subject.


[sage-devel] Re: Problem with Maxima interface?

2010-04-26 Thread Nathan Dunfield
> To follow up on myself one last time, here's what appears to be the
> minimal example exhibiting thisproblem
>
> def prob():
>     for i in xrange(100):
>         a = var('a')
>         eqn = (a - 1)/(a)
>         eqn.numerator()

I've gone ahead and filed this in Trac as

http://trac.sagemath.org/sage_trac/ticket/8772

Best,

Nathan

-- 
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: R + GLPK

2010-07-14 Thread Nathan Dunfield
> On a similar note cvxopt can make use of glpk as well.

Yes, it can --- I was just using this yesterday.

The trick is that you have to tell cvxopt that glpk is available when
it is compiled/installed.   Now that glpk is standard, the install
script for cvxopt should be told to make use of it.   You just need to
edit a couple of lines in setup.py to make this happen.  Has this
already been done, or should I file a patch for this?

Best,

Nathan

-- 
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: R + GLPK

2010-07-15 Thread Nathan Dunfield
> > Has this
> > already been done, or should I file a patch for this?
>
> If you would be so kind... I  saw no mention of it until I read your
> message :-)

Ok, I'll do it in the next couple of days, taking into account David's
comment about skpg build order.

Nathan

-- 
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: Was foolscap spkg considered? (dependency of IPythons for paraller computing)

2010-07-21 Thread Nathan Dunfield
> so I guess foolscap (http://foolscap.lothar.com/) wasn't included. Was
> this - after all optional but still - dependency omitted on purpose,
> i.e. it does not work like it should, or just none tried it yet? If
> the second, I might give it a shot - it would be nice to build sage
> cluster using what is already there, and IPython looks promising.

Andrzej,

I've used iPython's parallel facilities within Sage 4.3 --- it works
fine after you install foolscap (and maybe one other thing?).
Installing foolscap itself is easy; just download the source and do
"sage -python setup.py install" in the resulting directory.

Nathan

-- 
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: R + GLPK

2010-07-25 Thread Nathan Dunfield
On Jul 14, 5:30 pm, Nathann Cohen  wrote:
> > Has this
> > already been done, or should I file a patch for this?
>
> If you would be so kind... I  saw no mention of it until I read your
> message :-)

Done, including patch, at

http://trac.sagemath.org/sage_trac/ticket/9598

Also, I'll mention that the version of cvxopt that comes with Sage is
three years old.  The current version, unfortunately, uses a slightly
different interface for GLPK.  Sage has version 0.9 in which GLPK
support seems to have been in beta, or maybe they just changed some
function names moving to the current version 1.1.

Nathan

-- 
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: Mathjax needs review

2012-01-14 Thread Nathan Dunfield

> The very first thing I tried was "show(2/3* x^(3/2 + pi))".  On sagenb.org 
> with jsmath it
> looks amazing -- just like pdflatex output.  On test.sagenb.org it
> looks horrible to my eye -- definitely nowhere close to tex or even
> jsmath.

I don't know if this helps, but the visual horribleness is coming from
the fact that everything in the MathJax examples are getting
italicized (or maybe slanted) and the stuff that should be in italics
(like variable names) is getting over italicized.  For instance, look
at the numerals in the factions of the first example.   Actually,
looking more closely, I think what's happening is that it's using a
slanted font for everything instead of the italic font when
appropriate (compare the variable "x" in the two examples; in MathJax
I think it's a slanted "x" instead of an italic one.  Unfortunately, I
don't have any idea what's causing it, though, since everything looks
good to me on Chrome running on OS X Leopard.

Nathan

-- 
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: Linear Algebra over CDF

2011-02-16 Thread Nathan Dunfield
On Dec 29 2010, 11:50 pm, Rob Beezer  wrote:
> I'd like to improve the current state of the linear algebra code over
> CDF (and by extension, over RDF).  
> [...]  I'm trolling for anything else folks can send me that might
> help: advice, informative Trac tickets, potential pitfalls, secret
> desires.  Thanks!

Rob,

I think this would be a great addition to Sage, and here's one related
Trac ticket that this would close:

http://trac.sagemath.org/sage_trac/ticket/3162

My work around for the issue described there has actually been to use
PARI via:

def gauss(CC, mat, vec):
M = pari(mat)
v = pari.matrix(len(vec), 1, vec)
ans = M.matsolve(v)._sage_()
entries =ans.transpose().list()
return vector(CC, entries)

Best,

Nathan

-- 
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: GSOC 2013

2013-03-12 Thread Nathan Dunfield
On Sunday, March 10, 2013 1:35:28 PM UTC-5, mmarco wrote:

> I am not sure pyGTK (or pyQT, or any other python bindings) is the way 
> to go. As you said, it would require to install pyGTK, but also GTK 
> itself and python. I think that is overkill.


I haven't used PyGTK, but I do have experience building self-contained 
Windows apps based on Python/Tk.   A basic Windows-style installer, 
including Python, Tk, etc, weights in at about 4Mb, which is negligible 
compared to Sage itself.  Using GTK might add a little to that, but 
probably not much, and you'd gain a lot in terms of ease of 
maintenance by doing things in Python instead of writing a native Windows 
app.Actually, for a very basic GUI, Tk would be a reasonable choice 
instead of GTK or QT; it's long in the tooth, but it's hard to beat in 
terms of minimal effort to get an acceptable result.  


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Exponentiation by PARI gen objects

2014-02-04 Thread Nathan Dunfield
Through version 5.12, Sage could exponentiate vanilla Python integers by 
PARI gen objects.  However, in 5.13 and 6.1 the follow code throws an 
error: 

sage: int(1)**pari(1)
---
TypeError Traceback (most recent call last)
 in ()
> 1 int(Integer(1))**pari(Integer(1))

TypeError: Argument 'self' has incorrect type (expected 
sage.libs.pari.gen.gen, got int)

I would have filed this on trac, but I can't log in at the moment for some 
reason. 

Best,

Nathan





-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-devel] Re: Interactive plots for Sage Notebook

2014-03-08 Thread Nathan Dunfield
On Saturday, February 22, 2014 2:33:19 AM UTC+11, vdelecroix wrote:
>
>  * the matplotlib widgets: Sage right now uses matplotlib for main 
> graphics capabilities. matplpotlib comes with a very complete and 
> useful library for making interactive graphics in native windows (with 
> cursors and all kind of things you may imagine). Note that I was not 
> able to make it work within Sage... 
>

Vincent, 

Late to this party, but I thought I would mention that I have successfully 
used some of the matplotlib interactive widgets from within Sage on both OS 
X and Linux.  Specifically, I have used the Tk variant on both platforms; 
you do have to recompile matplotlib since by default Sage chooses not to 
compile any of the GUI backends.  Check out

http://dunfield.info/temp/tkplot.py

for a complete example, including precisely what one needs to do to 
recompile matplotlib for this to work.  

Probably the other GUI backends could be made to work (they all look pretty 
much the same, actually), but the Tk one is the one I needed at the time 
and so the only one I tried. 

Best,

Nathan  
 

>
> The two solutions that I propose do not currently work out of the box 
> with Sage. They are standard Python tools. So as soon as Sage will be 
> compatible with native Python/Ipython the problem will be solved ! You 
> can find many other options on the page [1]. 
>
> Sage should stop reinventing the wheel for graphics ! 
>
> [1] https://wiki.python.org/moin/NumericAndScientific/Plotting 
>
> Best, 
> Vincent 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: vote: include pip with sage

2014-04-25 Thread Nathan Dunfield

>
>   [ ] Yes, make pip a standard part of Sage. 
>
>   [ ] No, pip does not belong in Sage. 
>

Yes, pip should definitely be part of Sage. Independent of its potential 
use dealing with spkgs, as the now standard Python package manager it's 
something end users need.  The very first thing I do when I download the 
latest Sage release is to install pip.  

Adding pip will require upgrading the version of setuptools that comes with 
Sage, which is also a good thing since Sage is on 0.6.16 (which is from 
2011, I think) and the current version is 3.4.* 

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Regarding Braid project and its integration in Sage

2014-05-04 Thread Nathan Dunfield

>
> Hoping to hear from the community.Thanks.
>

Personally, I would start by stress-testing the code on a variety of inputs 
to determine it's robustness.  If it crashes a lot, there's not much point 
wrapping it.  On the other hand, if it turns out to be bullet-proof, I 
would recommend against reimplementation absent a compelling reason to do 
so.   As Leif says, the issue of compiling it under a newer version of gcc 
is a typical problem for C++, and so unless your aiming for a pure Python 
(or Python + C) implementation, I don't see that as a major issue.  

I would also do some tests of the code's correctness before making a 
decision either way.  For example, you could take a knot, make a braid, get 
the DT code, make a knot from that, and then check that the initial and 
final knot are the same.  As long as you stick to hyperbolic knots, SnapPy 
can easily do the final step.  

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] ChomP

2014-05-15 Thread Nathan Dunfield
The optional package ChomP installs cleanly but then does not actually work 
on Sage 6.1.1 on OS X Mavericks.  The specific error I get on both 
platforms is below. 

Best,

Nathan


sage: from sage.interfaces.chomp import CHomP

sage: T = cubical_complexes.Torus()

sage: CHomP()('homcubes', T)

---

TypeError Traceback (most recent call last)

 in ()

> 1 CHomP()('homcubes', T)


/pkgs/sage-6.1/local/lib/python2.7/site-packages/sage/interfaces/chomp.pyc 
in __call__(self, program, complex, subcomplex, **kwds)

288 hom = VectorSpace(base_ring, 0)

289 else:

--> 290 hom = HomologyGroup(0)

291 else:

292 rk = 0


TypeError: HomologyGroup() takes at least 2 arguments (1 given)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: ChomP

2014-05-15 Thread Nathan Dunfield
Sorry, my original message had a typo.  I have observed this only with Sage 
6.1.1 on OS X Mavericks not "both platforms".  
 

> The optional package ChomP installs cleanly but then does not actually 
> work on Sage 6.1.1 on OS X Mavericks.  The specific error I get on both 
> platforms is below. 
>
> Best,
>
> Nathan
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: ChomP

2014-05-16 Thread Nathan Dunfield

>
> > The optional package ChomP installs cleanly but then does not actually 
> > work on Sage 6.1.1 on OS X Mavericks. 
>
> Seems this is fixed in Sage 6.2. 
>

You're completely right, sorry about that.  For some reason, I thought Sage 
6.2 was still in beta and so didn't test it there.  I tried it now with 
Sage 6.2 on the same system and everything works fine.

Thanks,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: upgrading numpy/scipy

2014-05-16 Thread Nathan Dunfield

>
> If someone is interested in getting numpy-1.8.1/scipy-0.14.0 in sage, 
> they can review http://trac.sagemath.org/ticket/16299 


I just reviewed it.  Thanks for doing this, I recently ran into an annoying 
memory leak in numpy 1.7.0, which was fixed in 1.7.1 (and 1.8.1).  

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] proposal: remove python spkg and use pip instead

2014-08-27 Thread Nathan Dunfield

>
> > It would greatly simplify the life of package maintainer! 
>
> Just a +1 from me to this project.   When I started the whole spkg 
> business, the state of Python package management was a total 
> mess/disaster.  Today with pip things are much, much better. 
>

Total +1 based on my experience with pip vs. easy_install, spkgs, etc. The 
very first thing I do when downloading a new Sage is install pip and put it 
to work...

Nathan



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Nathan Dunfield
There's something wrong with comparison operators for elements of 
QuaternionAlgebras defined over a number field.  Here's a simple example, 
where first it gives the wrong answer and then, after doing some arithmetic 
with the elements, a mix of right and wrong answers:

sage: K = NumberField(x**3 + x - 1, 'a')
sage: D. = QuaternionAlgebra(K, -1, -3)
sage: x = (i + j)/K(2)
sage: z =  (-1 + (i + j) + k)/K(2)  - x
sage: w = i * x
sage: w, z
(-1/2 + 1/2*k, -1/2 + 1/2*k)
sage: w == z
False
sage: z == w
False
sage: z - w
0
sage: z == w, w == w, z-w == 0
(True, True, False)

I looked in trac, but I didn't see this.  Is this issue already known, and, 
if so, is there a simple work-around?

Thanks,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-05 Thread Nathan Dunfield
I looked at Vincent's patch and tested it on my own machine.  It definitely 
fixes the issue and the new doctest passes.   However, buildbot reports 
doctest failures in other modules (including ones almost certainly 
unconnected with the quaternion algebra code, like "
src/sage/rings/real_double.pyx").  Am I allowed to move the status to 
"positive review" in this situation?

Nathan

P.S.  No worries on the name confusion.  I am honored to be mistaken for 
the Nathan(n) with an excess of n's.  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] "Can We Trust Computer Algebra Systems?"

2014-10-31 Thread Nathan Dunfield

>
> How hard would it be to switch from the singular interface to the 
> MAcualay2 one for the polynomial stuff?
>

I believe Macaulay 2 also uses Singular for its basic polynomial stuff:  

http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.6/share/doc/Macaulay2/Macaulay2Doc/html/___Acknowledgements.html

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: R 3.3.1 depends on a SSL/TLS implementation

2016-10-28 Thread Nathan Dunfield

>
> It's ridiculous that we spend no effort on pandas/statsmodels, and all 
> this 
> effort on R.  


+1
 

> For example, I recall that there are some issues involving pandas + 
> statsmodels + the sage preparser.  
>

I use Pandas in the default Sage Interpreter on a daily basis and have only 
encountered a few quirks, all I think related to the Sage Integer vs. 
Python Integer distinction.  I don't use statsmodel though.  

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] ComplexField dilog precision bug

2017-02-13 Thread Nathan Dunfield
FYI, I found a very similar issue with "exp" and "log" for purely imaginary 
numbers:

http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1896

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] pip install on MacOS

2017-05-06 Thread Nathan Dunfield
On a good day, assuming the user has the Xcode command-line tools 
installed, the following suffices to get pip working with the current 
binary version of SageMath on macOS 10.12:

sage -i openssl
sage -f python2

It would be great if the next release of SageMath had a working version of 
pip on macOS as the current situation causes no end of trouble for a lot of 
people. 

Best, Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Conda package for Sage

2017-06-14 Thread Nathan Dunfield

>
>  How do people get VMs for testing different OSX / XCode versions? 
>

Both VirtualBox and VMWare (Fusion) fully support OS X VMs with the 
important caveat you have to use actual Apple hardware for the host.

I've used both without major problems on a Mac Pro.  Currently I mostly use 
VMWare since it's a little more polished (my university has a 
site-license).  You can configure VMWare so you that you can both ssh into 
the VM from the host as well as interact with the full GUI, the latter even 
remotely using VMWare's VNC capability.   With fairly minimal installs and 
only the occasional snapshot, I find you need about 40-50Gb of disk space 
for each VM.  

I believe Travis-CI offers OS X nodes, though building Sage might well time 
out on their free tier.  

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Conda package for Sage

2017-06-15 Thread Nathan Dunfield

>
> Plus licenses for a range of OSX versions (at least those that are 
>> still supported by Apple...) 
>>
>
> these are peanuts, e.g. £20 for 10.7
>

I don't know if this is still the case, but as of a year ago if you become 
a registered Apple Developer then you got access to all the old versions of 
OS X and XCode as well as the pre-releases.  That costs US$100/year, but 
once you have the complete set you could drop the subscription since it's 
easy to keep current: just copy the VM for version n when n+1 comes out and 
the let the system update itself. 

With regards to hardware, the single-core performance of the Mac Pro isn't 
that much better than the Mac Mini, see:

https://browser.primatelabs.com/mac-benchmarks

but of course the Mac Mini has only 2 cores.  If space is not an issue, you 
might think about the iMac with the i7-7700K, or, if it is, the top of the 
line Mac Book Pro is quite a bit more powerful than the Mini at this point.

Nathan

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Conda package for Sage

2017-06-16 Thread Nathan Dunfield


On Thursday, June 15, 2017 at 12:38:40 PM UTC-5, Volker Braun wrote:
>
> On Thursday, June 15, 2017 at 3:10:22 PM UTC+2, Nathan Dunfield wrote:
>>
>> but of course the Mac Mini has only 2 cores.
>>
>
> For the record, our OSX buildbot is a quad-core mac mini (i7-3720QM CPU @ 
> 2.60GHz).
>

Inexplicably, the option of a quad-core processor was dropped with the 
current Mac mini revision that came out in late 2014.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: status on Python3

2015-11-14 Thread Nathan Dunfield

>
> can someone summarize the status on making SageMath Python3 compatible? 
> (...or more provocatively: When will SageMath start using Python3?) 


See

http://trac.sagemath.org/ticket/15530 

and tickets 15980 and 16052 referenced therein.

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Sage bdist changes (OSX El Capitan)

2015-11-25 Thread Nathan Dunfield

>
> The binary I posted should work on any OSX 10.11 machine. Possibly even on 
> older OSX versions, though I don't have any way to test. 
>

I tested this binary on 10.8 (Mavicks) and 10.9 (Yosemite) and it worked 
fine on both!

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: WARNING: pyx optional package is dangerous

2015-12-29 Thread Nathan Dunfield

>
>   (2) The current version on the pyx website is 0.14 (and they had 
> releases this year), but we're distributing version 0.10 from *2007*! 

 
Not that it matters, but for Python 2.7 the current version of pyx is 
0.12.1 (circa 2012); subsequent versions only work with Python 3.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] OS X binaries: which versions OS X are supported?

2016-05-10 Thread Nathan Dunfield
Currently, the only OS X binaries available on the official SageMath site 
are labeled as being for OS X 10.11 (El Capitan) only, with names like 
"sage-7.1-OSX_10.11.3-x86_64*".   My question is: shouldn't there versions 
for older versions of OS X?  El Capitan is less than 7 months old, and Sage 
6.10 (which came out in December) again only provided OS X binaries for 
10.11.  It seems to me that there should be binaries for any currently 
supported version of OS X (10.9, 10.10, 10.11) or even older if it's no 
trouble.  Possibly El Capitan is an exception, but I would expect that 
anything built on 10.7 would work on any more recent version of OS X.  

In fact, the current binaries work on earlier versions of OS X (I've tested 
down to 10.8) but with the caveat that one can't build certain optional 
packages (chomp) or standard Python modules (pandas).  The source of this 
problem, if it should be called that, are described here:

http://trac.sagemath.org/ticket/20563

but the result is that if:

a) One is running any release of OS X other than the very latest and 
greatest, and

b) one wants to use pandas (a pretty central element to the "scientific 
Python stack" these days)

then one's only choice to is compile Sage direct from source.  I've never 
had any problem with the latter, but it would certainly intimidate many a 
potential OS X Sage user... 

Best,

Nathan




-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: OS X binaries: which versions OS X are supported?

2016-05-10 Thread Nathan Dunfield

>
> We don't have a buildbot on old OSX machines. 
>

One possible idea: VirtualBox supports running OS X clients on OS X hosts, 
and the OS X versions don't have to match.  I know someone who has VB VM's 
of every release from 10.6 to 10.11 running on a 10.11 host.  

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: OS X binaries: which versions OS X are supported?

2016-05-14 Thread Nathan Dunfield


On Friday, May 13, 2016 at 7:54:30 AM UTC-5, kcrisman wrote:
>
> I was planning on building the next Sage release on 10.7, before my 
> computer is upgraded.  But I'm confused as to why the older versions for 
> older systems were deleted from the downloads page? 
>

There are a of couple 10.7 binaries for Sage 6.9 here:

http://mirrors.mit.edu/sage/osx/intel/old/index.html

but the main page only has 10.11 binaries for 7.1 and 7.2 beta.

Nathan
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Sage 7.2 build error for component jupyter_core

2016-05-20 Thread Nathan Dunfield
When trying to build Sage 7.2 from source on OS X (10.8 and 10.9), I get 
the following error (complete logs also attached):

Installed 
/pkgs/sage-7.2/local/lib/python2.7/site-packages/jupyter_core-4.1.0-py2.7.egg
Processing dependencies for jupyter-core==4.1.0
Searching for traitlets
Reading https://pypi.python.org/simple/traitlets/
Download error on https://pypi.python.org/simple/traitlets/: [Errno 51] 
Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'traitlets' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: timed out -- Some 
packages may not be found!
No local packages or download links found for traitlets
error: Could not find suitable distribution for 
Requirement.parse('traitlets')

While it claims to be a network issue, the PyPI URL given is accessible 
from both machines (which are on different networks, one university-grade). 
 Moreover, installing jupyter-core==4.1.0 via pip into a non-Sage Python 
succeeds on both machines.

Any ideas?

Thanks,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Found local metadata for jupyter_core-4.1.0
Using cached file /pkgs/sage-7.2/upstream/jupyter_core-4.1.0.tar.gz
jupyter_core-4.1.0

Setting up build directory for jupyter_core-4.1.0
Finished set up

Host system:
Darwin topo.local 12.6.0 Darwin Kernel Version 12.6.0: Wed Mar 18 16:23:48 PDT 
2015; root:xnu-2050.48.19~1/RELEASE_X86_64 x86_64

C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/pkgs/sage-7.2/local/libexec/gcc/x86_64-apple-darwin12.6.0/4.9.3/lto-wrapper
Target: x86_64-apple-darwin12.6.0
Configured with: ../src/configure --prefix=/pkgs/sage-7.2/local 
--with-local-prefix=/pkgs/sage-7.2/local --with-gmp=/pkgs/sage-7.2/local 
--with-mpfr=/pkgs/sage-7.2/local --with-mpc=/pkgs/sage-7.2/local 
--with-system-zlib --disable-multilib --disable-nls 
--enable-languages=c,c++,fortran --disable-libitm 
--with-build-config=bootstrap-debug --without-isl --without-cloog  
Thread model: posix
gcc version 4.9.3 (GCC) 

running install
running bdist_egg
running egg_info
creating jupyter_core.egg-info
writing requirements to jupyter_core.egg-info/requires.txt
writing jupyter_core.egg-info/PKG-INFO
writing top-level names to jupyter_core.egg-info/top_level.txt
writing dependency_links to jupyter_core.egg-info/dependency_links.txt
writing entry points to jupyter_core.egg-info/entry_points.txt
writing manifest file 'jupyter_core.egg-info/SOURCES.txt'
reading manifest file 'jupyter_core.egg-info/SOURCES.txt'
writing manifest file 'jupyter_core.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
copying jupyter.py -> build/lib
creating build/lib/jupyter_core
copying jupyter_core/__init__.py -> build/lib/jupyter_core
copying jupyter_core/__main__.py -> build/lib/jupyter_core
copying jupyter_core/application.py -> build/lib/jupyter_core
copying jupyter_core/command.py -> build/lib/jupyter_core
copying jupyter_core/migrate.py -> build/lib/jupyter_core
copying jupyter_core/paths.py -> build/lib/jupyter_core
copying jupyter_core/troubleshoot.py -> build/lib/jupyter_core
copying jupyter_core/version.py -> build/lib/jupyter_core
creating build/lib/jupyter_core/utils
copying jupyter_core/utils/__init__.py -> build/lib/jupyter_core/utils
copying jupyter_core/utils/shutil_which.py -> build/lib/jupyter_core/utils
creating build/lib/jupyter_core/tests
copying jupyter_core/tests/__init__.py -> build/lib/jupyter_core/tests
copying jupyter_core/tests/mocking.py -> build/lib/jupyter_core/tests
copying jupyter_core/tests/test_application.py -> build/lib/jupyter_core/tests
copying jupyter_core/tests/test_command.py -> build/lib/jupyter_core/tests
copying jupyter_core/tests/test_migrate.py -> build/lib/jupyter_core/tests
copying jupyter_core/tests/test_paths.py -> build/lib/jupyter_core/tests
creating build/lib/jupyter_core/tests/dotipython
creating build/lib/jupyter_core/tests/dotipython/nbextensions
copying jupyter_core/tests/dotipython/nbextensions/myext.js -> 
build/lib/jupyter_core/tests/dotipython/nbextensions
creating build/lib/jupyter_core/tests/dotipython/profile_default
copying jupyter_core/tests/dotipython/profile_default/ipython_config.py -> 
build/lib/ju

Re: [sage-devel] Sage 7.2 build error for component jupyter_core

2016-05-20 Thread Nathan Dunfield

>
> Is this a parallel make? 
>

No, it was single-threaded.  (Unless parallel make is the default, to be 
precise I just typed "make".)

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sage 7.2 build error for component jupyter_core

2016-05-20 Thread Nathan Dunfield

>
> It's like if setuptools is loaded for whatever reason, then setuptools 
> will be used to install jupyter_core. The question is: why was 
> setuptools loaded in the first place? Do you have any custom Python 
> packages installed which could do this? 
>

Yes, that is indeed this issue!   I have a file "usercustomize.py" in 

$HOME/.sage/local/lib/python2.7/site-packages


which happens to import setuptools; moving that out of the way got it to 
install jupyter_core without further issues.  


Many thanks,


Nathan





 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] SageMath 7.3.beta3 build failure on OS X versions 10.8 and 10.9.

2016-06-05 Thread Nathan Dunfield
On OS X versions 10.8 (Mountain Lion) and 10.9 (Mavricks), the recently 
updated NTL package fails to build with the following error (complete log 
also attached).

g++ -I../include -I.  -march=native -O2 -g  -fno-common -c MakeDescAux.c
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:124:no such 
instruction: `vmovsd %xmm0, -16(%rsp)'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:259:no such 
instruction: `vxorpd %xmm0, %xmm0,%xmm0'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:264:no such 
instruction: `vaddsd (%rdi), %xmm0,%xmm0'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:274:no such 
instruction: `vxorpd %xmm0, %xmm0,%xmm0'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:295:no such 
instruction: `vmulsd %xmm1, %xmm0,%xmm1'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:298:no such 
instruction: `vaddsd %xmm2, %xmm1,%xmm0'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:322:no such 
instruction: `vmovsd LC18(%rip), %xmm0'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:332:no such 
instruction: `vaddsd %xmm0, %xmm0,%xmm0'
/var/folders/54/dhk_ryyx21x9xgj4mm_gn89cgn/T//cc2w7pb7.s:341:no such 
instruction: `vmovsd LC18(%rip), %xmm0'
make[4]: *** [setup1] Error 1
make[3]: *** [all] Error 2
Error building/tuning NTL.

I did not try to build Sage on 10.10 or 10.11 so I don't know if it works 
there.   Assuming it works on (at least) 10.11, my guess is this is caused 
by the older version of "as" that comes with Xcode on those systems (see 
http://trac.sagemath.org/ticket/20563 for a related issue). 

Best,

Nathan




-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Found local metadata for ntl-9.8.1.p0
Using cached file /pkgs/sage-git/upstream/ntl-9.8.1.tar.bz2
ntl-9.8.1.p0

Setting up build directory for ntl-9.8.1.p0
mv: rename ntl-9.8.1* to src/ntl-9.8.1*: No such file or directory
Finished set up

Host system:
Darwin topo.local 12.6.0 Darwin Kernel Version 12.6.0: Wed Mar 18 16:23:48 PDT 
2015; root:xnu-2050.48.19~1/RELEASE_X86_64 x86_64

C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/pkgs/sage-git/local/libexec/gcc/x86_64-apple-darwin12.6.0/4.9.3/lto-wrapper
Target: x86_64-apple-darwin12.6.0
Configured with: ../src/configure --prefix=/pkgs/sage-git/local 
--with-local-prefix=/pkgs/sage-git/local --with-gmp=/pkgs/sage-git/local 
--with-mpfr=/pkgs/sage-git/local --with-mpc=/pkgs/sage-git/local 
--with-system-zlib --disable-multilib --disable-nls 
--enable-languages=c,c++,fortran --disable-libitm 
--with-build-config=bootstrap-debug --without-isl --without-cloog  
Thread model: posix
gcc version 4.9.3 (GCC) 


Applying patches to NTL.
patching file src/DoConfig
Hunk #1 succeeded at 25 (offset -14 lines).
patching file src/mfile
Hunk #1 succeeded at 39 (offset 3 lines).
Hunk #2 succeeded at 374 (offset 6 lines).
patching file src/mfile
Hunk #1 succeeded at 328 (offset 3 lines).
Hunk #2 succeeded at 341 (offset 3 lines).
Hunk #3 succeeded at 368 (offset 10 lines).
Hunk #4 succeeded at 412 (offset 15 lines).
patching file src/WizardAux
Hunk #3 succeeded at 353 (offset 99 lines).
patching file include/NTL/new.h
Hunk #1 succeeded at 5 (offset -7 lines).
Generating libtool.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin12.6.0
checking host system type... x86_64-apple-darwin12.6.0
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /u

[sage-devel] Re: SageMath 7.3.beta3 build failure on OS X versions 10.8 and 10.9.

2016-06-06 Thread Nathan Dunfield
On Sunday, June 5, 2016 at 11:49:55 PM UTC-5, leif wrote:
>
> Well, GCC accepting '-march=native' doesn't imply the dumb Apple 
> assembler accepts all the instructions (here AVX) GCC then emits... 
>

If you pass gcc the flag "-Wa,-q", then it will use clang's assembler 
rather than the ancient version of the GNU assembler that comes with these 
versions of OS X.  See 

http://stackoverflow.com/questions/9840207

I can confirm that adding this flag allowed me to compile all of NTL on 
these machines.  Specifically, changing line 78 of 
"build/pkgs/ntl/spkg-install" to 

   SHAREDFLAGS="-fno-common -Wa,-q"

caused NTL to build smoothly.  

Nathan


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: SageMath 7.3.beta3 build failure on OS X versions 10.8 and 10.9.

2016-06-06 Thread Nathan Dunfield

>
> Did you compile sage yourself on the same machine on which you are trying 
> to update the NTL package or are using a binary distribution built on >10.9 
> ?
>

I was doing a clean Sage build from scratch against the git commit 
(715566f4bf9) corresponding to 7.3.beta3.  I have successfully compiled 
Sage 7.2, which has an earlier version of NTL, from source on both 10.8 and 
10.9.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: SageMath 7.3.beta3 build failure on OS X versions 10.8 and 10.9.

2016-06-06 Thread Nathan Dunfield

>
>  I have successfully compiled Sage 7.2, which has an earlier version of 
> NTL, from source on both 10.8 and 10.9.
>

Checking the logs for my Sage 7.2 builds, the old NTL version 9.6.2 spkg 
did *not* specify the "-march=native" flag on 10.8 and 10.9, unlike the 
current spkg for 9.8.1.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Build failure Sage 7.3.beta3 on Mac OS 10.9 with binary-pkg

2016-06-07 Thread Nathan Dunfield

>
> I used the instructions on https://github.com/sagemath/binary-pkg to 
> build sage .app.dmg packages for Mac OS 10.9.
> It works for 7.1 and 7.2*, but I compiling ECL failed with the attached 
> log for 7.3.beta3 - this seems to be a regression.
>

Weird, I was able to build the ECL in 7.3.beta3 on 10.9 by cloning the git 
repo and typing "make".  (The only issue I had with building 7.3.beta3 is 
with NTL as discussed in another thread)  I tried building 7.3.beta3 on 
10.9 via "binary-pkg", but I'm getting this error:

bash-3.2$ make package-sage PACKAGE="OSX mac app"

/Applications/Xcode.app/Contents/Developer/usr/bin/make checkout-sage

./tools/toolaid/bootstrap

Root directory = /pkgs/binary-pkg

Getting hashdist from github

Already up-to-date.

Getting hashstack from github

Already up-to-date.

This is Mac OS X

Downloading http://download.zeromq.org/zeromq-4.1.3.tar.gz...

[ERROR] urllib failed to download (code: 404): 
http://download.zeromq.org/zeromq

Downloading http://download.zeromq.org/zeromq-4.1.3.tar.gz...

[ERROR] urllib failed to download (code: 404): 
http://download.zeromq.org/zeromq

Downloading http://download.zeromq.org/zeromq-4.1.3.tar.gz...

[ERROR] urllib failed to download (code: 404): 
http://download.zeromq.org/zeromq

*[CRITICAL]* You may wish to check your Internet connection or the remote 
server

make[1]: *** [/pkgs/binary-pkg/tools/binary-pkg/activate] Error 127

make: *** [package-sage] Error 2


It does seem that http://download.zeromq.org/ is down at the moment...


Best,


Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: proposal: possibly remove Watkins Sympow from Sage

2016-06-07 Thread Nathan Dunfield
Also works in Sage 7.2 for me on OS X version 10.9 and a hoary RHEL 6 
derivative.  In both cases, Sage was compiled straight from the source 
tarball.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Developing sage-based code out of tree

2016-06-07 Thread Nathan Dunfield
Erik,

Interesting, I didn't realize that build-time (as opposed to run-time) 
dependencies were even *possible* with setuptools, even if it does require 
a hack.  With SnapPy, we just ship the Cython-generated C/C++-files in the 
tarball that we post on PyPI.  It adds a bit to the tarball's size, but is 
more robust than requiring Cython. For example, there are sometimes 
incompatibilities between different versions of Cython, and it's a bit rude 
to force the end-user to upgrade or downgrade their version of Cython just 
so they can install some other package.  

In our setup.py we use code like:

# If have Cython, check that .c files are up to date:

try:

from Cython.Build import cythonize

if 'clean' not in sys.argv:

targets = ['planarity_src/planarity.pyx', pmap_dir + 
'planarmap.pyx']

cythonize(targets)

except ImportError:

pass


Even if the user has the "wrong" Cython, the PyPI tarball will still build 
since the Cythonized files are up-to-date.  

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Developing sage-based code out of tree

2016-06-07 Thread Nathan Dunfield

>
> > Interesting, I didn't realize that build-time (as opposed to run-time) 
> > dependencies were even *possible* with setuptools, even if it does 
> require a 
> > hack.  With SnapPy, we just ship the Cython-generated C/C++-files in the 
> > tarball that we post on PyPI. 
>
> I was going to post that my understanding is that shipping 
> Cython-generated files is the current standard way of shipping Cython 
> code (for better or worse). 
>

Agreed, it's certainly what the Cython docs recommend:

http://docs.cython.org/src/reference/compilation.html#distributing-cython-modules

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Developing sage-based code out of tree

2016-06-07 Thread Nathan Dunfield

>
> > Agreed, it's certainly what the Cython docs recommend: 
> > 
> > 
> http://docs.cython.org/src/reference/compilation.html#distributing-cython-modules
>  
>
> Ah, okay.  I didn't see that before.  At least it's the recommended 
> best practice.  It should be easier to do automatically though (where 
> desired). 
>

Definite +1 for this being done automatically...

Nathan

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Developing sage-based code out of tree

2016-06-07 Thread Nathan Dunfield

>
> While this might work for simple projects, this won't work when you need 
> the metadata that cythonize() adds. For example, anything using 
> cysignals really must use cythonize(), it won't work otherwise. 
>

Jeroen,

As of Cython 0.22, it looks like the metadata you refer to is cached in the 
Cython-generated C files:

http://grokbase.com/t/python/cython-devel/152c310vvz/cython-cython-0-22-released

Specifically, if you look at the top of a Cython-generated C file, there is 
what looks to be a JSON string encoding the metadata.   

Of course, as Erik says one shouldn't have to mess with this all "by hand". 
 For example, setuptools could provide a "stub" version of cythonize that 
(a) does nothing but load this metadata if the C files are up to date and 
otherwise (b) attempts to import Cython and run the real cythonize... 

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Developing sage-based code out of tree

2016-06-07 Thread Nathan Dunfield

>
> That made me think that sage fails to set everything required to let 
> "--user" work properly (I noticed installation path names containing 
> ".../.sage/..." so at least it was trying something distinct from what 
> python would do in a standard config.)
>

Hmmm, I install Python packages into Sage with the "--user" flag all the 
time, so my initial guess is this is specific to this particular package or 
Sage build. 

As of 7.1 or 7.2, Sage's Python has the user base directory set to 
"~/.sage/local" rather than the usual (for Unix) of "~/.local". In 
particular, the user site packages should be 
"~/.sage/local/lib/python2.7/site-packages".  This was done to avoid 
conflicts with other versions of Python the user might have installed 
(which, for example, might not be binary compatible with Sage's). 

Nathan



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: SageMath 7.3.beta3 build failure on OS X versions 10.8 and 10.9.

2016-06-07 Thread Nathan Dunfield

>
> Is there a ticket for this? 
>

I just created one --- trac was down when I posted originally:

http://trac.sagemath.org/ticket/20779#ticket

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Build failure Sage 7.3.beta3 on Mac OS 10.9 with binary-pkg

2016-06-07 Thread Nathan Dunfield

>
> I'm wondering, if we should delete the beta3 and beta0 variants to avoid 
> confusion?
>

That definitely seems like the right move to me.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Abandon Python 2.6 support?

2016-06-10 Thread Nathan Dunfield

>
> Which operating systems / distros would be affected by this (i.e., only 
> ship with 2.6.x [and probably some older 3.x])? 
>

What I'd seriously worry about here is RHEL 6 and derivatives (CentOS, 
SciLinux).  It only comes with Python 2.6 by default, and while old (came 
out in 2010), it is frequently seen on university high-performance 
computing clusters (for example the main cluster here at UIUC).  

OS X is not a issue as has been Python 2.7 is included since 10.7, and in 
any event it is easy to install Python there. 

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: RFC: Draft blog post on Sage for Windows

2017-09-01 Thread Nathan Dunfield
I would suggest adding a link or instructions for how to download your new 
SageMath installer for Windows. 

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: VOTE: inclusion of OpenSSL in Sage

2017-10-16 Thread Nathan Dunfield
|X| Yes, we should fully support OpenSSL now, and clarify the licensing 
issue.  


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: VOTE: inclusion of OpenSSL in Sage

2017-10-23 Thread Nathan Dunfield
On Monday, October 23, 2017 at 7:32:03 AM UTC-5, Erik Bray wrote:
>
> > I also balk at the idea of shipping a crippled pip. 
>
> It's not crippled if you don't need it to install from HTTPS which not 
> everyone does.
>

I agree with Emmanuel that providing "pip" without HTTPS is shipping a 
broken product.  While there are other uses for "pip", by far the most 
common is to install Python packages off PyPI, which requires HTTPS.  

For the same reasons Emmanuel lists for R, installing Python packages via 
manual download and then pip breaks down fast for all but the simplest 
packages.  I once installed "snappy" [1] into a copy of SageMath on macOS 
where Sage's pip lacked OpenSSL support via such manual downloads.  I 
succeed but it was quite painful and in any event I'm a maintainer of said 
package...

Best,

Nathan

[1] https://pypi.python.org/pypi/snappy/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sage 8.2rc1 and Ubuntu 18.04: ecm fails to build

2018-04-28 Thread Nathan Dunfield
On Saturday, April 28, 2018 at 7:41:49 PM UTC-5, Erik Bray wrote:
>
> I just finished a full build from scratch on Ubuntu 18.04 and it went 
> fine. This was of 8.2.rc4. 
>
> I don't recall off the top of my head whether anything changed between 
> rc1 and rc4 that might have effected this, but you might try bumping a 
> rc4 just in case. 
>

Erik,

First, thanks for looking into this.  I erred when I wrote rc1, I too was 
working with the very latest rc4.  I was using my own variant of your 
original Dockerfiles, but I just did another run where I cloned 
"sagemath/docker-images", edited the first line of 
"sagemath-base/Dockerfile" and then did:

docker build --tag="sagemath/sagemath-base" sagemath-base
docker build --tag="sagemath/sagemath-develop" sagemath-develop


The error log looks pretty much the same as before except this time the 
package was "ecm-7.0.4.p0" rather than "ecm-7.0.4.p1". 

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sage 8.2rc1 and Ubuntu 18.04: ecm fails to build

2018-04-29 Thread Nathan Dunfield


On Sunday, April 29, 2018 at 4:55:35 AM UTC-5, Erik Bray wrote:
>
> Yep, SAGE_FAT_BINARY=yes is what did it.  I'll look into it further. 
>

Erik,

Thanks!  I just confirmed that setting SAGE_FAT_BINARY to "no" fixes the 
problem on my machine as well.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] ecm build fails with 8.2rc1 on Ubuntu 18.04

2018-04-30 Thread Nathan Dunfield
I tried building Sage from source on the new Ubuntu 18.04 in a clean Docker 
container with just a handful of basic packages installed, principally gcc 
7.   It was unable to build ecm-7.0.4.p1 which is included in 8.2rc1.  Here 
is what seems to be the core of the error message:

mv -f aprtcle/.deps/aprcl-mpz_aprcl.Tpo aprtcle/.deps/aprcl-mpz_aprcl.Po
libtool: link: gcc -g -O3 -fPIC -Wl,-rpath -Wl,/sage/local/lib -o tune 
tune-mpmod.o tune-tune.o tune-mul_lo.o tune-listz.o tune-auxlib.o 
tune-ks-multiply.o tune-schoen_strass.o tune-polyeval.o tune-median.o 
tune-ecm_ntt.o tune-ntt_gfp.o tune-mpzspv.o tune-mpzspm.o tune-sp.o 
tune-spv.o tune-spm.o tune-auxarith.o  -L/sage/local/lib 
./x86_64/.libs/libmulredc.a /sage/local/lib/libgmp.a -lrt -lm
mv -f aprtcle/.deps/libecm_la-mpz_aprcl.Tpo 
aprtcle/.deps/libecm_la-mpz_aprcl.Plo
mv -f .deps/libecm_la-pm1fs2.Tpo .deps/libecm_la-pm1fs2.Plo
/sage/local/lib/libgmp.a(fat_entry.o): In function `__gmpn_mod_34lsub1':
/sage/local/var/tmp/sage/build/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868/src/mpn/tmp-fat_entry.s:202:
 
multiple definition of `__gmpn_mod_34lsub1'
tune-schoen_strass.o:/sage/local/var/tmp/sage/build/ecm-7.0.4.p1/src/schoen_strass.c:61:
 
first defined here
/usr/bin/x86_64-linux-gnu-ld: /sage/local/lib/libgmp.a(fat_entry.o): 
relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when 
making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section 
on output


You can find the whole log at http://dunfield.info/temp/ecm-7.0.4.p1.log 

The underlying hardware (i.e. the Docker host) is an iMacPro with a Xeon 
W-2150B CPU.  I will try building on an older Mac Pro and see if the 
failure is processor dependent, but I have successfully built 8.2rc1 on the 
same machine in a 16.04 Docker container.  

Best,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] SageMath 8.2 Docker image: pip lacks SSL support

2018-05-16 Thread Nathan Dunfield
Just tried out the latest Sage Docker image and, unlike all previous 
versions, I can no longer use pip to fetch packages off PyPI:

docker run -it sagemath/sagemath:8.2 /bin/bash
sage@6bf664a266cd:~/sage$ sage -pip install FXrays
pip is configured with locations that require TLS/SSL, however the ssl 
module in Python is not available.
Collecting FXrays
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS 
URL because the SSL module is not available.",)': /simple/fxrays/
[...]
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS 
URL because the SSL module is not available.",)': /simple/fxrays/
  Could not fetch URL https://pypi.python.org/simple/fxrays/: There was a 
problem confirming the ssl certificate: 
HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded 
with url: /simple/fxrays/ (Caused by SSLError("Can't connect to HTTPS URL 
because the SSL module is not available.",)) - skipping
  Could not find a version that satisfies the requirement FXrays (from 
versions: )
No matching distribution found for FXrays

If I do

sudo apt-get update; sudo apt-get install -y openssl

in the container then pip starts working again.  So it looks like Python 
was compiled with SSL support but somehow the openssl module itself gets 
removed somewhere in the process.

Thanks,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: SageMath 8.2 Docker image: pip lacks SSL support

2018-05-17 Thread Nathan Dunfield

>
> In the interim, could you try to install OpenSSL and its development files 
> a,d reinstall Sage's pip ?
>

Actually, I fixed the problem simply by installing the (non-development) 
Ubuntu package "openssl".  In particular, I did not need to reinstall or 
rebuild any part of Sage itself.   I'm guessing that the "openssl" package 
was accidentally removed from the Docker image after Sage was built.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: SageMath 8.2 Docker image: pip lacks SSL support

2018-05-27 Thread Nathan Dunfield
On Saturday, May 26, 2018 at 7:43:14 PM UTC-4, Julian Rüth wrote:
>
> Thanks for reporting this and even providing a workaround :)
>
> You are right, Sage was built with libssl-dev but the final container had 
> been missing openssl. I fixed it for the 8.2 build and pushed a new image 
> to the Docker Hub.
>

Great, the fixed version works for me.   Thanks for fixing this!

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: talk

2018-07-25 Thread Nathan Dunfield
On Tuesday, July 24, 2018 at 4:49:45 PM UTC-5, Timo Kaufmann wrote:
>
> I really like your wishlist! The all-or-nothing nature of sage and the 
> slow startup time (although it's actually more like 1.3 seconds with a warm 
> cache on my machine) are my biggest pain points. 
>

I've encountered incredibly slow Sage startup times on big clusters due to, 
I believe, the very slow nature of their distributed file systems and the 
huge number of files Sage opens at startup.  This was several years ago, 
but at the time Sage took several *minutes* to start on the main campus 
cluster here at UIUC.  I ended up using a smaller cluster for my 
computations where the startup time was "just" 20 seconds.  (I was running 
things from my home directory rather that trying to convince the admins to 
install Sage on each node which presumably would have fixed things.)  

>From the viewpoint of SnapPy, a more modular Sage would be fantastic as it 
would allow us to have more functionality in the stand-alone version and 
reduce development effort at the same time.

Nathan


 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: snappy in Sage

2018-10-02 Thread Nathan Dunfield
This is a known bug and we are working on it (there's even a ticket).  It 
should be fixed soon.  It's some issue with our configuration script.  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] snappy in Sage

2018-10-02 Thread Nathan Dunfield

>
> It's bad packaging by upstream: it's running Cython but the Cython 
> source files are not in the snappy source tarball. 
>

Yes, we ship the Cython generated C/C++ files rather than Cython code 
itself.  My understanding from the Cython docs is that this is the 
recommended approach for non-Sage packages, and we have always done this.  
But apparently we accidentally introduced a bug in the setup.py script in 
SnapPy 2.6 that is causing it to look for the Cython files anyway...

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] snappy in Sage

2018-10-02 Thread Nathan Dunfield

>
> Thanks, Thierry.  Sounds like we need a ticket for this.  In particular, I 
> wasn't even able to get sage -pip install mercurial to work on OS X.
>

I was just helping a colleague install SnapPy into SageMath on OS X and hit 
the above issue.  I just downloaded the source tarball from BitBucket 
directly and all of SnapPy built fine, even though Mercurial didn't.  So 
probably a problem with Mercurial...

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] snappy in Sage

2018-10-02 Thread Nathan Dunfield

>
> > The idea is that cython produces fully compliant C code, so that no 
> tuning 
> > of the generated C code is required. Distributing the cythonized c-files 
> > has the advantage that the installing user does not need cython 
> installed. 
> > In sage we have run into trouble with that due to API incompatibilities 
> > between Py2 and Py3, and it doesn't seem possible to specify the right 
> > conditionals in the cython file to produce an appropriate c file with 
> the 
> > right conditional pieces of code in. 
>
> As far as I remember, snappy deals with that by providing file.py2.c and 
> file.py3.c. Nathan could infirm/confirm. 
>

For SnapPy itself, we don't hit this API issue and so there is just a 
single version of each Cython-generated ".c" file.  For CyPari, I believe 
Marc Culler did have to use the scheme Vincent mentions above.

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: snappy in Sage

2018-10-04 Thread Nathan Dunfield
On Tuesday, October 2, 2018 at 10:40:28 AM UTC-5, Nathan Dunfield wrote:
>
> This is a known bug and we are working on it (there's even a ticket).  It 
> should be fixed soon.  It's some issue with our configuration script.  
>

FYI, this issue has now been fixed and the corrected version is on PyPI as 
version 2.6.1.post1.  
 
Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Import issue for Sage when using the system's Python (e.g. Debian)

2019-01-09 Thread Nathan Dunfield
I am a developer of the Python package "snappy" which acquires extra 
features when imported inside of Sage. Some of our Linux users have 
recently reported difficulties with SnapPy on machines where Sage was 
installed by the standard package manger making use of the system libraries 
and in particular the system python.  I have reproduced the problem on 
Debian Sid but it also manifests itself on Fedora 28 [1].  The root of our 
problem is that in this situation: 

python -c "import sage.all"

results the error: 

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/dist-packages/sage/all.py", line 71, in 
from sage.env import SAGE_ROOT, SAGE_SRC, SAGE_DOC_SRC, SAGE_LOCAL, 
DOT_SAGE, SAGE_ENV
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 123, in 
_add_variable_or_fallback('SAGE_ETC',opj('$SAGE_LOCAL', 'etc'))
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 103, in 
_add_variable_or_fallback
value = sep.join(components)
TypeError: sequence item 0: expected string, NoneType found

whereas 

sage -python -c "import sage.all"

works as expected.  Currently, our Python package tests for whether it is 
running in SageMath by:

_within_sage = False
try:
import sage.all
_within_sage = True
except ImportError:
pass

One solution for us (I think) would be to simply catch and ignore all types 
of exceptions in the above block, but I was wondering if the current 
behavior of 'python -c "import sage.all"' was expected or is this possibly 
a bug?  Or perhaps there is a work-around of some kind?

Thanks,

Nathan

P.S. In the Debian package "sage" does not accept the "-pip" flag, even 
though installing the "sagemath" package does pull in "pip" (tested on a 
clear Sid Docker container).  Why is this?  I ask because our current 
instructions for installing SnapPy into SageMath use "sage -pip".  


[1] See the second comment, not the original report, on 
https://bitbucket.org/t3m/snappy/issues/14/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Import issue for Sage when using the system's Python (e.g. Debian)

2019-01-10 Thread Nathan Dunfield



On Thursday, January 10, 2019 at 6:47:33 AM UTC-6, vdelecroix wrote:
>
> Le 10/01/2019 à 04:47, Nathan Dunfield a écrit : 
> > 
> > P.S. In the Debian package "sage" does not accept the "-pip" flag, even 
> > though installing the "sagemath" package does pull in "pip" (tested on a 
> > clear Sid Docker container).  Why is this?  I ask because our current 
> > instructions for installing SnapPy into SageMath use "sage -pip". 
>
> The sage script in Debian is indeed a restricted version of the 
> original sage script (to avoid messing up with the system). You 
> can just use the pip from the system. That works fine if you 
> source the environment variables first: 
>
> $ source /usr/share/sagemath/bin/sage-env 
> $ pip install surface_dynamics --user 
>

Yes, snappy installs fine with the system pip (even without sourcing 
sage-env), though as you know from writing the flatsurf docs, this 
distinction rather complicates the installation instructions.

Our issue reports have actually come from people who installed SnapPy in 
their system Python with pip only to have it crash when starting the 
SnapPy app because they had also previously installed Sage via their 
package manager.  In other words, our "installing SnapPy in Linux (no 
Sage)" instructions will fail if user has previously installed Sage in a 
particular way.  

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Import issue for Sage when using the system's Python (e.g. Debian)

2019-01-10 Thread Nathan Dunfield
On Thursday, January 10, 2019 at 9:38:15 AM UTC-6, vdelecroix wrote:
>
> Could you repeat the order in which things are broken. 
>

Any of the following sequences of commands will install both the SnapPy 
Python package and SageMath without producing any errors:

0) install python2 and python-pip 
1) install snappy via pip 
2) install sagemath via apt 

and 

1) install sagemath via apt 
2) install snappy via pip

and 

1) install sagemath via apt 
2) source sage-env and install snappy via pip 

Independent of which route one takes above both of the following commands 
will succeed:

A) sage -python -c "import snappy"
B) source  /usr/share/sagemath/bin/sage-env; python -c "import snappy"

and this will always fail:

C) python -c "import snappy"

Best,

Nathan



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Import issue for Sage when using the system's Python (e.g. Debian)

2019-01-10 Thread Nathan Dunfield
On Thursday, January 10, 2019 at 9:58:56 AM UTC-6, E. Madison Bray wrote:
>
> > On archlinux that also uses system Python for Sage the 
> > situation is better: importing sage.all in Python2 does work! Even 
> > though the configuration constants are not in the environment! They 
> > are set up properly in sage_env.py that is part of the SageMath 
> > installation. And more precisely $SAGE_LOCAL fallsback to the default 
> > "/usr" which is what it is intend to be on archlinux. 
> > 
> > I don't understand why on Debian $SAGE_LOCAL is set to None and 
> > managed by environment variables. 
>
> I have mentioned elsewhere (e.g. on 
> https://trac.sagemath.org/ticket/22652) that the sage.env module ought 
> to be fixed upstream (that is, in the main Sage sources) so that it 
> can actually work properly without having to set any special 
> environment variables.  Even if it has to guess in some cases, and has 
> to raise a RuntimeError if it can't reasonably guess the correct 
> values for some variables, in most cases it should be possible to 
> design this in such a way that it *just works* from a normal python 
> interpreter with no additional variables set. 
>

Fixing upstream is always best, but in the meantime is there some reason 
that the Debian package doesn't just patch "sage/env.py" like Arch does?  
Looking at the Arch approach, I checked that the following 3-line patch 
causes 'python -c "import sage.all"' to succeed on Debian Sid with SageMath 
8.4. 

Best,

Nathan

--- env.py.orig 2019-01-03 05:15:59.0 -0600
+++ env.py 2019-01-10 12:28:13.0 -0600
@@ -118,10 +118,10 @@
 _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
 
 # bunch of sage directories and files
-_add_variable_or_fallback('SAGE_ROOT',   None)
-_add_variable_or_fallback('SAGE_LOCAL',  None)
+_add_variable_or_fallback('SAGE_ROOT',   '/usr/share/sagemath')
+_add_variable_or_fallback('SAGE_LOCAL',  '/usr')
 _add_variable_or_fallback('SAGE_ETC',opj('$SAGE_LOCAL', 'etc'))
-_add_variable_or_fallback('SAGE_SCRIPTS_DIR',opj('$SAGE_LOCAL', 'bin'))
+_add_variable_or_fallback('SAGE_SCRIPTS_DIR',opj('$SAGE_ROOT', 'bin'))
 _add_variable_or_fallback('SAGE_INC',opj('$SAGE_LOCAL', 'include'))
 _add_variable_or_fallback('SAGE_SHARE',  opj('$SAGE_LOCAL', 'share'))


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: How's tkinter on Macs?

2015-01-05 Thread Nathan Dunfield

>
> See http://trac.sagemath.org/ticket/4970 - I have a feeling this is long 
> since superseded 
>

I agree: Tkinter works out-of-the box on OS X with any recent source or 
binary release of Sage. 

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: How's tkinter on Macs?

2015-01-06 Thread Nathan Dunfield

>
> I agree: Tkinter works out-of-the box on OS X with any recent source or 
>> binary release of Sage. 
>>
>> Can you review that ticket, then?  I have no experience with Tkinter 
> myself. 
>

Sure, but what does that mean given that nothing needs to be done?   More 
specifically, what trac status should I assign?  Positive review doesn't 
sound right since there's an attached patch that should *not* be applied...

Thanks,

Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


  1   2   >