Re: [sage-devel] Sage Installation on Mac: no app.dmg on mirrors

2021-05-27 Thread Daniel Krenn


vdelecroix schrieb am Donnerstag, 27. Mai 2021 um 09:31:01 UTC+2:

> As written in the documentation at 
> https://doc.sagemath.org/html/en/installation/binary.html#macos dmg are 
> available at 
> https://github.com/3-manifolds/Sage_macOS/releases/


Thanks. FWIW, this differs from 
https://doc.sagemath.org/html/en/installation/binary.html#download-guide
where it says to go to the download section and choose a mirror.

Daniel



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/7fc3ddb2-d8c9-4ce1-a33e-cd2cf566f6dbn%40googlegroups.com.


[sage-devel] Sage Installation on Mac: no app.dmg on mirrors

2021-05-27 Thread Daniel Krenn
I was just asked by a colleague why there is no .dmg or app.dmg file on the 
mirrors, like on  
http://www-ftp.lip6.fr/pub/math/sagemath/osx/intel/index.html ? Is this 
simply (still) missing (as not built yet) or is there a reason? (FWIW 
Installation guide still speaks about these files.)

Best, Daniel

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d1738ea0-c949-46aa-bf27-6063c41fef6en%40googlegroups.com.


[sage-devel] Re: Trac account request

2020-05-05 Thread Daniel Krenn


Am Dienstag, 5. Mai 2020 11:15:43 UTC+2 schrieb Jean-Florent Raymond:
>
> Could someone create a proper trac account for me? Desired username: 
> jfraymond. 
>

Done.


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/907082b5-4f40-4d37-a7d9-3d5819799827%40googlegroups.com.


[sage-devel] subs bug in fraction field (critical)

2019-06-04 Thread Daniel Krenn
I believe I have found a very serious issue in fraction field
substitution, see
  https://trac.sagemath.org/ticket/27933
I find this very critical, so we should try to fix it soon...

Best, Daniel

PS: I just spent two days of debugging my computations just to narrow it
down to such an unexpected behavior.so my sense of criticalness
might come from that, but still it is there and very serious.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d1936a8e-f308-60e4-546a-75e31a0748aa%40aon.at.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] testing for equality in new ring

2019-06-02 Thread Daniel Krenn
I have implemented a new ring (parent/element structure) and now want to
do equality testing. I use the code below, which seems to me somehow
canonical for rings and equality testing (using coercions properly).
For short, the difference between self and other is built and then
compared for zero.
Note that there is no meaningful _lt_ etc. in this ring, so I am not
sure if richcmp is to be used here (but I just might be too unskilled
with richcmp).

What is the "best way" to do so? Are there any Sage-built-in shortcuts?

ad shortcuts: for richcmp there is
sage.structure.richcmp.richcmp_by_eq_and_lt.

Best,

Daniel

Here the relevant code of the element:

def __bool__(self):
return bool(self.polynomial) or bool(self.rhs)

__nonzero__ = __bool__

def __eq__(self, other):
if other is None:
return False
try:
return not bool(self - other)
except (TypeError, ValueError):
return False

def __ne__(self, other):
return not self == other

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/cb7cf934-747d-9f41-0f4e-62a4f9e1a3cf%40aon.at.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Factoring bug in Pari stack

2019-05-06 Thread Daniel Krenn
On 06.05.19 10:37, David Roe wrote:
> I've run across a strange bug that seems to be hardware dependent: 

I can reproduce the error on both systems that I've just checked:
  Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (Laptop)
  Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz (Desktop)
Both run Linux Mint 19. Both with SageMath >=8.7. Could not reproduce it
with 8.6 (on the i5) and with 8.4 (on the i7) (which I still had available).

Best, Daniel

-- 
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] patchbot questions

2019-04-26 Thread Daniel Krenn
On 24.04.19 22:16, John H Palmieri wrote:
> 
> 
> On Tuesday, April 23, 2019 at 12:18:13 AM UTC-7, Daniel Krenn wrote:
> 
> On 23.04.19 01:37, John H Palmieri wrote:
> > I was running a patchbot successfully until some time last week. For
> > reasons I don't understand, I did "git pull" on the patchbot, and
> now it
> > won't run with Python 2, complaining
> 
> AFAIK, the patchbot runs on Python 3 only (so, yes, you need this
> installed with the proper packages).
> 
> 
> Okay, thanks. The top-level README files should then say to use
> 
>    python3 -m sage_patchbot.patchbot --sage-root=XXX [other options]

I've just added, at least, two examples on the patchbot wiki page

https://wiki.sagemath.org/patchbot#Example_Configuration_and_Run-Scripts

-- 
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] patchbot questions

2019-04-23 Thread Daniel Krenn
On 23.04.19 01:37, John H Palmieri wrote:
> I was running a patchbot successfully until some time last week. For
> reasons I don't understand, I did "git pull" on the patchbot, and now it
> won't run with Python 2, complaining

AFAIK, the patchbot runs on Python 3 only (so, yes, you need this
installed with the proper packages).

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

2019-04-18 Thread Daniel Krenn
On 17.04.19 16:00, E. Madison Bray wrote:
> On Wed, Apr 17, 2019 at 3:06 PM Daniel Krenn  wrote:
>>
>> Is it possible to set up a patchbot for running tests of SageMath on
>> Python3?
> 
> Yes, I believe so. Frédéric would know the specifics since I think he
> made it work.  According to the docs you have to put
> 
> "tested_files": "py3"
> 
> in the patchbot config file (see
> https://wiki.sagemath.org/patchbot#Configuration)
> 
> But one would also have to ensure that sage is configure with
> `--with-python=3` when doing builds, and I'm not exactly sure how best
> to force the patchbot to do that.  Certainly one way would be to
> export the non-obvious environment variable
> 
> export PREREQ_OPTIONS="--with-python=3"
> 
> as that is passed to `./configure` by the main Makefile.

Ok, thank you. I've set something up which is testing its base right
now. So let's see if this works out :)

-- 
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] python3 patchbot

2019-04-17 Thread Daniel Krenn
Is it possible to set up a patchbot for running tests of SageMath on
Python3?

-- 
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: frozensets in doctests / for display in Python3

2019-04-16 Thread Daniel Krenn
On 16.04.19 17:26, Nils Bruin wrote:
> Do you want to test that you get *that* string representation back?
> Or do you want to check that you are getting string representations of
> that shape, but with possibly differently order frozensets?
> Or do you want to check that you get a list back with transitions that
> have certain properties?
> 
> Unless this is about the `repr` method, I expect that you don't actually
> care about the string reps. Can you just explicitly construct the list
> of transitions that you want to compare with and then use comparison on
> actual, meaningful objects? Or perhaps you can just test the transitions
> in the list to have the desired properties? I guess they're maps, so you
> could test some of the images of known inputs.

No, it is not about the repr method, but that is one typical output of a
doctest. It can be read quite easily, so one can check it mathematically
and understand what happens (after all its in the documentation). But
the doctests should pass as well and testing such an output is one major
feature of our doctesting. So I certainly want to keep it that way (and
this discussion is not new). There have been attempts to stabilize the
displayed output before...

-- 
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] gitlab status?

2019-04-16 Thread Daniel Krenn
On 16.04.19 14:04, E. Madison Bray wrote:
> So if anyone wants to contribute hardware to work as runners, I can
> walk them through the setup process now that I've done it myself.
> It's quite easy for the most part.

I can set-up one. FYI, I have once created a runner for a different
(local) gitlab project; so creating another one should somehow work out.
What are the SageMath specific issues? (I guess, this is not written
down somewhere yet...)

-- 
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: frozensets in doctests / for display in Python3

2019-04-16 Thread Daniel Krenn
On 16.04.19 16:56, John H Palmieri wrote:
> Is the printed order important? If not, you can change the doctest to
> something else that is actually testing something relevant [...]

Changing the doctest really an option here, as we want to see the
transistions of the automaton which are display like this:

[Transition from frozenset({frozenset({'B', 'C'}),
frozenset({'A', 'C'}),
frozenset({'A', 'B', 'C'})})
to frozenset({frozenset({'C'}),
  frozenset({'B', 'C'}),
  frozenset({'A', 'C'}),
  frozenset({'A', 'B', 'C'})}):
0|-,
 Transition from frozenset({frozenset({'B', 'C'}),
frozenset({'A', 'C'}),
frozenset({'A', 'B', 'C'})})
to frozenset({frozenset({'B', 'C'}),
  frozenset({'A', 'C'}),
  frozenset({'A', 'B', 'C'})}):
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] frozensets in doctests / for display in Python3

2019-04-16 Thread Daniel Krenn
On 16.04.19 16:59, E. Madison Bray wrote:
> On Tue, Apr 16, 2019 at 4:43 PM Daniel Krenn  wrote:
>> sage: from IPython.lib.pretty import pretty
>> sage: pretty(frozenset([frozenset(['A', 'B']), frozenset(['B', 'C'])]))
>>
>> displays the set of sets with random order. How to deal with this?
> Yes, for sets of sets it's still an open question how to deal with
> them, since there's obviously no one correct way to order them.

There is some kind of sorting with ``pretty``:
https://github.com/ipython/ipython/blob/master/IPython/lib/pretty.py#L124

However, this does not seem to be used with frozensets (but I did not
study the code very carefully, how pretty printing works). It seems that
they try sorting and if it fails use the string representations as keys.
(which would work fine in this particular situation).

