Re: [sage-devel] Sorting strings and integers

2017-08-07 Thread Daniel Krenn
On 2017-08-07 22:53, David Roe wrote:
> >>> sorted([1,2,'a'])
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: '<' not supported between instances of 'str' and 'int'
> [...]
> Which still leaves the second part of Stefan's question: how do we get
> consistent doctest output in contexts where we have been sorting?

sage: sorted([1,2,'a'], key=str)

or even

sage: sorted([1,2,'a'], key=sage_total_order_as_we_have_it_now_key)

if someone really wants the old behavior back.

-- 
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] Sorting strings and integers

2017-08-07 Thread Jori Mäntysalo

On Mon, 7 Aug 2017, David Roe wrote:


Yet for a user looking at the examples of using such a function, it's nicer to 
see

sage: my_func(inputs) # unordered
[A, C, B]

rather than

sage: set([str(c) for c in my_func(inputs)]) == set(["A","B","C"])
True


Maybe just

EXAMPLES::

sage: my_func(inputs)  # Not tested, result is unordered
[A, C, B]

TESTS::

sage: set(my_func(inputs)) == set(["A","B","C"])
True

? This has been discussed earlier and I think we have no good solution. 
For example a vertex of a graph has set of neighbors and a polynomial has 
a set of roots, yet we return a list of neighbors and a list of roots. I 
guess that the user can figure out what happened if an example says


sage: my_func(inputs)
[1, 2]

and he/she got

[2, 1]

--
Jori Mäntysalo

Re: [sage-devel] Zulip

2017-08-07 Thread David Roe
Here's a status report from playing around with it for a few days.

* I find it pretty interesting to watch the feeds of everything that's
happening on trac (you can also just focus on a single component).
* I think that it will be quite useful for having online Sage Days, which
have happened at various points in the past but not much in recent years.
We're going to be having somewhat regular p-adics meetings on Zulip, the
first being tomorrow at 12pm EDT, 6pm CEST.  Feel free to join us, or
organize your own meetings.
* If you want to ask me for a code review, that's what the code review
stream is for.  :-)

David

On Sun, Aug 6, 2017 at 1:02 PM, William Stein  wrote:

> Hi,
>
> Zulip was also founded and is run by Tim Abbott, who did a lot of work on
> Sage in the past, mainly single-handedly getting Sage into Debian back in
> 2007...  He's now focusing a lot of effort on Zulip.
>
>  -- William
>
> On Sun, Aug 6, 2017 at 9:44 AM David Roe  wrote:
>
>> Hi everyone,
>> I've set up a server running Zulip for realtime collaboration on Sage.
>> You can try it out at zulip.sagemath.org.  More details below
>>
>> *Zulip*
>> Zulip is an open source group chat program (see their website
>>  and chat room ).  Zulip is
>> organized into streams, and within each stream you can narrow by topic.
>> I've set up a bunch of streams to start us off, but you can also create
>> your own.
>>
>> *Signing up*
>> You can register using a google account, a github account, or by entering
>> an e-mail and password.  Note that the e-mail settings are not yet fully
>> configured, so e-mails will most likely go to your *spam filter*; check
>> there first.  If you have other problems registering, please let me know.
>>
>> *Streams*
>> There is a set of default streams that you will be subscribed to when you
>> join, but there are lots more that you can find in the Manage Streams menu
>> in Settings.  For example, you might want to subscribe to the "number
>> theory" and "padics" streams, or to the "combinatorics" and "porting"
>> streams.
>>
>> *Integration with Trac*
>> I've set up a bot so that every update to trac gets sent to the trac
>> stream and to a stream for the component (e.g. trac-padics); you can either
>> subscribe to "trac" to get all notifications or to a set of components.
>> Since trac's wiki language isn't the same as markdown, some of the
>> formatting will be off.  If you're interested in improving the bot, let me
>> know!
>>
>> *Audience*
>> For now, I want to see how well Zulip works for the Sage developers (for
>> example, with enough critical mass of users it might become a good place to
>> find people to review your tickets). Eventually, I could also see Zulip
>> also being valuable as a place where users could ask questions.  Some of
>> the streams that I've set up are with this aim in mind.
>>
>> Hope to hear from you on Zulip!
>> David
>>
>> --
>> 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.
>>
> --
> -- William Stein
>
> --
> 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.
>

-- 
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] Sorting strings and integers

2017-08-07 Thread Stefan


