[sage-devel] Re: sage 6.6 & pyopenssl

2015-05-03 Thread leif
Clemens Heuberger wrote:
> I tried to install pyopenssl in order to run sagenb in sage 6.6 with
> secure=True. It fails with Error 404, see below.
> 
> Regards,
> 
> CH
> 
> I get:
> $ ./sage -i pyopenssl
> Attempting to download package pyopenssl
 Checking online list of optional packages.
> [.]
 Found pyopenssl-0.13.p0
 Trying to download 
 http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> 
> IOError: [Errno 404] Not Found:
> '//www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg'
> Error: failed to download package pyopenssl-0.13.p0
> 
> $ LANG=C wget http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> --2015-05-03 16:02:09--
> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> Resolving www.sagemath.org (www.sagemath.org)... 128.208.178.250
> Connecting to www.sagemath.org (www.sagemath.org)|128.208.178.250|:80... 
> connected.
> HTTP request sent, awaiting response... 404 Not Found
> 2015-05-03 16:02:10 ERROR 404: Not Found.

Unfortunately setting SAGE_SERVER is borked as well (because the mirrors
still have 'spkg/', not 'packages/', which the scripts simply ignore),
but you could use a mirror "manually":


  wget
http://mirror.switch.ch/mirror/sagemath/spkg/optional/pyopenssl-0.13.p0.spkg

  ./sage -i pyopenssl-0.13.p0.spkg   # Note the extension



-leif


-- 
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 6.6 & pyopenssl

2015-05-03 Thread leif
Volker Braun wrote:
> Use "sage -pip install pyopenssl"

That's not what currently 'make ssl' does, nor what README.txt says:

10. OPTIONAL: Read this if you are intending to run a Sage notebook
server for multiple users. For security (i.e., to run
"notebook(secure=True)") you want to access the server using the
HTTPS protocol. First, install OpenSSL and the OpenSSL development
headers on your system if they are not already installed. Then
install pyOpenSSL by building Sage and then typing

./sage -i pyopenssl

Note that this command requires internet access.  Alternatively,
"make ssl" builds Sage and installs pyOpenSSL.


(Sage 6.7.beta3)

/Somebody/^TM should open a ticket...


-leif

> On Sunday, May 3, 2015 at 4:03:01 PM UTC+2, Clemens Heuberger wrote:
> 
> I tried to install pyopenssl in order to run sagenb in sage 6.6 with
> secure=True. It fails with Error 404, see below.
> 
> Regards,
> 
> CH
> 
> I get:
> $ ./sage -i pyopenssl
> Attempting to download package pyopenssl
> >>> Checking online list of optional packages.
> [.]
> >>> Found pyopenssl-0.13.p0
> >>> Trying to download
> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> 
> ...
> IOError: [Errno 404] Not Found:
> '//www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> '
> Error: failed to download package pyopenssl-0.13.p0
> 
> $ LANG=C wget
> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> --2015-05-03
> 
> 16:02:09--
> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
> 
> Resolving www.sagemath.org 
> (www.sagemath.org )... 128.208.178.250
> Connecting to www.sagemath.org 
> (www.sagemath.org )|128.208.178.250|:80...
> connected.
> HTTP request sent, awaiting response... 404 Not Found
> 2015-05-03 16:02:10 ERROR 404: Not Found.


-- 
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: Change of semantics for 'show'

2015-05-03 Thread Volker Braun
On Thursday, April 30, 2015 at 8:19:39 AM UTC+2, Martin R wrote:
>
> I'm only trying to understand.  Yes, I assume it happens that someone is 
> using sage as a python library and then possibly only wants repr.
>

If you use Sage as a Python library then you are in control of the 
displayhook. The Python default which will only use __repr__. Your 
application can change that of course.