-- 
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] frozensets in doctests / for display in Python3

2019-04-16 Thread Daniel Krenn
In Python2-SageMath we have

sage: frozenset([frozenset(['A', 'B']), frozenset(['B', 'C'])])
frozenset({frozenset({'B', 'C'}), frozenset({'A', 'B'})})

in all my trials, whereas in Python3 we get all possible permutations of
the elements at random.

Even using

sage: from IPython.lib.pretty import pretty
sage: pretty(frozenset([frozenset(['A', 'B']), frozenset(['B', 'C'])]))

displays the set of sets with random order. How to deal with this?

Background: This comes from a doctest in
sage.combinat.finite_state_machine, where this is a label of a state
after some minimization etc.

Best, Daniel

-- 
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] gitlab status?

2019-04-16 Thread Daniel Krenn
Some time ago there was an attempt to use additionally Gitlab for our
development process. What is the current status of this?

(Back then, I (@dakrenn) asked to be included as user, so that I can
contribute/test as well, as I frequently use Gitlab for many other
projects.)

Best, Daniel

-- 
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] No reponse to account request

2019-04-02 Thread Daniel Krenn
On 02.04.19 00:55, Dima Pasechnik wrote:
> it can take some time, as it's done manually by volunteers...

So apparently more volunteers are needed; I could be one of them...

If so, who would need what from me to make this happend?

Daniel

-- 
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] SystemError: calling remove_from_pari_stack() inside sig_on()

2019-04-01 Thread Daniel Krenn
On 30.03.19 09:23, Jeroen Demeyer wrote:
> See https://trac.sagemath.org/ticket/27477

Thanks.

-- 
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] SystemError: calling remove_from_pari_stack() inside sig_on()

2019-03-30 Thread Daniel Krenn
I've recently seen a couple of random doctest failures, see below.
Anyone some ideas?


File "src/sage/rings/number_field/number_field.py", line 1288, in
sage.rings.number_field.number_field.NumberField_generic
Failed example:
for chi in G:
D = ModularSymbols(chi, 2,
-1).cuspidal_subspace().new_subspace().decomposition()
for f in D:
elt = f.q_eigenform(10, 'alpha')[3]
assert elt.is_integral()
Exception raised:
Traceback (most recent call last):
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py",
line 671, in _run
self.compile_and_execute(example, compiler, test.globs)
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py",
line 1095, in compile_and_execute
exec(compiled, globs)
  File "", line 4,
in 
elt = f.q_eigenform(Integer(10), 'alpha')[Integer(3)]
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/modular/modsym/space.py",
line 1263, in q_eigenform
ext = [self.eigenvalue(n, names) for n in range(f.prec(),prec)]
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/modular/hecke/module.py",
line 1304, in eigenvalue
Tn_e = self._eigen_nonzero_element(n)
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/modular/hecke/module.py",
line 635, in _eigen_nonzero_element
return A._hecke_image_of_ith_basis_vector(n, i)
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/modular/hecke/module.py",
line 650, in _hecke_image_of_ith_basis_vector
return T.apply_sparse(self.gen(i))
  File
"/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage/modular/modsym/hecke_operator.py",
line 72, in apply_sparse
return M(v.parent()((W * R).row(0)))
  File "sage/structure/element.pyx", line 3697, in
sage.structure.element.Matrix.__mul__
(build/cythonized/sage/structure/element.c:22653)
return coercion_model.bin_op(left, right, mul)
  File "sage/structure/coerce.pyx", line 1156, in
sage.structure.coerce.CoercionModel.bin_op
(build/cythonized/sage/structure/coerce.c:9988)
return (action)._act_(x, y)
  File "sage/matrix/action.pyx", line 260, in
sage.matrix.action.MatrixMatrixAction._act_
(build/cythonized/sage/matrix/action.c:4612)
prod = A._matrix_times_matrix_(B)
  File "sage/matrix/matrix0.pyx", line 5213, in
sage.matrix.matrix0.Matrix._matrix_times_matrix_
(build/cythonized/sage/matrix/matrix0.c:35078)
return self._multiply_classical(right)
  File "sage/matrix/matrix_sparse.pyx", line 193, in
sage.matrix.matrix_sparse.Matrix_sparse._multiply_classical
(build/cythonized/sage/matrix/matrix_sparse.c:3856)
sig_on()
SystemError: calling remove_from_pari_stack() inside sig_on()

-- 
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] Patchbot steenrod troubles

2019-03-29 Thread Daniel Krenn
However is in charge of it, take a look...


-- 
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] how to log sage output for long running program

2019-03-18 Thread Daniel Krenn
On 16.03.19 05:46, Ai Bo wrote:
> I am running a long running program. I would like to log the output.
> I have tried: 
>  ../sage-8.6/sage test.sage > test.log &

I used something along

  PYTHONUNBUFFERED=whatever ../sage-8.6/sage test.sage > test.log &

a couple of times.

Daniel

-- 
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: efficiency in creating multivariate polynomial rings [Re: [sage-devel] problem with scalar multiplication: polynomial and vector]

2019-03-08 Thread Daniel Krenn
On 01.03.19 03:59, Travis Scrimshaw wrote:> IMO we do not want there to
be too much of a distinction between
> multivariate polynomial rings in 1 variable and univariate
> polynomial rings. I would say the proper thing to do is to pass along
> the underlying implementation as part of the MPoly functor (which is
> what you proposed change is secretly doing).

Somehow. There is still a distinction between the Poly and the MPoly
functor.

> Although I don't currently see why this change leads to such a
> slowdown, but my guess is it is just taking a lot longer to do the
> coercion (checks). I would have to look into this in more detail than
> I have the time right now.

This would also be my guess, but not sure what can be done against that
(or how to find this).

Daniel

-- 
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] fix or not? [Re: efficiency in creating multivariate polynomial rings]

2019-03-08 Thread Daniel Krenn
The question remains: Do we want the change proposed in
  https://trac.sagemath.org/ticket/27364
fixing the mentioned issue (but introducing a slowdown) or not?

(I somehow tend to say "we want that", because the change obviously
fixes a bug. (It seems natural that the MPoly functor returns a MPoly
ring in all cases and that

>             sage: T = PolynomialRing(QQ, 't', 1); t = T.gen(); T
>             sage: F, R = T.construction()
>             sage: F(R) is T
>             True

is satisfied.

Daniel

-- 
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: efficiency in creating multivariate polynomial rings [Re: [sage-devel] problem with scalar multiplication: polynomial and vector]

2019-03-08 Thread Daniel Krenn
On 01.03.19 03:59, Travis Scrimshaw wrote:> IMO we do not want there to
be too much of a distinction between
> multivariate polynomial rings in 1 variable and univariate
> polynomial rings. I would say the proper thing to do is to pass along
> the underlying implementation as part of the MPoly functor (which is
> what you proposed change is secretly doing).

Somehow. There is still a distinction between the Poly and the MPoly
functor.

> Although I don't currently see why this change leads to such a
> slowdown, but my guess is it is just taking a lot longer to do the 
> coercion (checks). I would have to look into this in more detail than
> I have the time right now.

This would also be my guess, but not sure what can be done against that
(or how to find this).

Daniel

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


efficiency in creating multivariate polynomial rings [Re: [sage-devel] problem with scalar multiplication: polynomial and vector]

2019-02-28 Thread Daniel Krenn
On 28.02.19 09:15, Daniel Krenn wrote:
> Does someone have a glue why
> 
>   sage: T = PolynomialRing(QQ, 't', 1); t = T.gen()
>   sage: t * vector([1,2])

The underlying problem is that the functor MPoly[t] applied to QQ (for
example) returns a true univariate polynomial ring instead of a
multivariate polynomial ring in 1 variable. I believe it shouldn't, also
because we want

sage: T = PolynomialRing(QQ, 't', 1); t = T.gen(); T
sage: F, R = T.construction()
sage: F(R) is T
True

right?

Now the fix for the above is simple. However, a new problem arises:

sage: R = PolynomialRing(ZZ, 'x', 500)
sage: S = PolynomialRing(GF(5), 'x', 200)
sage: R.gen(0) + S.gen(0)

The last line takes a second or so in current SageMath, but ages (I've
interrupted after two minutes) with the change above. RunSnakeRun says
that most of the time is spent in

  method '_coerce_' of 'sage.structure.parent_old.Parent'

This is also not what we'd like. So what should we do now?

Input of any kind is very much appreciated.

Daniel

-- 
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] problem with scalar multiplication: polynomial and vector

2019-02-28 Thread Daniel Krenn
On 28.02.19 09:15, Daniel Krenn wrote:
> I tried to debug, but I am a bit lost on this particalar problem, so any
> kind of input is welcome.

Found something; I'll report back soon.

-- 
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] problem with scalar multiplication: polynomial and vector

2019-02-28 Thread Daniel Krenn
Does someone have a glue why

  sage: T = PolynomialRing(QQ, 't', 1); t = T.gen()
  sage: t * vector([1,2])

results in an error

  TypeError: unsupported operand parent(s) for *: 'Multivariate
  Polynomial Ring in t over Rational Field' and 'Ambient free module of
  rank 2 over the principal ideal domain Integer Ring'

but

  sage: S = PolynomialRing(QQ, 's', 2); s0 = S.gen()
  sage: s0 * vector([1,2])
  (s0, 2*s0)