>  What bad practice are you referring to?  The output of some functions are 
> lists where the ordering is somewhat unpredictable.  This different 
> ordering can reveal itself in testing on different platforms, or with a 
> changed package that Sage depends on.  Yet for a user looking at the 
> examples of using such a function, it's nicer to see 
>
> sage: my_func(inputs) # unordered
> [A, C, B]
>
> rather than
>
> sage: set([str(c) for c in my_func(inputs)]) == set(["A","B","C"])
> True
>
> David
>

Agreed. This is especially true for the Matroid class, where the ground set 
can contain any hashable objects. The automatic label generator for 
extensions will go for strings, so it's easy to get a mixture of strings 
and integers.

--Stefan.

P.S. The Graph class does way too much sorting. See e.g. 
sage.graphs.generic_graph.GenericGraph.vertices()

-- 
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] Sorting strings and integers

2017-08-07 Thread David Roe
On Mon, Aug 7, 2017 at 5:14 PM, Vincent Delecroix <20100.delecr...@gmail.com
> wrote:

> On 07/08/2017 23:11, David Roe wrote:
>
>> On Mon, Aug 7, 2017 at 5:03 PM, Vincent Delecroix <
>> 20100.delecr...@gmail.com
>>
>>> wrote:
>>>
>>
>> On 07/08/2017 22:53, David Roe wrote:
>>>
>>> On Mon, Aug 7, 2017 at 4:37 PM, Vincent Delecroix <
 20100.delecr...@gmail.com

 wrote:
>
>
 On 07/08/2017 19:47, David Roe wrote:> But I think that Sage

>
> integers should compare the same as python ints
>
>>
>> I agree and with Python 3 you get an error
>>
>
> $ python
> Python 3.6.2 (default, Jul 20 2017, 03:52:27)
> [GCC 7.1.1 20170630] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>
> sorted([1,2,'a'])
>>
>>>
 Traceback (most recent call last):
>>>
>> File "", line 1, in 
> TypeError: '<' not supported between instances of 'str' and 'int'
>
> which is even better.
>
>
> Sure, and I'm fine with that change once we switch to python 3 (or if
 we
 make that change actually true for Sage integers).  But in the mean
 time,
 I
 think that we should keep compatibility between ints and Integers, which
 means adjusting the comparison with strings.

 Which still leaves the second part of Stefan's question: how do we get
 consistent doctest output in contexts where we have been sorting?

 Perhaps the right answer is to add a tag to the doctest framework.
 Something like

 sage: [1,2,'a'] # unordered
 ['a',2,1]


>>> Introducing a new tag is too much pain. You are asking for the order of
>>> something that have no natural order. I would just do
>>>
>>> sage: set(l1) == set(l2)
>>> True
>>>
>>
>>
>> That doesn't work if the entries aren't hashable, and also doesn't show
>> the
>> entries, which can be a problem if you're also trying to document the
>> function for users.
>>
>
> You mean documenting a bad practice!?


 What bad practice are you referring to?  The output of some functions are
lists where the ordering is somewhat unpredictable.  This different
ordering can reveal itself in testing on different platforms, or with a
changed package that Sage depends on.  Yet for a user looking at the
examples of using such a function, it's nicer to see

sage: my_func(inputs) # unordered
[A, C, B]

rather than

sage: set([str(c) for c in my_func(inputs)]) == set(["A","B","C"])
True

David

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

-- 
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] Sorting strings and integers

2017-08-07 Thread Vincent Delecroix

On 07/08/2017 23:11, David Roe wrote:

On Mon, Aug 7, 2017 at 5:03 PM, Vincent Delecroix <20100.delecr...@gmail.com

wrote:



On 07/08/2017 22:53, David Roe wrote:


On Mon, Aug 7, 2017 at 4:37 PM, Vincent Delecroix <
20100.delecr...@gmail.com


wrote:



On 07/08/2017 19:47, David Roe wrote:> But I think that Sage


integers should compare the same as python ints


I agree and with Python 3 you get an error


$ python
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.


sorted([1,2,'a'])



Traceback (most recent call last):

File "", line 1, in 
TypeError: '<' not supported between instances of 'str' and 'int'

which is even better.



Sure, and I'm fine with that change once we switch to python 3 (or if we
make that change actually true for Sage integers).  But in the mean time,
I
think that we should keep compatibility between ints and Integers, which
means adjusting the comparison with strings.