So the point really is that, at least for me personally, having rich_repr 
>>> return graphics in the console (for any object, not only graphs) is very 
>>> very undesirable.
>>>
>> Presumably you find it desirable to display Graphics() objects (the 
>> return value of plot()) as picture, so there is that.
>>
> Of course.  Hence, _rich_repr_ (or _repr_) should not return a Graphics 
> object, right?.
>

Graphics() is the base class for (2d) graphics in Sage. It does more than 
just draw pictures, you can also save them in different image file formats, 
play with axes, etc. The _rich_repr_() method never returns Graphics, it 
uses its own class hierarchy to encapsulate a particular type of rich 
output that is supported by the backend.

sage: p = plot(sin)
sage: type(p)


sage: p_repr = p.__repr__()
sage: type(p_repr)


sage: dm = sage.repl.rich_output.get_display_manager()
sage: p_rich_repr = p._rich_repr_(dm)
sage: type(p_rich_repr)


sage: dm.preferences.graphics = 'vector'
sage: type(p._rich_repr_(dm))


sage: dm.supported_output()
frozenset({,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   })

-- 
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: src/bin in path?

2015-05-03 Thread Volker Braun
IMHO the question really is about "what constitutes a binary install". 
Presumably the answer is something like "the sage launcher script, and the 
SAGE_LOCAL tree". This is not true right now, and IMHO there are bigger 
fish to fry than $PATH. For example, the documentation output is in 
src/doc. I don't really care whether we a) only add src/bin in a dev tree 
or b) make an extra install target for scripts. Also, scripts and auxiliary 
binaries that can not / should not be used without Sage shouldn't be in 
$prefix/usr/bin, better would be $prefix/usr/libexec/sage




On Friday, May 1, 2015 at 8:17:40 PM UTC+2, Nils Bruin wrote:
>
> On Friday, May 1, 2015 at 10:08:21 AM UTC-7, Volker Braun wrote:
>>
>> If it weren't in the path then you would have to run "make" whenever you 
>> want to change one of the scripts in src/bin. This gets boring real quick.
>>
>
> I see. Sloppy but convenient if you happen to be working on the scripts. 
> How attainable are cleaner solutions? hardlink the files? put these files 
> under source control in local/bin so that src/bin isn't necessary at all?
>
> Given that all the other stuff (including .py library files, for which 
> "make" is also just  copy operation) does need "sage -b" or some flavour of 
> "make", it's really quite surprising to see anything in src/ take 
> precedence during execution over local/ .
>
> (there really should be a subtarget "make install-scripts" that only does 
> the required copy operation, in which case the boredom would set in a 
> little later)
>
>  Another solution that would leave sage in a cleaner state in general 
> would be to only add src/bin to the path when you're working on the 
> scripts, (the git log on src/bin indeed suggests that this doesn't happen 
> too often).
>
>

-- 
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 6.6 & pyopenssl

2015-05-03 Thread Volker Braun
Use "sage -pip install pyopenssl"

On Sunday, May 3, 2015 at 4:03:01 PM UTC+2, Clemens Heuberger wrote:
>
> I tried to install pyopenssl in order to run sagenb in sage 6.6 with 
> secure=True. It fails with Error 404, see below. 
>
> Regards, 
>
> CH 
>
> I get: 
> $ ./sage -i pyopenssl 
> Attempting to download package pyopenssl 
> >>> Checking online list of optional packages. 
> [.] 
> >>> Found pyopenssl-0.13.p0 
> >>> Trying to download 
> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg 
> ... 
> IOError: [Errno 404] Not Found: 
> '//www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg' 
> Error: failed to download package pyopenssl-0.13.p0 
>
> $ LANG=C wget http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg 
>
> --2015-05-03 
>  
> 16:02:09-- 
> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg 
> Resolving www.sagemath.org (www.sagemath.org)... 128.208.178.250 
> Connecting to www.sagemath.org (www.sagemath.org)|128.208.178.250|:80... 
> connected. 
> HTTP request sent, awaiting response... 404 Not Found 
> 2015-05-03 16:02:10 ERROR 404: Not Found. 
>