not? I mean both are multivariate polynomial rings, so I do not see why
there is a distinction.

I tried to debug, but I am a bit lost on this particalar problem, so any
kind of input is welcome.

This can also be found at https://trac.sagemath.org/ticket/27364

Best,

Daniel

-- 
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] .an_element() != 0?

2019-02-27 Thread Daniel Krenn
Can I savely assume that S.an_element() of something S (within SageMath)
returns an element different from S.zero() if possible (meaning if there
are nonzero elements in 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] groebner basis algorithm: intended way of calling (out of other method)

2019-02-08 Thread Daniel Krenn
Let I be an ideal. Then I might want to compute something involving
Groebner basis, e.g. computing I.variety().
Now suppose one wants to select a particular algorithm for the
computation of the Groebner basis. Then (due to caching) I use something
along the lines of

  GB = I.groebner_basis(algorithm='libsingular:slimgb')
  I.groebner_basis.set_cache(GB)
  I.variety()

Is this the intended way of doing so?

(It somehow feels wrong that one needs quite some background on the
implementation and technical understanding (caching in SageMath) to
understand the behavior.)

Details: A method using a Groebner basis calls self.groebner_basis(),
i.e. uses default arguments or whatever is cached.

-- 
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: python3 status report

2019-01-29 Thread Daniel Krenn
On 2019-01-27 14:50, Simon King wrote:
> How to do so most easily, so that "git pull" etc. still referes to trac?
> That was part of my question. Doing "git pull
> /path/to/my/old/installation" would mean that I need to go to my old
> installation, "git pull" (pulls develop from trac), go to the new
> installation, and to "git pull" again (pulling develop from my old
> installation, but NOT directly from trac).

I use `git worktree` a lot and might be helpful for you as well

-- 
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: Graph theory: neighbors of a nonexistent vertex

2019-01-07 Thread Daniel Krenn
On 2019-01-07 12:34, Jean-Florent Raymond wrote:
> I think I know how to fix it. Should I open a trac ticket?

Yes, please. (And do a quick search on trac before so that noone else
has created a ticket for this, but I doubt it.)

Daniel

-- 
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: how to use a singular lib

2018-11-23 Thread Daniel Krenn
On 2018-11-23 20:49, Simon King wrote:
> Hi Daniel,
> 
> On 2018-11-23, Daniel Krenn  wrote:
>> Singular is shipped with symodstd.lib (it contains an algorithm for
>> computing a Groebner basis in a special case).
>> How can I access it from within Sage?
>>
>> I looked up the code and coming from an ideal's groebner_basis method,
>> it is somehow clear how to extend this, but how do I make the actual
>> call to one of the library's functions? (I seems just straight forward
>> to call something in Singular's standard library.)
>>
>> Is there any code that calls some function from a Singular-library that
>> I can look up?
> 
> How do you plan to use singular? Via pexpect or via libsingular?

No idea; my first plan was to extend the existing groebner-basis code to
accept a new algorithm, namely the one from symodstd.
At the moment it seems that libsingular provides the functionality to do
some experimenting, which is fine :)

Thanks

Daniel

-- 
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: how to use a singular lib

2018-11-23 Thread Daniel Krenn
On 2018-11-23 21:18, 'Martin R. Albrecht' via sage-devel wrote:
> Indeed, this should work:
> 
> _ = sage.libs.singular.function.lib("symodstd.lib")
> syModStd = sage.libs.singular.function.singular_function("syModStd")

Oh, this is easy. Thanks :)

-- 
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] how to use a singular lib

2018-11-23 Thread Daniel Krenn
Singular is shipped with symodstd.lib (it contains an algorithm for
computing a Groebner basis in a special case).
How can I access it from within Sage?

I looked up the code and coming from an ideal's groebner_basis method,
it is somehow clear how to extend this, but how do I make the actual
call to one of the library's functions? (I seems just straight forward
to call something in Singular's standard library.)

Is there any code that calls some function from a Singular-library that
I can look up?

Best

Daniel

-- 
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] deterministic "ordering" of subsets (py3)

2018-11-08 Thread Daniel Krenn
On 2018-11-08 08:08, Vincent Delecroix wrote:
> Python 3 introduced randomness in their base hashing functions. That
> impact strings.
> 
> $ python -c 'print(hash("hello Daniel!"))'
> -4203807413548925149
> $ python -c 'print(hash("hello Daniel!"))'
> 7756578277334792321

I wasn't aware of this, thank you for letting me know.

Daniel

-- 
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] deterministic "ordering" of subsets (py3)

2018-11-06 Thread Daniel Krenn
I just was hunting a Heisenbug related to Python3. It boils down to the
following:

dakrenn@nops:~$ /opt/sage/8.5.beta2-python3/sage -c "P. = QQ[]; S
= Set([x,y,z]).subsets(2); print(S); print(list(S))"
Subsets of {y, x, z} of size 2
[{x, y}, {z, y}, {z, x}]
dakrenn@nops:~$ /opt/sage/8.5.beta2-python3/sage -c "P. = QQ[]; S
= Set([x,y,z]).subsets(2); print(S); print(list(S))"
Subsets of {z, x, y} of size 2
[{z, x}, {z, y}, {x, y}]
dakrenn@nops:~$ /opt/sage/8.5.beta2-python3/sage -c "P. = QQ[]; S
= Set([x,y,z]).subsets(2); print(S); print(list(S))"
Subsets of {y, x, z} of size 2
[{y, x}, {y, z}, {x, z}]

So the order in which the subsets appear is random (and also the order
in the sets). I was wondering why this order is *now* (Python3) random,
but was not before:

dakrenn@nops:~$ sage -c "P. = QQ[]; S = Set([x,y,z]).subsets(2);
print(S); print(list(S))"
Subsets of {y, z, x} of size 2
[{y, z}, {y, x}, {z, x}]

The result in Python2-SageMath was the same for roughly 10 runs (for
Python3 above, three runs three different results).

(My question is also because there is an order on the elements
themselves, namely z < y < x. And I am aware that sets are unordered so
ordering is not to be expected, but still there is this change and I was
wondering why (as the elements themselves are still comparable in
Python3-SageMath.)

Daniel

-- 
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] Upcoming Debian freeze

2018-11-06 Thread Daniel Krenn
On 2018-11-06 10:04, Frédéric Chapoton wrote:
> ("round,ceil,floor in python semantics"

I am curious: What is this about?

Daniel

-- 
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] _l_action_ and _r_action_ not working?

2018-10-30 Thread Daniel Krenn
Do _l_action_ and _r_action_ actually work?

We have the following occurrences:

dakrenn@nops:~$ sage -grep "_l_action_"
sage/rings/multi_power_series_ring_element.py:#return
self._l_action_(c)
sage/rings/multi_power_series_ring_element.py:def _l_action_(self, c):
sage/rings/multi_power_series_ring_element.py:sage: g =
f._l_action_(1/2); g
dakrenn@nops:~$ sage -grep "_r_action_"
sage/rings/multi_power_series_ring_element.py:#def _r_action_(self, c):

And inserting a print into the above's _l_action_ makes only one doctest
fail, namely the one which explicitly calls this method.

I ask, because I need this kind of behavior and [1] suggests to
implement these methods.

Best

Daniel


[1]
http://doc.sagemath.org/html/en/reference/coercion/index.html#methods-to-implement

-- 
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: sage Python3 build: sagenb problem

2018-10-30 Thread Daniel Krenn
On 2018-10-30 14:44, Dima Pasechnik wrote:
> If you insist of building sagenb on python3 (where it's broken)
> then one should not build its docs there
> (docbuilding of sagenb on python3 is known to be broken)

I do not need sagenb nor docs at all. I simply want a SageMath on
Python3 to see the failing doctests in sage.rings.asymptotic and to play
around with these.

Is there a way to exclude this from the build?

Daniel

> On Tue, Oct 30, 2018 at 2:35 PM Daniel Krenn  wrote:
>>
>> On 2018-10-30 13:47, Eric Gourgoulhon wrote:
>>> I had the same problem this morning, while performing the python3 build
>>> of Sage 8.5.beta1:
>>> [sagenb-1.1.0] Error installing package sagenb-1.1.0
>>> The command was
>>> MAKE="make -j8" make build
>>> Running it a second time lead to a successful build though...
>>
>> Tried again, but still get the same error (both with build in parallel
>> and single threaded)
>>
>> Daniel
>>
>> --
>> 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] Re: sage Python3 build: sagenb problem

2018-10-30 Thread Daniel Krenn
On 2018-10-30 13:47, Eric Gourgoulhon wrote:
> I had the same problem this morning, while performing the python3 build
> of Sage 8.5.beta1:
> [sagenb-1.1.0] Error installing package sagenb-1.1.0 
> The command was
> MAKE="make -j8" make build
> Running it a second time lead to a successful build though...

Tried again, but still get the same error (both with build in parallel
and single threaded)

Daniel

-- 
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 Python3 build: sagenb problem

2018-10-30 Thread Daniel Krenn
I tried to build Sage with Python3 via

make configure
./configure --with-python=3
make build

(fresh clone of 8.5.beta1)
as announced on https://wiki.sagemath.org/Python3-compatible%20code
but it failed building its docs. From what I read, building the docs
does still not work (part of the log below). My question is, how to
compile it "correctly"?

FYI, I do not recall what I did about two month ago (probably the same),
but it was "easy" to compile without any errors.