Which still leaves the second part of Stefan's question: how do we get
consistent doctest output in contexts where we have been sorting?

Perhaps the right answer is to add a tag to the doctest framework.
Something like

sage: [1,2,'a'] # unordered
['a',2,1]



Introducing a new tag is too much pain. You are asking for the order of
something that have no natural order. I would just do

sage: set(l1) == set(l2)
True



That doesn't work if the entries aren't hashable, and also doesn't show the
entries, which can be a problem if you're also trying to document the
function for users.


You mean documenting a bad practice!?

--
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] Sorting strings and integers

2017-08-07 Thread David Roe
On Mon, Aug 7, 2017 at 5:03 PM, Vincent Delecroix <20100.delecr...@gmail.com
> wrote:

> On 07/08/2017 22:53, David Roe wrote:
>
>> On Mon, Aug 7, 2017 at 4:37 PM, Vincent Delecroix <
>> 20100.delecr...@gmail.com
>>
>>> wrote:
>>>
>>
>> On 07/08/2017 19:47, David Roe wrote:> But I think that Sage
>>>
>>> integers should compare the same as python ints

 I agree and with Python 3 you get an error
>>>
>>> $ python
>>> Python 3.6.2 (default, Jul 20 2017, 03:52:27)
>>> [GCC 7.1.1 20170630] on linux
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>
 sorted([1,2,'a'])
>>
> Traceback (most recent call last):
>>>File "", line 1, in 
>>> TypeError: '<' not supported between instances of 'str' and 'int'
>>>
>>> which is even better.
>>>
>>>
>> Sure, and I'm fine with that change once we switch to python 3 (or if we
>> make that change actually true for Sage integers).  But in the mean time,
>> I
>> think that we should keep compatibility between ints and Integers, which
>> means adjusting the comparison with strings.
>>
>> Which still leaves the second part of Stefan's question: how do we get
>> consistent doctest output in contexts where we have been sorting?
>>
>> Perhaps the right answer is to add a tag to the doctest framework.
>> Something like
>>
>> sage: [1,2,'a'] # unordered
>> ['a',2,1]
>>
>
> Introducing a new tag is too much pain. You are asking for the order of
> something that have no natural order. I would just do
>
> sage: set(l1) == set(l2)
> True


That doesn't work if the entries aren't hashable, and also doesn't show the
entries, which can be a problem if you're also trying to document the
function for users.
David


>
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sorting strings and integers

2017-08-07 Thread Vincent Delecroix

On 07/08/2017 22:53, David Roe wrote:

On Mon, Aug 7, 2017 at 4:37 PM, Vincent Delecroix <20100.delecr...@gmail.com

wrote:



On 07/08/2017 19:47, David Roe wrote:> But I think that Sage


integers should compare the same as python ints


I agree and with Python 3 you get an error

$ python
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.

sorted([1,2,'a'])

Traceback (most recent call last):
   File "", line 1, in 
TypeError: '<' not supported between instances of 'str' and 'int'

which is even better.



Sure, and I'm fine with that change once we switch to python 3 (or if we
make that change actually true for Sage integers).  But in the mean time, I
think that we should keep compatibility between ints and Integers, which
means adjusting the comparison with strings.

Which still leaves the second part of Stefan's question: how do we get
consistent doctest output in contexts where we have been sorting?

Perhaps the right answer is to add a tag to the doctest framework.
Something like

sage: [1,2,'a'] # unordered
['a',2,1]


Introducing a new tag is too much pain. You are asking for the order of 
something that have no natural order. I would just do


sage: set(l1) == set(l2)
True

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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sorting strings and integers

2017-08-07 Thread David Roe
On Mon, Aug 7, 2017 at 4:37 PM, Vincent Delecroix <20100.delecr...@gmail.com
> wrote:

> On 07/08/2017 19:47, David Roe wrote:> But I think that Sage
>
>> integers should compare the same as python ints
>>
> I agree and with Python 3 you get an error
>
> $ python
> Python 3.6.2 (default, Jul 20 2017, 03:52:27)
> [GCC 7.1.1 20170630] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> sorted([1,2,'a'])
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: '<' not supported between instances of 'str' and 'int'
>
> which is even better.
>

Sure, and I'm fine with that change once we switch to python 3 (or if we
make that change actually true for Sage integers).  But in the mean time, I
think that we should keep compatibility between ints and Integers, which
means adjusting the comparison with strings.