-- 
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] sage 6.6 & pyopenssl

2015-05-03 Thread Clemens Heuberger
I tried to install pyopenssl in order to run sagenb in sage 6.6 with
secure=True. It fails with Error 404, see below.

Regards,

CH

I get:
$ ./sage -i pyopenssl
Attempting to download package pyopenssl
>>> Checking online list of optional packages.
[.]
>>> Found pyopenssl-0.13.p0
>>> Trying to download 
>>> http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
...
IOError: [Errno 404] Not Found:
'//www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg'
Error: failed to download package pyopenssl-0.13.p0

$ LANG=C wget http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
--2015-05-03 16:02:09--
http://www.sagemath.org/spkg/optional/pyopenssl-0.13.p0.spkg
Resolving www.sagemath.org (www.sagemath.org)... 128.208.178.250
Connecting to www.sagemath.org (www.sagemath.org)|128.208.178.250|:80... 
connected.
HTTP request sent, awaiting response... 404 Not Found
2015-05-03 16:02:10 ERROR 404: Not Found.

-- 
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: Bug in pickling of callable symbolic functions

2015-05-03 Thread Eric Gourgoulhon
Hi,

Le vendredi 1 mai 2015 17:23:55 UTC+2, Nils Bruin a écrit :
>
> On Friday, May 1, 2015 at 2:00:11 AM UTC-7, Eric Gourgoulhon wrote:
>  
>
>> Thanks for your answer. There is no predefined 'H' function in Sage, so 
>> do you mean a nameclash with a predefined function 'H' in Pynac ? Which 
>> function is it ? It seems to be (x,y) |--> - x ln(1-xy), but I don't see 
>> why this function is special and would deserve a predefined name.
>>
>
> Most probably these (from 
> http://www.ginac.de/tutorial/#Built_002din-functions ):
>
> G(a, y)multiple polylogarithm G(a, s, y)multiple polylogarithm with 
> explicit signs for the imaginary parts S(n, p, x)Nielsen’s generalized 
> polylogarithm H(m, x)harmonic polylogarithm 
>

Thanks for your answer and the link! This is clearly the source of the 
problem.
 

> This is clearly a problem in sage: we're not exposing these polylogs under 
> those names at all, and even for "sin" we do seem to support having new, 
> symbolic, user functions with that name (which will collide as soon as you 
> step into libmaxima or anything else that has to communicate function 
> identifiers by names in a flat namespace). The fact that we don't in 
> pickling is clearly a problem.
>


A workaround until something better could be to modify Sage's function(s, 
*args, **kwds) to generate an error (e.g. "this name is reserved") as soon 
as 
- s = 'sin' or any predefined Sage function
- s='G' and len(args)=2 or 3
- s='H' and len(args)=2
- s='S' and len(args)=3
etc.
But this might be tedious, given the large number of functions in Sage...

Eric. 

-- 
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: dimension() broken for ideals?

2015-05-03 Thread mmarco
It is definitely a bug in the dimension method.

If singular can handle the ring, sage asks singular to compute the 
dimension, which does correctly (the -1 is the singular convention for 
empty varieties).

The problem is that when the field is not supported by singular (which 
happens with QQbar or finite fields of characteristic bigger than 2^31) , 
then sage falls back to its own toy implementation. In that case, it 
appears that the empty case is not treated separatedly than the zero 
dimensional case.