Best wishes

Daniel


[sagenb-1.1.0] reading sources... [ 73%] notebook/notebook
[sagenb-1.1.0] WARNING: autodoc: failed to import module
'sagenb.misc.introspect'; the following exception was raised:
[sagenb-1.1.0] Traceback (most recent call last):
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py",
line 152, in import_module
[sagenb-1.1.0] __import__(modname)
[sagenb-1.1.0]   File "../sagenb/__init__.py", line 3, in 
[sagenb-1.1.0] from . import storage
[sagenb-1.1.0]   File "../sagenb/storage/__init__.py", line 3, in 
[sagenb-1.1.0] from .filesystem_storage import FilesystemDatastore
[sagenb-1.1.0]   File "../sagenb/storage/filesystem_storage.py", line
52, in 
[sagenb-1.1.0] from sagenb.misc.misc import
set_restrictive_permissions, encoded_str
[sagenb-1.1.0]   File "../sagenb/misc/misc.py", line 216, in 
[sagenb-1.1.0] import sage.all
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/all.py",
line 83, in 
[sagenb-1.1.0] from sage.misc.all   import * # takes a while
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/misc/all.py",
line 84, in 
[sagenb-1.1.0] from .functional import (additive_order,
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/misc/functional.py",
line 27, in 
[sagenb-1.1.0] from sage.rings.complex_double import CDF
[sagenb-1.1.0]   File "sage/rings/complex_double.pyx", line 101, in init
sage.rings.complex_double
(build/cythonized/sage/rings/complex_double.c:24114)
[sagenb-1.1.0] cdef CC = ComplexField()
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/rings/complex_field.py",
line 114, in ComplexField
[sagenb-1.1.0] C = ComplexField_class(prec)
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/rings/complex_field.py",
line 208, in __init__
[sagenb-1.1.0]
self._populate_coercion_lists_(coerce_list=[RRtoCC(self._real_field(),
self)])
[sagenb-1.1.0]   File "sage/rings/complex_number.pyx", line 2580, in
sage.rings.complex_number.RRtoCC.__init__
(build/cythonized/sage/rings/complex_number.c:21896)
[sagenb-1.1.0] Map.__init__(self, RR, CC)
[sagenb-1.1.0]   File "sage/categories/map.pyx", line 125, in
sage.categories.map.Map.__init__
(build/cythonized/sage/categories/map.c:3588)
[sagenb-1.1.0] parent = homset.Hom(parent, codomain)
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/categories/homset.py",
line 397, in Hom
[sagenb-1.1.0] H = Hom(X, Y, category, check=False)
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/categories/homset.py",
line 424, in Hom
[sagenb-1.1.0] H = X._Hom_(Y, category)
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/categories/rings.py",
line 361, in _Hom_
[sagenb-1.1.0] from sage.rings.homset import RingHomset
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/rings/homset.py",
line 19, in 
[sagenb-1.1.0] from . import quotient_ring
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/rings/quotient_ring.py",
line 116, in 
[sagenb-1.1.0] import sage.rings.polynomial.multi_polynomial_ideal
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py",
line 239, in 
[sagenb-1.1.0] from sage.interfaces.all import (singular as
singular_default,
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/interfaces/all.py",
line 24, in 
[sagenb-1.1.0] from .maxima import maxima, Maxima
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/interfaces/maxima.py",
line 1238, in 
[sagenb-1.1.0] script_subdirectory=None)
[sagenb-1.1.0]   File
"/opt/sage/8.5.beta1-python3/local/lib/python3.6/site-packages/sage/interfaces/maxima.py",
line 529, in __init__
[sagenb-1.1.0] raise RuntimeError('You must get the file
local/bin/sage-maxima.lisp')
[sagenb-1.1.0] RuntimeError: You must get the file
local/bin/sage-maxima.lisp
[sagenb-1.1.0]
[sagenb-1.1.0] WARNING: autodoc: failed to import module
'sagenb.misc.misc'; the following exception was raised:
[sagenb-1.1.0] Traceback (most recent call last):
[sagenb-1.1.0]   File

Re: [sage-devel] Re: number field: exactness of result of abs

2018-10-26 Thread Daniel Krenn
Thank you for your detailed explaination.

On 2018-10-25 11:09, John Cremona wrote:
> Personally I cannot think of a reason why one would want this abs() to
> be returned as an algebraic number, since the whole point of absolute
> values in algebraic number theory is that they like in some completion
> (RR, CC, Qp or an extension of Qp).  One could try to special-case
> cyclotomic fields -- which makes sense *only* because they have an
> automorphism of order 2 which can be identified with complex conjugation
> -- but a function whose return values had a parent which depended on the
> input would surely not be useful.

What my troubles are, is that by using abs my computation gets inexact,
which I want to avoid at all cost.
(So I think I just have to treat CyclotomicFields etc. special)

Daniel

-- 
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] number field: exactness of result of abs

2018-10-24 Thread Daniel Krenn
Dear all,

we have

sage: C. = CyclotomicField(60)
sage: abs(z)
1.00
sage: abs(z).parent()
Real Field with 53 bits of precision

What is the reason, why this returns an inexact result and not something
in an exact ring like QQbar?

Best wishes

Daniel

-- 
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] no conversion between number fields (extensions) over base rings which have conversion

2018-10-18 Thread Daniel Krenn
sage: CyclotomicField(3).extension(x^2+1, 'i')(QQ.extension(x^2+1,
'i').gen())

returns

TypeError: Cannot coerce element into this number field

Does anyone have some idea why this is not working?

(This is https://trac.sagemath.org/ticket/26443)

Best, Daniel

-- 
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: Enabling Merge Requests from GitLab

2018-09-04 Thread Daniel Krenn
On 09/04/2018 02:33 PM, Jeroen Demeyer wrote:
> Let me make one important comment (something that I've said before
> though): a large part of what makes the current workflow work is not so
> much Trac itself but our git server and the "git trac" scripts.
> 
> For example, I very much like the fact that we have a single git repo
> where all pull requests appear. Checking out a pull request for
> reviewing is so much easier with Sage than it is with typical GitHub
> projects. If we ever move to GitLab, we really should keep this workflow.

This should not be a problem (i.e. adapting git-trac to a git-gitlab) as
Gitlab has a convenient API.

See, for example,
https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr
which provides all information needed.

Daniel

-- 
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] failing doctest in function_field

2018-08-29 Thread Daniel Krenn
On 08/29/2018 01:14 PM, Jeroen Demeyer wrote:
> On 2018-08-29 13:11, Daniel Krenn wrote:
>> Shouldn't we simply use
>>    https://trac.sagemath.org/ticket/26150
>> ?
> 
> How is conversion from the symbolic related to evaluating "r" as the R
> interpreter?

Fair enough, this is now
  https://trac.sagemath.org/ticket/26155

-- 
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] failing doctest in function_field

2018-08-29 Thread Daniel Krenn
On 08/29/2018 12:59 PM, Jeroen Demeyer wrote:
> Can you create a ticket for this such that we can discuss it there?

Shouldn't we simply use
  https://trac.sagemath.org/ticket/26150
?

-- 
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] failing doctest in function_field

2018-08-29 Thread Daniel Krenn
On 08/29/2018 12:39 PM, Daniel Krenn wrote:
> In the element_constructor, there is the following (extracted):
>   sage: sage_eval('r', QQ['x'].fraction_field().gens_dict_recursive())
>   R Interpreter
> My intuition says that this should fail. 

For clearification, not the paricular command above, but in
element_constructor, the input 'r' should fail at this stage of the code.

> Can anyone tell me, where in
> the element constructor of fraction_field.py (sage.rings.fraction_field,
> L.593) is it best to catch the input 'r'?

-- 
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] failing doctest in function_field

2018-08-29 Thread Daniel Krenn
On 08/29/2018 10:13 AM, Daniel Krenn wrote:
> A simple fix in
>   https://trac.sagemath.org/ticket/26150
> (fraction field: fix conversion from symbolic ring)
> turns out to have an side effect in function_field:
> 
> File "src/sage/rings/function_field/function_field.py", line 1602, in
> sage.rings.function_field.function_field.FunctionField_polymod.hom
> Failed example:
> L.hom(r, base_morphism=phi)
> Exception raised:
> Traceback (most recent call last):
> ...
> ValueError: invalid literal for int() with base 10: "Error in
> dput(length(sage1)) : object 'sage1' not foun"
> 
> This seems like a weird error message (not only because of the "not
> foun" ;) )
> Does anyone have any glue what is going on here?

So, I did some digging and found out that the coercion model at some
point tries to create an element of

  Fraction Field of Univariate Polynomial Ring in x over Rational Field

out of the string 'r'. Due the changes on the ticket, this is now

  ValueError: invalid literal for int() with base 10: "Error in
dput(length(sage2)) : object 'sage2' not foun"

and was

  TypeError: unable to convert '[1] 0' to a rational

before.

Behind the scenes, this is a MWE reproducing the error:
  sage: QQ['x'].fraction_field()('r')
In the element_constructor, there is the following (extracted):
  sage: sage_eval('r', QQ['x'].fraction_field().gens_dict_recursive())
  R Interpreter
My intuition says that this should fail. Can anyone tell me, where in
the element constructor of fraction_field.py (sage.rings.fraction_field,
L.593) is it best to catch the input 'r'?

Best,

Daniel

-- 
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] failing doctest in function_field