Which still leaves the second part of Stefan's question: how do we get
consistent doctest output in contexts where we have been sorting?

Perhaps the right answer is to add a tag to the doctest framework.
Something like

sage: [1,2,'a'] # unordered
['a',2,1]

would pass tests
David

>
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sorting strings and integers

2017-08-07 Thread Vincent Delecroix

On 07/08/2017 19:47, David Roe wrote:> But I think that Sage

integers should compare the same as python ints

I agree and with Python 3 you get an error

$ python
Python 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> sorted([1,2,'a'])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: '<' not supported between instances of 'str' and 'int'

which is even better.

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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Sorting strings and integers

2017-08-07 Thread David Roe
This does seem to be new.  In Sage 7.2 (just one that I had handy),
sage: sorted([1,2,'a'])
[1, 2, 'a']
sage: sorted([1r,2r,'a'])
[1, 2, 'a']
This isn't that surprising, since the semantics of comparison have been
changing because of the upcoming switch to python 3.  But I think that Sage
integers should compare the same as python ints, so I've opened a ticket
#23590 .
David

On Mon, Aug 7, 2017 at 1:20 PM, Stefan  wrote:

> Is this behavior new? I got it on my MacBook running the latest
> development version. And, more importantly, what is the recommended way of
> writing doctests for functions that return frozen sets with strings and
> integers? In particular in light of Python 3 coming up...
>
>
> sage: sorted([1,2,'a'])
> ['a', 1, 2]
> sage: sorted([int(1),int(2),'a'])
> [1, 2, 'a']
>
>
> --
> 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.
>

-- 
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] python3 (not yet, and not for soon)

2017-08-07 Thread Erik Bray
On Mon, Aug 7, 2017 at 12:45 PM, Jeroen Demeyer  wrote:
> On 2017-08-07 12:00, François Bissey wrote:
>>
>> Looking at this more closely. Why isn’t the “bytes” conversion
>> done earlier - before checking that the file exists.
>
>
> +1
>
> I know that Erik Bray will disagree with this, but I would advocate to use
> "bytes" as much as possible when dealing with filenames.

Yep. Like it or not that is exactly the wrong way to approach things
in Python 3, in *most* cases.  Even more wrong since the addition of
pathlib [1], augmented in Python 3.6 with PEP 519 [2] (as neither str
or bytes are necessarily the ideal types for representing filesystem
paths; this has nothing directly to do with encoding though).

-handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
+lib = bytes(lib, encoding='utf-8')
+handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)

Using `bytes(..., encoding=...)` is possible, of course, but not very
idiomatic for cases like this.  One reason being, as you mentioned, on
Python 2 `bytes = str` so this construction is not good for
cross-compatible code.  Much more idiomatic is to simply use
`lib.encode(...)`.

It's also bad to hard-code utf-8.  For encoding filenames it's safer
to use `sys.getfilesystemencoding()`. In certain pathological cases
this won't be correct, but in those cases neither usually will utf-8
be correct (though that scenario isn't impossible either).

I'll also add that this wouldn't even be an issue except for the fact
that dlopen is being called through Cython.  Most Python stdlib
interfaces are str/bytes agnostic for filenames and will do this
conversion automatically.  But in general the conversion should only
be done before interfacing with system calls, and generally no sooner
unless it's going to be used frequently for some reason.

Best,
Erik


[1] https://www.python.org/dev/peps/pep-0428
[2] https://www.python.org/dev/peps/pep-0519
[3] https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding

-- 
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] Sorting strings and integers

2017-08-07 Thread Stefan
Is this behavior new? I got it on my MacBook running the latest development 
version. And, more importantly, what is the recommended way of writing 
doctests for functions that return frozen sets with strings and integers? 
In particular in light of Python 3 coming up...


sage: sorted([1,2,'a']) 
['a', 1, 2] 
sage: sorted([int(1),int(2),'a']) 
[1, 2, 'a']


-- 
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: Sage 8.0 released (desire binary for OSX 10.11.6)

2017-08-07 Thread Bruce

On Sunday, August 6, 2017 at 3:40:07 PM UTC-7, Volker Braun wrote:
>
> Binaries for OSX 10.12.6 are at 
> http://files.sagemath.org/osx/intel/index.html
>
> May also work on older versions of OSX, but I have no way of testing
>


I just tested it.
The OSX 10.12.6 binary does not work on OSX 10.11.6

