[sage-devel] Re: Default ipython profile

2015-08-19 Thread Kwankyu Lee
This is a one-line ticket waiting for review, but is in pending state for 
patchbots since it touches an "unsafe file" (sage-ipython). Would any of 
you review?

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

-- 
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] About plot(sin(x))

2015-08-19 Thread William Stein
On Wed, Aug 19, 2015 at 12:30 PM, Travis Scrimshaw  wrote:
> More of random thought, but would people be interested in adding a value to
> the builtin functions which says what a "good" default plot interval is,
> e.g., for sin(x) would be [-pi, pi] or [-2pi, 2pi] (and hope there's not too
> much bikeshedding)?

I think adding such a thing is an extremely good proposal.   I was
just looking at the mathematic docs and they have an "automatic"
option for determining plot ranges, which is by definition heuristics
-- I guess that's what's being proposed as the default instead of
[-1,1].  How about as a first step, we just discuss and implement such
an option, and then later think about whether not to make it the
default?  Initially there is no issue of backwards compatibility to
worry about.

william

>
> Best,
> Travis
>
>
> On Tuesday, August 18, 2015 at 10:44:01 AM UTC-7, William wrote:
>>
>> On Tue, Aug 18, 2015 at 10:26 AM, Nathann Cohen 
>> wrote:
>> > Hello everybody,
>> >
>> > Just a random thought. I typed "plot(sin(x))" today, and it felt "wrong"
>> > that the plot was on x=-1...1.
>> >
>> > I know that we are not wizards, and that we cannot magically guess the
>> > "right" interval to plot a function. But I wondered: what would you
>> > think of
>> > changing that default to -3,3 or -5,5, or anything you might like?
>> >
>> > This would appear a bit better. I don't know whether that is a good or a
>> > bad
>> > idea, so I throw it here :-)
>> >
>> > Have fuun,
>>
>> -1 to changing a decade old default in Sage just for fun.
>>
>> William
>>
>> >
>> > Nathann
>> >
>> > --
>> > 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+...@googlegroups.com.
>> > To post to this group, send email to sage-...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/sage-devel.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> William (http://wstein.org)
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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] About plot(sin(x))

2015-08-19 Thread Travis Scrimshaw
More of random thought, but would people be interested in adding a value to 
the builtin functions which says what a "good" default plot interval is, 
e.g., for sin(x) would be [-pi, pi] or [-2pi, 2pi] (and hope there's not 
too much bikeshedding)?

Best,
Travis


On Tuesday, August 18, 2015 at 10:44:01 AM UTC-7, William wrote:
>
> On Tue, Aug 18, 2015 at 10:26 AM, Nathann Cohen  > wrote: 
> > Hello everybody, 
> > 
> > Just a random thought. I typed "plot(sin(x))" today, and it felt "wrong" 
> > that the plot was on x=-1...1. 
> > 
> > I know that we are not wizards, and that we cannot magically guess the 
> > "right" interval to plot a function. But I wondered: what would you 
> think of 
> > changing that default to -3,3 or -5,5, or anything you might like? 
> > 
> > This would appear a bit better. I don't know whether that is a good or a 
> bad 
> > idea, so I throw it here :-) 
> > 
> > Have fuun, 
>
> -1 to changing a decade old default in Sage just for fun. 
>
> William 
>
> > 
> > Nathann 
> > 
> > -- 
> > 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+...@googlegroups.com . 
> > To post to this group, send email to sage-...@googlegroups.com 
> . 
> > Visit this group at http://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> William (http://wstein.org) 
>

-- 
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: SSLv3 and Sage 6.8

2015-08-19 Thread Dima Pasechnik


On Tuesday, 18 August 2015 22:56:45 UTC-7, Jori Mäntysalo wrote:
>
> On Tue, 18 Aug 2015, Dima Pasechnik wrote: 
>
> >>> At http://trac.sagemath.org/ticket/17164 it seems that Sage 6.8 has 
> not 
> >>> support for vulnerable SSLv3 anymore. But it still seems to have - at 
> >>> least on SageNB. 
>
> >>> I have and old installation that I have upgraded version-by-version 
> >>> for years. 
>
> >> Probably you would have to manually upgrade the ssl?  I don't know. 
>
> > That's a good idea. 
>
> To clarify: I have always (for production system) downloaded newest 
> stable version from sagemath.org. But the user account that runs Sage GUI 
> has not been clearer between semesters. 
>
> And we run it without ipython -option. Actually like this: 
>
> su -c 'nohup authbind --deep .../sage-6.8/sage -c "notebook(secure=true, 
> interface=\"\", port=443, timeout=36000, 
> server_pool=[\"sagecalc@localhost\"])" 2> .../errorlog > 
> .../normallog &' - sagegui 
>
> But that should not make any difference. 
>

Sage(nb) does not ship its own ssl implementation, so it got to updated 
elsewhere.
It does ship pyopenssl though.
 

>
> -- 
> Jori Mäntysalo 
>

-- 
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] Integer from mpz_t