2018-08-29 Thread Daniel Krenn
A simple fix in
  https://trac.sagemath.org/ticket/26150
(fraction field: fix conversion from symbolic ring)
turns out to have an side effect in function_field:

File "src/sage/rings/function_field/function_field.py", line 1602, in
sage.rings.function_field.function_field.FunctionField_polymod.hom
Failed example:
L.hom(r, base_morphism=phi)
Exception raised:
Traceback (most recent call last):
...
ValueError: invalid literal for int() with base 10: "Error in
dput(length(sage1)) : object 'sage1' not foun"

This seems like a weird error message (not only because of the "not
foun" ;) )
Does anyone have any glue what is going on here?

Best

Daniel


full traceback (from the ticket patchbot log):

File "src/sage/rings/function_field/function_field.py", line 1602, in
sage.rings.function_field.function_field.FunctionField_polymod.hom
Failed example:
L.hom(r, base_morphism=phi)
Exception raised:
Traceback (most recent call last):
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py",
line 614, in _run
self.compile_and_execute(example, compiler, test.globs)
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py",
line 1025, in compile_and_execute
exec(compiled, globs)
  File "",
line 1, in 
L.hom(r, base_morphism=phi)
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/rings/function_field/function_field.py",
line 1657, in hom
codomain = pushout(codomain, base_morphism.codomain())
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/categories/pushout.py",
line 3917, in pushout
elif S.has_coerce_map_from(Rs[-1]):
  File "sage/structure/parent.pyx", line 2015, in
sage.structure.parent.Parent.has_coerce_map_from
(build/cythonized/sage/structure/parent.c:17788)
cpdef bint has_coerce_map_from(self, S) except -2:
  File "sage/structure/parent.pyx", line 2037, in
sage.structure.parent.Parent.has_coerce_map_from
(build/cythonized/sage/structure/parent.c:17738)
return self._internal_coerce_map_from(S) is not None
  File "sage/structure/parent.pyx", line 2179, in
sage.structure.parent.Parent._internal_coerce_map_from
(build/cythonized/sage/structure/parent.c:18750)
mor = self.discover_coerce_map_from(S)
  File "sage/structure/parent.pyx", line 2316, in
sage.structure.parent.Parent.discover_coerce_map_from
(build/cythonized/sage/structure/parent.c:19204)
user_provided_mor = self._coerce_map_from_(S)
  File "sage/structure/parent_old.pyx", line 354, in
sage.structure.parent_old.Parent._coerce_map_from_
(build/cythonized/sage/structure/parent_old.c:7094)
cpdef _coerce_map_from_(self, S):
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/rings/function_field/function_field.py",
line 506, in _coerce_map_from_
sourcegen_in_self = self(source.variable_name())
  File "sage/structure/parent.pyx", line 921, in
sage.structure.parent.Parent.__call__
(build/cythonized/sage/structure/parent.c:9679)
return mor._call_(x)
  File "sage/structure/coerce_maps.pyx", line 145, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4574)
raise
  File "sage/structure/coerce_maps.pyx", line 140, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4442)
return C._element_constructor(x)
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/rings/function_field/function_field.py",
line 2409, in _element_constructor_
x = self._field(x)
  File "sage/structure/parent.pyx", line 921, in
sage.structure.parent.Parent.__call__
(build/cythonized/sage/structure/parent.c:9679)
return mor._call_(x)
  File "sage/structure/coerce_maps.pyx", line 145, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4574)
raise
  File "sage/structure/coerce_maps.pyx", line 140, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(build/cythonized/sage/structure/coerce_maps.c:4442)
return C._element_constructor(x)
  File
"/opt/sage/local/lib/python2.7/site-packages/sage/rings/fraction_field.py",
line 634, in _element_constructor_
x = x0.numerator()*y0.denominator()
  File "sage/structure/element.pyx", line 1536, in
sage.structure.element.Element.__mul__
(build/cythonized/sage/structure/element.c:12263)
return coercion_model.bin_op(left, right, mul)
  File "sage/structure/coerce.pyx", line 1173, in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(build/cythonized/sage/structure/coerce.c:9733)
action = self.get_action(xp, yp, op, x, y)
  File "sage/structure/coerce.pyx", line 1716, in
sage.structure.coerce.CoercionModel_cache_maps.get_action
(build/cythonized/sage/structure/coerce.c:16903)
action = self.discover_action(R, S, op, r, s)
  File 

Re: [sage-devel] Re: Enabling Merge Requests from GitLab

2018-08-23 Thread Daniel Krenn
On 08/23/2018 11:15 AM, Dima Pasechnik wrote:
> github has a command line tool, called hub, allowing one to e.g. create pull 
> requests and issues, without using a browser.
> https://hub.github.com/hub-pull-request.1.html
> https://hub.github.com/hub-issue.1.html
> 
> I don't know whether gitlab has something akin to hub.

FWIW Gitlab has an API which allows doing stuff via e.g. a Python
library; this is quite convenient for doing batch-jobs etc.

[1] https://docs.gitlab.com/ee/api/
[2] https://github.com/python-gitlab/python-gitlab

-- 
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] Enabling Merge Requests from GitLab

2018-08-21 Thread Daniel Krenn
On 08/21/2018 10:43 AM, Erik Bray wrote:
> https://gitlab.com/sagemath/sage

How do I become a member of the SageMath group (or the project) in
Gitlab? (username: dakrenn)

Best

Daniel

-- 
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] installation fortran

2018-08-20 Thread Daniel Krenn
On 08/19/2018 08:06 PM, Mathieu Roux wrote:
> but i have just installed my new linux, after formating hard disk... I
> took last version of linux mint cinnamon.
> 
> What can i do? Is there a new solution but building sage from sources?

FWIW, I just did the same: format, install current linux mint cinnamon,
compile sagemath...without any troubles.

Daniel

-- 
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] Release schedule survey

2018-07-19 Thread Daniel Krenn
On 2018-07-19 08:50, Jeroen Demeyer wrote:
> On 2018-07-19 00:24, Volker Braun wrote:
>> Since Erik is clamoring for a more calendar-driven release schedule,
>> here is a quick A/B test:
>>
>> A) Keep the current process of releasing approximately every 3 months,
>> longer if people insist on having their own pet tickets merged at the
>> last minute.
>>
>> B) Keep a strict time table: Merge window is open for 2 months, after
>> that only fixes for new regressions, release on 1/1, 3/1, 6/1, and 9/1.
> 
> From my personal experience as release manager, I would have hated B.
> 
> However, I think Erik was asking more for something like
> 
> C) Don't keep a strict time table, but announce at some point during the
> beta releases when you plan to cut off the merge window.
> 

+1 for C

-- 
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] error compiling 8.2: openblas, lgfortran

2018-05-17 Thread Daniel Krenn
On 2018-05-17 16:44, Jeroen Demeyer wrote:
> On 2018-05-17 15:58, Daniel Krenn wrote:
>> Sorry, now found it exactly there (modulo version which is 4.8)
> 
> So, the question is: why is it not found? I'm afraid I cannot help you
> further here...

Ok, thank you for your help.

> Could you specify the output of gcc --version and gfortran --version and
> their installation directories just in case there is something unusual
> there.

dakrenn@pc72-math /usr/lib/gcc/x86_64-linux-gnu $ gcc --version
gcc (Ubuntu 4.9.4-2ubuntu1~14.04.1) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dakrenn@pc72-math /usr/lib/gcc/x86_64-linux-gnu $ gfortran --version
GNU Fortran (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

dakrenn@pc72-math /usr/lib/gcc/x86_64-linux-gnu $ whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/bin/X11/gcc /usr/share/man/man1/gcc.1.gz
dakrenn@pc72-math /usr/lib/gcc/x86_64-linux-gnu $ whereis gfortran
gfortran: /usr/bin/gfortran /usr/bin/X11/gfortran
/usr/share/man/man1/gfortran.1.gz

-- 
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] error compiling 8.2: openblas, lgfortran

2018-05-17 Thread Daniel Krenn
On 2018-05-17 15:48, Jeroen Demeyer wrote:
> On 2018-05-17 15:29, Daniel Krenn wrote:
>> On 2018-05-17 15:13, Jeroen Demeyer wrote:
>>> Is libgfortran.so installed
>>> somewhere on your system?
>>
>> I did not find this file anywhere.
> 
> There's your problem. On my Gentoo system, this file lives in
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/libgfortran.so

Sorry, now found it exactly there (modulo version which is 4.8)

-- 
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] error compiling 8.2: openblas, lgfortran

2018-05-17 Thread Daniel Krenn
On 2018-05-17 15:13, Jeroen Demeyer wrote:
> On 2018-05-17 14:45, Daniel Krenn wrote:
>> Compiling 8.2 from scatch (on a system that worked for 8.1) breaks with
>> the errors below.
>> Any ideas why?
> 
> Your gfortran installation is messed up somehow. Are you using the
> system gfortran or the one compiled by Sage?

I have a gfortran installed on the system, so I use whatever Sage
installation decides by default in this case.

> Is libgfortran.so installed
> somewhere on your system?

I did not find this file anywhere.

-- 
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] error compiling 8.2: openblas, lgfortran

2018-05-17 Thread Daniel Krenn
Compiling 8.2 from scatch (on a system that worked for 8.1) breaks with
the errors below.
Any ideas why?

Best, Daniel