I'm cross posting to sage-devel where there may be someone who has a 
working binary for El Capitan sage-8.0-OSX_10.11.6-x86_64

Thanks,

-Bruce




[serpent:active/sage/SageMath] 12% ./sage

/Volumes/ssdt1/Users/bic/active/sage/SageMath/src/bin/sage-env: line 428: 
42098 Trace/BPT trap: 5   "$SAGE_LOCAL/bin/python" -c 'import 
pkg_resources; pkg_resources.get_distribution("matplotlib").version' 2> 
/dev/null

┌┐

│ SageMath version 8.0, Release Date: 2017-07-21 │

│ Type "notebook()" for the browser-based notebook interface.│

│ Type "help()" for help.│

└┘

dyld: lazy symbol binding failed: Symbol not found: _getentropy

  Referenced from: 
/Volumes/ssdt1/Users/bic/active/sage/SageMath/local/lib/libpython2.7.dylib

  Expected in: /usr/lib/libSystem.B.dylib


dyld: Symbol not found: _getentropy

  Referenced from: 
/Volumes/ssdt1/Users/bic/active/sage/SageMath/local/lib/libpython2.7.dylib

  Expected in: /usr/lib/libSystem.B.dylib


Trace/BPT trap

[serpent:active/sage/SageMath] 13% 



 

>
>
>
>
> On Sunday, August 6, 2017 at 10:33:05 PM UTC+2, Bruce wrote:
>>
>> Hi Volker,
>>
>> Thanks for all your work.   Could you (or someone with a Mac running 
>> MacOS X 11.6) upload a binary for SageMath 8.0.  
>>
>> Thanks,
>>
>> -Bruce
>>
>> On Monday, July 24, 2017 at 10:01:53 AM UTC-7, Volker Braun wrote:
>>>
>>> Binaries can now be found at http://www.sagemath.org/download.html
>>>
>>> Note: Debian 7 now fails to build with SAGE_FAT_BINARY because the 
>>> linker is too old. Debian 9 64-bit also failed with 
>>> https://trac.sagemath.org/ticket/23519
>>>
>>> The Sage 8.0 virtual appliance can now be found at 
>>> http://files.sagemath.org/win/index.html
>>>
>>

-- 
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] Possible Cython bug

2017-08-07 Thread Jeroen Demeyer

The simplest workaround is to use F[i] instead of F[i]

--
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] Possible Cython bug

2017-08-07 Thread Jeroen Demeyer

See https://github.com/cython/cython/issues/1807

--
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] Possible Cython bug

2017-08-07 Thread Jeroen Demeyer

It is a Cython bug.

Most simple example:

sage: %%cython
: def get(obj, int i):
: return obj[i]

sage: class D(dict): pass
sage: d = D([(-1, "hello")]); d
{-1: 'hello'}
sage: get(d, -1)
...
KeyError: 0
sage: d[-1]
'hello'

--
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] python3 (not yet, and not for soon)

2017-08-07 Thread Frédéric Chapoton
The core-dumped is supposed to be fixed by the pynac upgrading 
ticket https://trac.sagemath.org/ticket/23325 . So it does not require any 
further work hopefuly.

Le lundi 7 août 2017 11:54:14 UTC+2, Erik Bray a écrit :
>
> Hi Frédéric, all, 
>
> Regarding 
>
> > * There remains to make a proper python3 install setup, in order to make 
> it 
> > easier to debug. Currently, "make" with "SAGE_PYTHON3=yes" always 
> rebuilds 
> > everything, which is *very annoying*. Happily, using only "sage -b" take 
> > much less time. For instance, an access to ipython3 inside a 
> python3-build 
> > sage would be helpful. 
>
> I'm working on a better solution to this as part of a more general 
> reworking of how Sage's dist handles dependencies that can be 
> fulfilled by multiple packages (in this case the dependency being 
> 'python'--specifically the Python used for Sage itself).  I have a 
> prototype at [1] but there are several things about it I'm unhappy 
> with, and I want to redo it on top of some even lower-level overhauls 
> I'm working on (e.g. [2]). 
>
> Point being, instead of `SAGE_PYTHON3=yes` one would select the Python 
> they want to use at `./configure` time.  `./configure` can be re-run 
> to change the Python version to use too.  This requires anything that 
> depends on python to be rebuilt which is still quite a bit, but not 
> *everything*.  This is not something one would normally do frequently, 
> however. 
>
> I'm not sure what else you have in mind though 
>
> > * using public/ugly_python3 and severl other tweaks, I have reached the 
> > point where the failure is a core-dumped. I am not able to debug that, 
> so it 
> > would take somebody else to have a look. I can provide a branch on 
> demand. I 
> > copy the failure at the end of this message. 
>
> I will take a look.  Should I just check out that branch...? 
>
> Thanks, 
> Erik 
>
> [1] https://trac.sagemath.org/ticket/23465 
> [2] https://trac.sagemath.org/ticket/21524 
>