El viernes, 1 de mayo de 2015, 21:18:55 (UTC+2), gjorgen...@my.fit.edu 
escribió:
>
> Hi,
>
> For the following ideal, dimension() returns 0,
> {{{
> R.=QQbar[]
> I=R.ideal([ s0 + 1, s0*s1 + s0 + s1 + 1, (-2)*s0 + 1, (-10)*s1 + 5, 5*s0^2 
> + 10*s0*s1 ])
> I.dimension()
> }}}
> but its variety is empty.
>
> Also for any other ring, dimension() returns -1 for this ideal. Is this a 
> bug with dimension()? The documentation for dimension() doesn't seem to 
> mention the -1 case. 
> It provides the following example,
> {{{
> R. = PolynomialRing(GF(2147483659),order='lex')
> I = R.ideal([x*y,x*y+1])
> I.dimension()
> }}}
> which yields dimension 0 for the ideal, yet the corresponding variety is 
> empty.
>
> What is the expected behavior for dimension()? When the variety of the 
> ideal in question has no points is dimension() always supposed to return -1?
>

-- 
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] Is CMake OK for a standard spkg?

2015-05-03 Thread Dima Pasechnik


On Saturday, 2 May 2015 08:25:15 UTC+1, Isuru Fernando wrote:
>
> Hi,
>
> What is the consensus on getting CMake into Sage? 
>
> I made a ticket to get CMake into the optional packages list.
>  http://trac.sagemath.org/ticket/18078 
> , so that CMake can be built from 
> source in Sage and the user does not have to make a system wide 
> installation.
>
> I'll work on getting CSymPy(github.com/sympy/csympy) into Sage this 
> summer. CSymPy uses CMake and I'd like a heads up on how to proceed. (If 
> CMake won't get into standard packages list in the future, then we'll have 
> to move to another build system as me and Ondřej would like to get CSymPy 
> into standard packages list)
>

before cmake builds from source within Sage on OSX, using Sage's C/C++ 
toolchain, this is most probably not possible. 
And this seems to be hard to fix - it probably is a good illustration of 
cmake issues :-) 

>
> Isuru
>
>
> On Monday, February 9, 2015 at 6:07:40 PM UTC+5:30, Oleksandr Motsak wrote:
>>
>> AFAIR we had a preliminary cmake build system for legacy Singular but it 
>> is not yet ported to the current Singular (SW), 
>> whose build system is currently based on autoconf & automake.
>>
>> we may do that at some point. 
>>
>> ps: IMHO following 
>> http://stackoverflow.com/questions/5971921/building-a-library-using-autotools-from-cmake
>>  
>> would make it possible to approach that porting incrementally...
>>
>> Regards,
>>
>> -- 
>> Oleksandr
>>
>>
>> On Sunday, February 8, 2015 at 2:18:30 PM UTC+1, Jakob Kroeker wrote:
>>>
>>> >Anyway, as mentioned before, according to this thread:
>>>
>>> >   
>>> http://groups.google.com/group/sage-devel/browse_thread/thread/e91a204a2902afd/ccbdaa4792872282?lnk=gst&q=Heads+up#ccbdaa4792872282
>>> >singular is migrating to CMake.
>>>
>>> For good or bad, Singular did not migrate to CMake. There was too much 
>>> opposition, I guess.
>>>
>>
>> Am Montag, 1. März 2010 13:39:59 UTC+1 schrieb William:

 On Sun, Feb 28, 2010 at 11:40 PM, Peter Jeremy  
 wrote:

 >>For what is worth, we use cmake in FEMhub (femhub.org) as a standard
 >>package and we never had any problems with that.
 >
 > If CMake was widely used (and hence can be listed as a prerequisite 
 for
 > building Sage - like gmake, bash etc) then it would have no overhead
 > for Sage.

 CMake is definitely not as widely used as gmake and bash, so I'm
 against making it a prerequisite for Sage. In the history of the Sage
 project, the only prerequisite that was ever added was gfortran, and
 that is really part of GCC (Gnu Compiler Collection), so fairly
 standard.

 Anyway, as mentioned before, according to this thread:


 http://groups.google.com/group/sage-devel/browse_thread/thread/e91a204a2902afd/ccbdaa4792872282?lnk=gst&q=Heads+up#ccbdaa4792872282

 singular is migrating to CMake.  If that really happens, Sage will
 have to include CMake, whether we want to or not.

  -- William



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