[openblas-0.2.20.p1] make[4]: Entering directory
`/local/dakrenn/sage/8.2/local/var/tmp/sage/build/openblas-0.2.20.p1/src/exports'
[openblas-0.2.20.p1] gcc -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64
-DF_INTERFACE_GFORT -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=
-DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -I..
-L/local/dakrenn/sage/8.2/local/lib
-Wl,-rpath,/local/dakrenn/sage/8.2/local/lib  -shared -o
../libopenblas_atom-r0.2.20.so \
[openblas-0.2.20.p1]-Wl,--whole-archive ../libopenblas_atom-r0.2.20.a
-Wl,--no-whole-archive \
[openblas-0.2.20.p1]-Wl,-soname,libopenblas.so.0 -lm -lgfortran -lm
-lgfortran
[openblas-0.2.20.p1] /usr/bin/ld: cannot find -lgfortran
[openblas-0.2.20.p1] /usr/bin/ld: cannot find -lgfortran
[openblas-0.2.20.p1] collect2: error: ld returned 1 exit status
[openblas-0.2.20.p1] make[4]: *** [../libopenblas_atom-r0.2.20.so] Error 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Whitespace patchbombs

2018-02-21 Thread Daniel Krenn
On 2018-02-20 21:47, Jeroen Demeyer wrote:
> Interesting fact: the number of lines with trailing whitespace is
> generally *increasing* with every Sage release. So it seems to me that
> the biggest problem (if you find whitespace a problem) is preventing new
> whitespace.

So, there should be a trac plugin which checks if there are whitespace
issues in the changed code lines or in the changed files...

And, as it was mentioned in the other thread, there could be another
trac plugin which runs pyflakes on the changed files.

-- 
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: Whitespace patchbombs

2018-02-20 Thread Daniel Krenn
On 2018-02-20 12:07, Simon King wrote:
> Why not doing such cleanup right before releasing a beta version?

Or even better, right before a release, e.g. doing it for a rc0 or rc1.

-- 
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: Merge fails of positive ticket HOWTO

2018-01-05 Thread Daniel Krenn
On 2018-01-05 13:00, Erik Bray wrote:
> On Thu, Jan 4, 2018 at 10:26 PM, Jeroen Demeyer  
> wrote:
>> On 2018-01-02 22:59, Volker Braun wrote:
>>>
>>> IMHO it shouldn't be easy to find. Certainly nobody should base their
>>> work on it.
>>
>>
>> I agree here.
> 
> I don't, but I also seem to recall you linking me to it after I
> complained about it being "secret" as if it were somehow obvious to
> find.  This is what I meant by "secret"--perhaps a bit glib because
> it's not secret like a password, but certainly obscured...

I am not sure how automatic the releasemanager workflow of try merging a
ticket and setting a ticket to needs_work if not successful is. But in
the case this works automatically, would it be possible to, after
setting it to needs_work, post the output of

#!/bin/bash
TAG=`git describe --abbrev=0 --first-parent`
echo `git log --pretty=format:'%s' --first-parent $TAG.. | sed -r
's|.*(#[0-9]+).*|\1|'` $TAG

as a comment on the ticket. This return something like
  #24389 #24384 #24383 #24382 #24300 #24214 #23399 8.2.beta1
which gives a glue where to search.

Best

Daniel

-- 
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] solve and conjugate bug

2017-11-28 Thread Daniel Krenn
Is the following a known bug?

sage: var('z')
z
sage: z0all = solve(z - 4*z.conjugate() == 1 + 3*I, z); z0all
[z == (-I - 1/3)]
sage: z0 = z0all[0].rhs(); z0
-I - 1/3
sage: (z0 - 4*z0.conjugate()) - (1 + 3*I)
-8*I

Clearly, the result of solve is not a solution of the given equation.

-- 
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] What does MPolynomial_libsingular.reduce() do?

2017-10-17 Thread Daniel Krenn
On 2017-10-17 11:49, Luca De Feo wrote:
>> It takes I as the generators of the ideal and uses that as the reduction
>> set.
> 
> That's not a definition. I'm in front of a class asking what this
> function does, and I'm unable to give a mathematical definition of
> what Sage means by "reduction" modulo something that's not a Groebner
> basis.
> 
>> What it does is probably do the reduction using the list in reverse order
>> for this case.
> 
> "Probably" is not a mathematical definition. Besides, I think it's
> more complicated than that.
> 
> Am I the only one who's regularly embarassed explaining Sage's quirks
> to an audience of beginners (or not beginners)?

+1 for doing something.

What about the following fix: When the input is a list/tuple, we check
if it is a Groebner basis or not. If it is, do the computation, if not,
print a warning or raise an error.

Testing if something is a Groebner basis could be done by converting the
list to an object of

and use its method .is_groebner()

Daniel

-- 
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] How do I overwrite comparison for modules?

2017-10-17 Thread Daniel Krenn
On 2017-10-17 12:13, Simon Brandhorst wrote:
> Because the documentation did not tell me it was possible:

Maybe sage.structure.richcmp.richcmp_by_eq_and_lt is something for you
(see also L1100 in sage/rings/asymptotic/growth_group.py).

Daniel

-- 
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] What does MPolynomial_libsingular.reduce() do?

2017-10-16 Thread Daniel Krenn
On 2017-10-16 18:41, Luca De Feo wrote:
> Here's a Sage session:
> 
> sage: A. = QQ[]
> sage: (x+y).reduce([(x-y), (x+y)])
> 0
> sage: (x-y).reduce([(x-y), (x+y)])
> -2*y
> 
> The docstring says reduce computes "the normal form of self w.r.t. I,
> i.e. [...] the remainder of this polynomial with respect to the
> polynomials in I".
> 
> Does anyone have any idea how this normal form is defined? It doesn't
> seem to depend on the order of the polynomials in I.

It computes the polynomial "modulo" the given ideal (i.e. compute a
Groebner basis of the ideal and reduce the given polynomial by this basis).

My guess: If only a list of polynomials is given, then it is assumed
that these form a Groebner basis, which seems not to be the case.

>>From the source code, I can only tell it calls Singular's kNF, but I
> can't find any doc for it. Maybe this function should be underscored?

Once we know what it does with lists, the documentation should be made
precise.

I am against underscoring, as for ideals as parameter, this is a
standard operation.

-- 
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] git trac is down ?

2017-09-12 Thread Daniel Krenn
On 2017-09-12 12:49, Daniel Krenn wrote:
> On 2017-09-12 12:04, Frédéric Chapoton wrote:
>> I have access failures to the git repo from trac :
>>
>> chapoton@pc-chapoton:~/sage$ git pull trac
>> u/mantepse/fricas_output_and_sage_conversion_bug
>> fatal: read error: Connexion ré-initialisée par le correspondant
>>
>> Does anybody else suffers from that ?
> 
> Yes, same here (since this some hours at least).

Details:

dakrenn@pc72-math /local/dakrenn/sage/source $ LANG=C git fetch trac
fatal: read error: Connection reset by peer
dakrenn@pc72-math /local/dakrenn/sage/source $ git remote -v
tracgit://trac.sagemath.org/sage.git (fetch)
tracg...@trac.sagemath.org:sage.git (push)

(from AT)

-- 
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] git trac is down ?

2017-09-12 Thread Daniel Krenn
On 2017-09-12 12:04, Frédéric Chapoton wrote:
> I have access failures to the git repo from trac :
> 
> chapoton@pc-chapoton:~/sage$ git pull trac
> u/mantepse/fricas_output_and_sage_conversion_bug
> fatal: read error: Connexion ré-initialisée par le correspondant
> 
> Does anybody else suffers from that ?

Yes, same here (since this some hours at least).

Daniel

-- 
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-release] Sage 8.0 released

2017-08-29 Thread Daniel Krenn
On 2017-07-22 00:43, Volker Braun wrote:
> The "master" git branch has been updated to Sage-8.0.

make ptestlong produced the failing doctest below. Trying again with
"sage -t --long src/sage/interfaces/rubik.py" let the test pass. Is this
something known?


sage -t --long src/sage/interfaces/rubik.py
**
File "src/sage/interfaces/rubik.py", line 249, in
sage.interfaces.rubik.DikSolver.solve
Failed example:
DikSolver().solve(C.facets())
Exception raised:
Traceback (most recent call last):
  File
"/local/egaar/sage/8.0/local/lib/python2.7/site-packages/sage/doctest/forker.py",
line 509, in _run
self.compile_and_execute(example, compiler, test.globs)
  File
"/local/egaar/sage/8.0/local/lib/python2.7/site-packages/sage/doctest/forker.py",
line 872, in compile_and_execute
exec(compiled, globs)
  File "", line 1,
in 
DikSolver().solve(C.facets())
  File
"/local/egaar/sage/8.0/local/lib/python2.7/site-packages/sage/interfaces/rubik.py",
line 290, in solve
raise ValueError(child.before)
ValueError:

113644415522336444155222336444155665665665


-- 
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] English translation of "Calcul Mathématique avec Sage" and Python 3

2017-08-28 Thread Daniel Krenn
On 2017-08-28 12:45, Nicolas M. Thiery wrote:
> - Do you foresee other sources of problems? Recommend other tests to run?

I've just randomly looked at some of the pages and found

  filter (is_prime, [1..55])

When I am correct, this will be an iterator in Python 3 (and is a list now).

There are voices (e.g. [1]) who say that using filter is not as
beautiful (and explicit) as, for example

  [p for p in [1..55] if is_prime(p)]

BTW, there should not be a whitespace in a function call after a
function name, so the above should be
filter(is_prime, [1..55])
See [2]. Also in [2], no whitespaces before a ";".

Best

Daniel

[1] http://www.artima.com/weblogs/viewpost.jsp?thread=98196
[2] https://www.python.org/dev/peps/pep-0008/#id27

-- 
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] Calculation Error

2017-08-28 Thread Daniel Krenn
On 2017-08-26 02:40, David Roe wrote:
> This is not a bug.  If you look at the documentation for
> Integer.__pow__, you'll see "For consistency with Python and MPFR, 0^0
> is defined to be 1 in Sage."

To avoid such a discussion in future:

https://trac.sagemath.org/ticket/23735

(with the link from the other reply).

-- 
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: sage -docbuild useless

2017-08-21 Thread Daniel Krenn
On 2017-08-21 15:08, Ralf Stephan wrote:
> Ah the citations need a make and  will not compile with a simple sage
> -docbuild. So it really is useless and should be disabled to not confuse
> people like me.

I am strongly against disabling "sage -docbuild": When developing and
only changing e.g. one file, then it takes ages for "make doc" to
complete, whereas "sage -docbuild ..." finishes within seconds.

-- 
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] doctests: non-sorted output

2017-08-18 Thread Daniel Krenn
A patchbot reported two failing doctests because the result is a set and
the elements were in a different order, see
  https://trac.sagemath.org/ticket/23637
I somehow remember that such an issue was discussed here and I thought
it was about the output of dict and set being sorted by a display hook.
Am I wrong and this is not done or even not possible?

Best

Daniel

-- 
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] 0 should not be a primitive root

2017-08-16 Thread Daniel Krenn
On 2017-08-14 18:37, Will Song wrote:
> Not sure if this is a known bug or not.
> 
> SageMath version 8.0, Release Date: 2017-07-21
> 
> sage: mod(0, 17).is_primitive_root()
> True
> 
> The easy fix would just be to add
> 
> if self == 0:
> return True
> 
> after 
> https://github.com/sagemath/sage/blob/master/src/sage/rings/finite_rings/integer_mod.pyx#L1586.
> This also fixes the issue with p^j being a primitive root mod p^k where
> p is an odd prime.

This is now
https://trac.sagemath.org/ticket/23624

-- 
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 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] testing docstrings

2017-08-04 Thread Daniel Krenn
On 2017-08-04 16:32, John Cremona wrote:
> Is there a quicker way to check docstrings for syntax and appearance
> than "make doc" which takes a very long times as it builds all of the
> docs?  I have only changed 3 files and want to keeping making the docs
> on those.  I suppose that after doing one "make doc" which completes
> without failing then subsequent ones will be faster, but it stopped
> dead at the first syntax error and when I corrected that and restarted
> it went back to the beginning again, only a little faster than the
> first time.

./sage -b && ./sage -docbuild reference/rings html

is much much faster. (Even doing this for all "reference" is already
much faster.)

-- 
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: Bug in groebner_basis()?

2017-07-14 Thread Daniel Krenn
On 2017-07-14 16:41, Simon King wrote:
> On 2017-07-14, Johannes Schwab  wrote:
>> Here is the code:
>> R. = PolynomialRing(QQ, 'lex')
> That's not what you want.
> [...]
> Instead you have to do
>   sage: R. = PolynomialRing(QQ, order='lex')
> (i.e., specify what parameter is 'lex' being assigned to)

What does the polynomial ring constructor do with the 'lex' in the first
example? Why is no error raised?

-- 
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] Question on git merge

2017-07-11 Thread Daniel Krenn
On 2017-07-11 14:39, Simon King wrote:
> Being on a different git branch, I tried
>git cherry-pick xyz

Why cherry-pick and not simply
  git merge xyz
? This could git help finding a proper merge base.

-- 
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] Old-style packages

2017-07-05 Thread Daniel Krenn
On 2017-07-05 14:50, Jeroen Demeyer wrote:
> TL;DR: should we drop support for old-style .spkg packages completely in
> Sage?

Will this mean that they stop working immediately or they will only be
broken if certain parts in SageMath are altered by some (future)
ticket/fix etc.?

-- 
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] Simple new patchbot feature I'd like to add

2017-06-26 Thread Daniel Krenn
On 2017-06-26 13:26, Erik Bray wrote:
> I submitted a PR [1] to the sage patchbot to add a feature I would
> like to have, that re-runs failed tests one or more times.  If
> previously failing tests pass on a repeat attempt then the test is
> considered "passing".  However, I added a new return status called
> "TestsPassedOnRetry" to distinguish this condition, so that it might
> still stand out if it's happening constantly, which may still indicate
> a real problem.
> 
> This will help a lot though with transient failures that occur
> sometimes, especially if tests timeout (e.g. due to the system being
> under some other load).  The addition of the new return status would
> require an upgrade to the patchbot server if accepted, which is why
> I'm pointing this out.

Would it be possible to only retry if there is a failure due to timeout?

If a doctest has a random-like behavior, then it should not be
considered a pass on a retry...

Best

Daniel

-- 
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] the overhead of sorting in .roots()

2017-06-12 Thread Daniel Krenn
On 2017-06-12 07:21, Nils Bruin wrote:
> How attached are people to creating deterministic output where none is
> warranted?
> 
> Currently, there is a "sort" routine in f.roots which creates a 60%
> overhead:
> 
> sage: C=ComplexField(100)
> sage: %timeit f.roots(multiplicities=False)
> 1000 loops, best of 3: 703 µs per loop
> sage: %timeit [C(a) for a in F.polroots(precision=C.prec())]
> The slowest run took 4.22 times longer than the fastest. This could mean
> that an intermediate result is being cached.
> 1000 loops, best of 3: 432 µs per loop
> 
> Is it really worth that much to enforce output to be in some arbitrary
> order?

If not sorted, should the output data structure be a Python set instead
of a list?

-- 
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 Python 3 proposal

2017-06-06 Thread Daniel Krenn
On 2017-06-01 16:35, William Stein wrote:
> The second oldest is "notebook -- should be able export (=print) to
> latex/pdf/dvi", which could be finally closed when Jupyter notebook is
> the default notebook

Does typeset output meanwhile work? (I ask as, having e.g. show(x^2) in
a Jupyter notebook, then File --> Download as --> PDF via LaTeX does not
typeset the output, but unfortunately uses the plain text output; tested
with 8.0.beta8)

-- 
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: Poll for issue G1 a specific guideline for writing docstrings

2017-05-23 Thread Daniel Krenn
On 2017-05-23 04:16, Nicolas M. Thiery wrote:
> For how to typeset True/False/None/... when we need to spell them out
> explicitly, as already suggested, I would be in favor of :obj:`True`.

I wasn't aware that this works. But in this case, I am in favor (+1) of
:obj:`True` as well.

Best

Daniel

-- 
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] Second round poll for H5 a specific guideline for writing docstrings

2017-05-22 Thread Daniel Krenn
On 2017-05-22 12:08, Jeroen Demeyer wrote:
> On 2017-05-22 12:05, Kwankyu Lee wrote:
>> My opinion is that the phrase "a tuple `(a,b,c)` where ..." is just
>> redundant.
> 
> I think that "a tuple" is important non-redundant information.

+1 for "a tuple" in this case (and not skipping this information; it is
essential)

-- 
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: Second round poll for H2 a specific guideline for writing docstrings

2017-05-20 Thread Daniel Krenn
On 2017-05-20 00:03, Kwankyu Lee wrote:
> This is my last attempt to save the guideline.
> 
> A Sage user has an integer X. He hit the tab key and get "X.is_prime",
> and then ask what this method does by entering "X.is_prime?". Imagine
> that he reads
> 
> (1) Return whether the integer is prime.
> 
> (2) Return whether this integer is prime.
> 
> (3) Return whether ``self`` is prime.
> 
> Which one of these is most friendly plain English answer to his question?

(2)


-- 
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] Second round poll for H5 a specific guideline for writing docstrings

2017-05-19 Thread Daniel Krenn
On 2017-05-19 08:57, Jeroen Demeyer wrote:
> As I mentioned on the other thread, since OUTPUT is not a list of things
> (as opposed to INPUT), I would prefer
> 
> OUTPUT: tuple of lattices

+1 for this option

-- 
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] Second round poll for H4 a specific guideline for writing docstrings

2017-05-19 Thread Daniel Krenn
On 2017-05-19 00:24, Kwankyu Lee wrote:
> I prepared H4 revised from G4 based on your ideas and wishes. It was
> hard to make a compromise from your differing opinions and reach a
> proposal for the better. So this time_ if I fail to get approval from
> most of you, the guideline will be simply discarded._/  /
> //
> H4. OUTPUT block is optional but recommended unless it is clear from the
> one-line 
> explanation.
> 
> If you agree, flag +1; if you don't, flag -1.

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


Re: [sage-devel] Second round poll for H3 a specific guideline for writing docstrings

2017-05-19 Thread Daniel Krenn
On 2017-05-19 00:22, Kwankyu Lee wrote:
> I prepared H3 revised from G3 based on your ideas and wishes. It was
> hard to make a compromise from your differing opinions and reach a
> proposal for the better. So this time_ if I fail to get approval from
> most of you, the guideline will be simply discarded._/  /
> //
> H3. Write
> 
> |
> Returnwhether the lattice isreflexive.
> |
> 
> but do not write
> 
> |
> Return``True``ifthe lattice isreflexive and``False``otherwise.
> |

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


Re: [sage-devel] Second round poll for H2 a specific guideline for writing docstrings

2017-05-19 Thread Daniel Krenn
On 2017-05-19 00:20, Kwankyu Lee wrote:
> Hi,
> 
> I prepared H2 revised from G2 based on your ideas and wishes. It was
> hard to make a compromise from your differing opinions and reach a
> proposal for the better. So this time_ if I fail to get approval from
> most of you, the guideline will be simply discarded._/  /
> //
> H2. Write
> 
> |
> if the lattice is reflexive
> |

In the oneline description it could be "if *this* lattice is reflexive"
as well, as we talk about a method of this lattice.

-- 
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: Second round poll for H1 a specific guideline for writing docstrings

2017-05-19 Thread Daniel Krenn
On 2017-05-19 08:35, Simon King wrote:
> PS, to the +1 given earlier: I suggest that one should also write `f(x)`
> instead of f(x).

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


Re: [sage-devel] Second round poll for H1 a specific guideline for writing docstrings

2017-05-19 Thread Daniel Krenn
On 2017-05-19 00:17, Kwankyu Lee wrote:
> I prepared H1 revised from G1 based on your ideas and wishes. It was
> hard to make a compromise from your differing opinions and reach a
> proposal for the better. So this time_if I fail to get approval from
> most of you, the guideline will be simply discarded._/  /
> //
> H1. Write
> 
> |
> ``True``,``False``,``None``
> |
> 
> but do not write
> 
> |
> True,False,None
> |

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


Re: [sage-devel] Poll for issue G2 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 17:17, Jeroen Demeyer wrote:
> On 2017-05-17 17:10, Daniel Krenn wrote:
>> I find this perfectly fine. I personally would write "Return whether
>> this lattice is contained in the other lattice", but I do not find any
>> need to include ``self`` in the one-line description.
> 
> Well, in general, sentences containing too many words like "this",
> "that", "it", "the $thing", ... are hard to understand. Perhaps the
> is_sublattice() example I gave might be acceptable, but I wouldn't push
> it much further.

To clearify, I would never use "this" alone, but "this lattice" in the
one-line description seems to be clear where it refers to. (...and I do
not have a problem, if there is a "self" somewhere, but in general the
rule should be not to use it (except if it helps to clearify))



-- 
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: Unifying "test::" and "tests::"

2017-05-17 Thread Daniel Krenn
On 2017-05-17 14:13, Kwankyu Lee wrote:
> I agree; in the formatteed text, there should not be quotes,
> 
> 
> In terminal and jupyter, ``True`` is rendered "True". I think this is
> ugly. It should be rendered True
>  
> 
> but it should also not be formatted as plain text. 
> 
> 
> Why not?  Why do we treat them differently from other Sage objects? Look
> at this
> 
> https://docs.python.org/3/library/functions.html?highlight=isinstance#isinstance
> 
> They even write it as 
> 
> true

Yes, they use "true" or "``True``", but never "True" (capitalized, but
not tt-font). (However, this file does not seem to be consistent in itself.)

-- 
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] Poll for issue G2 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 17:00, Jeroen Demeyer wrote:
> def is_sublattice(self, other):
> """
> Return ``True`` if this lattice is contained
> in the other lattice.
> """
> 
> In this case, it would be better to refer to ``self`` and ``other``.

I find this perfectly fine. I personally would write "Return whether
this lattice is contained in the other lattice", but I do not find any
need to include ``self`` in the one-line description.

-- 
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: Unifying "test::" and "tests::"

2017-05-17 Thread Daniel Krenn
On 2017-05-17 13:40, Kwankyu Lee wrote:
> I am simply asking why we aren't writing a docstring as
> 
> "Return True if "
> 
> instead of 
> 
> "Return ``True`` if ..."
> 
> just like
> 
> "Return an integer ..."
> 
> instead of
> 
> "Return an ``Integer``"

Because ``True`` is an object of type bool which is represented by the
printed string "True". Thus the comparison should be with "Return a
boolean" would be more appropriate.
Moreover, a capitalized True looks somehow weird; shouln't it be "Return
true if..." then?

As mentioned in the other thread, the best would probably be to link
True to its Python-docmentation [T], which is possible in SageMath.

E.g., for RuntimeException, I would use
:python:`RuntimeError`
See [R] for a live view. The same should be possible for
True/False/None. In this way we would not lose some structure; even gain
more cross-links, which is good.

[T] https://docs.python.org/3/library/constants.html#True
[R]
http://doc.sagemath.org/html/en/reference/asymptotic/sage/rings/asymptotic/asymptotic_ring.html#sage.rings.asymptotic.asymptotic_ring.NoConvergenceError

-- 
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] Poll for issue G1 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 16:07, Kwankyu Lee wrote:
> We do a poll for adopting an official guideline for docstrings
> (see https://trac.sagemath.org/ticket/23017)
> 
> G1. Write 
>  
> |
> Return True if something is true.
> |
> 
> but do not write 
> 
> |
> Return ``True`` if something is true.
> |
> 
> The same applies to `False` and `None`
> 
> If you agree, flag +1; if you disagree and want it reversed, flag -1; if
> you think we do not need this guideline, flag X. 

-1

See the first few lines of [1] where an equivalent of our ``True`` is
used (and therefore written in typewriter font)

Moreover, in the note box above
Section "3.1. Constants added by the site module", it is even done
better and a link to Python's True and False is given. (+1 for linking
True, False, None to these Python sites. IMO this should be the
encouraged way also for Python's exceptions etc.)

[1] https://docs.python.org/3/library/constants.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] Poll for issue G2 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 16:11, Kwankyu Lee wrote:
> We do a poll for adopting an official guideline for docstrings
> (see https://trac.sagemath.org/ticket/23017
> )
> 
> G2. Write
> 
> |
> if the lattice is reflexive ...
> |
> 
> but don't write
> 
> |
> if ``self`` is reflexive ...
> |

"if *this* lattice is reflexive..."

+1 for the line above, +1/2 in the sense of the poll (as  "if ``self``
is reflexive" is definitely not what I want.)

-- 
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] Poll for issue G3 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 16:16, Kwankyu Lee wrote:
> |
> Return whether the lattice is reflexive.
> |

+1 for the above option. (i.e. -1 in the sense of this poll)

-- 
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] Poll for issue G4 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 16:24, Kwankyu Lee wrote:
> We do a poll for adopting an official guideline for docstrings
> (see https://trac.sagemath.org/ticket/23017
> )
> 
> G4. OUTPUT block is optional
> 
> The developer manual says OUTPUT block is not optional. But I think the
> first statement of the docstring "Return an object ..." already
> describes what is output. Hence usually the OUTPUT block is redundant
> and is needed only when more explanation about the returned object is
> necessary.
> 
> If you agree, flag +1; if you disagree, flag -1; if you want to leave it
> as it is, flag X.

G4. An OUTPUT block is recommended unless it is clear from the one-line
explanation. If in doubt include it.

I vote +1 for the above formulation.

-- 
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] Poll for issue G5 a specific guideline for writing docstrings

2017-05-17 Thread Daniel Krenn
On 2017-05-17 16:30, Kwankyu Lee wrote:
> We do a poll for adopting an official guideline for docstrings
> (see https://trac.sagemath.org/ticket/23017
> )
> 
> G5. Write
> 
> |
> OUTPUT:
> 
> - lattice
> |
> 
> 
> but do not write
> 
> |
> OUTPUT:
> 
> lattice
> |

I am fine with any of these two options, +1 for specifying one
explicitly (without the option that the other is possible).

(I have a slight preference for the second. My feeling tells me, this is
what is used most frequently in SageMath, but maybe I only have a view
on a limited part of 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] Re: Unifying "test::" and "tests::"

2017-05-17 Thread Daniel Krenn
On 2017-05-17 10:51, Kwankyu Lee wrote:
> I am for writing double-quotes ``True``, ``False``, ``None``, as
> this is
> the  "offical" representation of these objects and therefore is printed
> as output. Thus a typewriter-font is appropriate.
> 
> 
> In what sense, is it official? In Python or in Sage?
> 
> Two reasons why I am against it:
> 
> 1. Objects in Sage are written in plain English. Thus a method returns,
> say, an integer not an "Integer" or an element not an "Element". We can
> regard True, False, and None as just proper names of Python objects. The
> docstrings should be written in plain English as much as possible.
> Double-quotes are redundant.

Maybe I misunderstood your double-quotes.

I meant ``True`` (and talk about these double-quotes; this will be
typeset with a typewriter font). These double-quotes are not shown in
the formatted text, only in the source.
In contrast, it should not be "True" or ``"True"``.

> 2. True, False, None are very frequent in docstrings as arguments and
> return values. They look better without double-quotes if you see them
> via help(...) or ? in terminal or in jupyter. We should consider how a
> docstring look in terminal, jupyter, as pdf, and as a webpage, and we
> should make a balance. 

I agree; in the formatteed text, there should not be quotes, but it
should also not be formatted as plain text.

See, for example
  https://docs.python.org/3/library/constants.html
where there is
  Assignments to ``True`` are...

Best,

Daniel

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


  1   2   3   4   >