-- 
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] python3 (not yet, and not for soon)

2017-08-07 Thread Jeroen Demeyer

On 2017-08-07 12:00, François Bissey wrote:

Looking at this more closely. Why isn’t the “bytes” conversion
done earlier - before checking that the file exists.


+1

I know that Erik Bray will disagree with this, but I would advocate to 
use "bytes" as much as possible when dealing with filenames.


--
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: Possible Cython bug

2017-08-07 Thread Jeroen Demeyer

On 2017-08-04 10:49, Vincent Delecroix wrote:

Indeed, this is a subtle issue

Cython thinks that F is a sequence because Family does support the
sequence protocol (this is lost somewhere in the macro
__Pyx_GetItemInt). As a consequence, Cython translates a negative index
"-i" into "len(sequence) - i". Which is indeed wrong in the above
case... Cython should have called PyObject_GetItem.


I can try to write a Cython bug report if nobody has done that already.

--
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] python3 (not yet, and not for soon)

2017-08-07 Thread 'Julien Puydt' via sage-devel
Hi,

Le 07/08/2017 à 11:54, Erik Bray a écrit :

> I'm working on a better solution to this as part of a more general
> reworking of how Sage's dist handles dependencies that can be
> fulfilled by multiple packages (in this case the dependency being
> 'python'--specifically the Python used for Sage itself).  I have a
> prototype at [1] but there are several things about it I'm unhappy
> with, and I want to redo it on top of some even lower-level overhauls
> I'm working on (e.g. [2]).

I would like to make the point that having a packaging which is :
- versioned ;
- with dependency resolution ;
- including virtual packages ;
is definitely a sage-as-a-distribution problem.

Please take into account that sage-as-a-software should be kept easily
package-able by other distributions.

Snark on #sagemath

-- 
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] python3 (not yet, and not for soon)

2017-08-07 Thread François Bissey
Looking at this more closely. Why isn’t the “bytes” conversion
done earlier - before checking that the file exists. Is there
a reason why the string is converted before dl-opening the library?


> On 7/08/2017, at 18:51, François Bissey  wrote:
> 
>> On 7/08/2017, at 18:23, Frédéric Chapoton  wrote:
>> 
>> Thanks ! Could you make a ticket for this change to singular, please ?
>> 
> 
> Sure will do.

-- 
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] python3 (not yet, and not for soon)

2017-08-07 Thread Erik Bray
Hi Frédéric, all,

Regarding

> * There remains to make a proper python3 install setup, in order to make it
> easier to debug. Currently, "make" with "SAGE_PYTHON3=yes" always rebuilds
> everything, which is *very annoying*. Happily, using only "sage -b" take
> much less time. For instance, an access to ipython3 inside a python3-build
> sage would be helpful.

I'm working on a better solution to this as part of a more general
reworking of how Sage's dist handles dependencies that can be
fulfilled by multiple packages (in this case the dependency being
'python'--specifically the Python used for Sage itself).  I have a
prototype at [1] but there are several things about it I'm unhappy
with, and I want to redo it on top of some even lower-level overhauls
I'm working on (e.g. [2]).

Point being, instead of `SAGE_PYTHON3=yes` one would select the Python
they want to use at `./configure` time.  `./configure` can be re-run
to change the Python version to use too.  This requires anything that
depends on python to be rebuilt which is still quite a bit, but not
*everything*.  This is not something one would normally do frequently,
however.

I'm not sure what else you have in mind though

> * using public/ugly_python3 and severl other tweaks, I have reached the
> point where the failure is a core-dumped. I am not able to debug that, so it
> would take somebody else to have a look. I can provide a branch on demand. I
> copy the failure at the end of this message.

I will take a look.  Should I just check out that branch...?

Thanks,
Erik

[1] https://trac.sagemath.org/ticket/23465
[2] https://trac.sagemath.org/ticket/21524

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