2015-08-19 Thread Ralf Stephan
On Wednesday, August 19, 2015 at 11:51:49 AM UTC+2, David Roe wrote:
>
> Since you have an mpz_t, presumably you're writing in Cython.


Unfortunately, no. I'm improving Pynac to use gmp internally. But at some
time we must convert back. I completely missed set_from_mpz though.
With that I just need a C wrapper like in symbolic/pynac.pyx.

Thanks all.

-- 
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: Integer from mpz_t

2015-08-19 Thread Jean-Pierre Flori


On Wednesday, August 19, 2015 at 12:36:07 PM UTC+2, vdelecroix wrote:
>
>
>
> On 19/08/15 12:31, Jean-Pierre Flori wrote: 
> > 
> > 
> > On Wednesday, August 19, 2015 at 12:21:36 PM UTC+2, vdelecroix wrote: 
> >> 
> >> Note that all the solutions given will *copy* the mpz_t to the Integer. 
> >> Is that what you want? It is also possible to avoid the copy if it is 
> >> worth it (i.e. you have a big integer). 
> >> 
> > And one shall not use PY_NEW but the __new__ method :) 
> > 
>
> I thought it did not work for Integer (because of the hook with the 
> tp_new slot). 
>
Argh, you might be right. 

-- 
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: Integer from mpz_t

2015-08-19 Thread Vincent Delecroix



On 19/08/15 12:31, Jean-Pierre Flori wrote:



On Wednesday, August 19, 2015 at 12:21:36 PM UTC+2, vdelecroix wrote:


Note that all the solutions given will *copy* the mpz_t to the Integer.
Is that what you want? It is also possible to avoid the copy if it is
worth it (i.e. you have a big integer).


And one shall not use PY_NEW but the __new__ method :)



I thought it did not work for Integer (because of the hook with the 
tp_new slot).


--
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: Integer from mpz_t

2015-08-19 Thread Jean-Pierre Flori


On Wednesday, August 19, 2015 at 12:21:36 PM UTC+2, vdelecroix wrote:
>
> Note that all the solutions given will *copy* the mpz_t to the Integer. 
> Is that what you want? It is also possible to avoid the copy if it is 
> worth it (i.e. you have a big integer).  
>
And one shall not use PY_NEW but the __new__ method :) 

-- 
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: Integer from mpz_t

2015-08-19 Thread Vincent Delecroix
Note that all the solutions given will *copy* the mpz_t to the Integer. 
Is that what you want? It is also possible to avoid the copy if it is 
worth it (i.e. you have a big integer).


On 19/08/15 11:52, Jean-Pierre Flori wrote:



On Wednesday, August 19, 2015 at 11:19:30 AM UTC+2, Ralf Stephan wrote:


Given an mpz_t, how to most effectively create an Integer?
The best I can come up with is through the string representation.
Or, of course, by patching integer.pyx.

Am I missing something?

 From Cython you can use the method

   cdef void set_from_mpz



--
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: Integer from mpz_t

2015-08-19 Thread Jean-Pierre Flori


On Wednesday, August 19, 2015 at 11:19:30 AM UTC+2, Ralf Stephan wrote:
>
> Given an mpz_t, how to most effectively create an Integer?
> The best I can come up with is through the string representation.
> Or, of course, by patching integer.pyx.
>
> Am I missing something?
>
> From Cython you can use the method
  cdef void set_from_mpz

-- 
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] Integer from mpz_t

2015-08-19 Thread David Roe
Since you have an mpz_t, presumably you're writing in Cython.  Then
you can do something like the following.

cdef mpz_t input
cdef Integer output = PY_NEW(Integer)
output.set_from_mpz(input)

Or something like
mpz_set(output.value, input).

David

On Wed, Aug 19, 2015 at 2:19 AM, Ralf Stephan  wrote:
> Given an mpz_t, how to most effectively create an Integer?
> The best I can come up with is through the string representation.
> Or, of course, by patching integer.pyx.
>
> Am I missing something?
>
> --
> 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.

-- 
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] Integer from mpz_t

2015-08-19 Thread Ralf Stephan
Given an mpz_t, how to most effectively create an Integer?
The best I can come up with is through the string representation.
Or, of course, by patching integer.pyx.

Am I missing something?

-- 
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] Should sage -i install *dependencies* of packages?

2015-08-19 Thread Daniel Krenn

On 2015-08-18 22:16, Jeroen Demeyer wrote:

- move the current low-level `sage -i` to, say, `sage -p` (which
   automatically includes `sage -p -c -f` and remains consistent with
   `sage -b` and `sage --docbuild`, so that we keep all the benefits of
   (B)). Replace `sage -i` with `sage -p` in `sage -advanced`.
- consider `sage -i` as the user interface to the current packaging
   system. For now, it could just call `make`, later it could call some
   conda/hashdist/whatever command transparently.

Good for me, since it is very close to my proposal (C) but just with
different option names: (-i, -p) instead of (-m, -i)! I hope the other
people who voted for (A) can accept this solution too.


To resolve all doubts on what is planned:
Is the planned difference between -i and -p the same as in Debian 
systems apt-get/aptitude and dpkg ? If yes, I am fine with this solution.


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