[sage-devel] Weird behaviour of Matrix_cyclo_dense

2022-09-27 Thread alexKar
Hi all, Having trouble with the matrix multiplication which I first explained in https://ask.sagemath.org/question/64194/determinants-over-cyclotomic-fields-are-broken/ If I define two matrices (L and U) over CyclotomicField and then multiply then like L*U and via the definition then the

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Tobias Diez
Okay, fair enough! Then it's a bit more work to get tickets into PRs (for devs) but maybe its a good idea to start with a clean slate. On Tuesday, 27 September 2022 at 22:31:57 UTC+2 dim...@gmail.com wrote: > > > On Tue, 27 Sep 2022, 21:12 Tobias Diez, wrote: > >> Just to make sure we are

Re: [sage-devel] View issues

2022-09-27 Thread John H Palmieri
If you do `view(G, debug=True)`, it will first print out the entire LaTeX file that it's using. You could paste that into an actual file and see if you can pin down what the error is, and whether it's coming from your TeX installation or somewhere else. On Tuesday, September 27, 2022 at

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Matthias Koeppe
On Tuesday, September 27, 2022 at 1:12:55 PM UTC-7 tobias...@gmail.com wrote: > Just to make sure we are talking about the same thing. Imagine a currently > open ticket with a linked branch. How is this going to be migrated? My > assumption has been that this will create a PR from >

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Dima Pasechnik
On Tue, 27 Sep 2022, 21:12 Tobias Diez, wrote: > Just to make sure we are talking about the same thing. Imagine a currently > open ticket with a linked branch. How is this going to be migrated? My > assumption has been that this will create a PR from > sagemath/sagetrac-mirror/branch into

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Tobias Diez
Just to make sure we are talking about the same thing. Imagine a currently open ticket with a linked branch. How is this going to be migrated? My assumption has been that this will create a PR from sagemath/sagetrac-mirror/branch into sagemath/sage. If thats indeed the plan (which I find is a

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Matthias Koeppe
The first proposed Issue template can be seen here: https://github.com/sagemath/sage-gh-templates-sandbox/issues/new/choose See https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository On Tuesday,

Re: [sage-devel] View issues

2022-09-27 Thread Dima Pasechnik
On Tue, Sep 27, 2022 at 8:16 PM Ben Salisbury wrote: > > Hi all, > > I'm having trouble with the view method. For example, > > sage: G = graphs.PetersenGraph() > sage: view(G) works for me with Sage 9.8.beta0 > > produced the following error. > > An error occurred. > This is pdfTeX, Version

[sage-devel] View issues

2022-09-27 Thread Ben Salisbury
Hi all, I'm having trouble with the view method. For example, sage: G = graphs.PetersenGraph() sage: view(G) produced the following error. An error occurred. This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex 2022.9.9) 17 SEP 2022 18:58 entering

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Matthias Koeppe
I've created https://github.com/sagemath/sage-gh-templates-sandbox for playing with Issue and PR templates. On Friday, September 23, 2022 at 12:50:05 PM UTC-7 Matthias Koeppe wrote: > I think part of a solution could be PR templates, which add structure to > the PR description (= the first

Re: [sage-devel] Temporary files problems

2022-09-27 Thread John H Palmieri
I created https://trac.sagemath.org/ticket/34593: we should document how to change the location of the temporary directory, and maybe we should create a `.tmpreaper` file. On Tuesday, September 27, 2022 at 11:06:01 AM UTC-7 Michael Orlitzky wrote: > On Tue, 2022-09-27 at 18:10 +0100, Dima

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Michael Orlitzky
On Tue, 2022-09-27 at 18:10 +0100, Dima Pasechnik wrote: > Basically, we should deprecate and remove tmp_dir() and tmp_filename() > from Sage. > Does Sagecell use them? It should not, Python3 has perfectly good > replacements... > That was always the plan. From #33213: > Afterward, the custom

[sage-devel] Re: Temporary files problems

2022-09-27 Thread Matthias Koeppe
https://manpages.ubuntu.com/manpages/bionic/man8/tmpreaper.8.html suggests "As long as there are files present inside a subdirectory, it won't get removed. You can use a non-writable, self-owned file, perhaps named ".tmpreaper", or, if you are su, a file that has the ext2fs *immutable*

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Dima Pasechnik
On Tue, 27 Sep 2022, 18:38 Andrey Novoseltsev, wrote: > On Tuesday, 27 September 2022 at 11:11:00 UTC-6 dim...@gmail.com wrote: > >> Basically, we should deprecate and remove tmp_dir() and tmp_filename() >> from Sage. >> Does Sagecell use them? It should not, Python3 has perfectly good >>

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Matthias Koeppe
On Tuesday, September 27, 2022 at 10:21:15 AM UTC-7 John H Palmieri wrote: > On Tuesday, September 27, 2022 at 8:33:01 AM UTC-7 dim...@gmail.com wrote: > >> >> tempfile.TemporaryDirectory(*suffix=None*, *prefix=None*, *dir=None*, >> *ignore_cleanup_errors=False*) >> >> dir= may be used to set a

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Andrey Novoseltsev
On Tuesday, 27 September 2022 at 11:11:00 UTC-6 dim...@gmail.com wrote: > Basically, we should deprecate and remove tmp_dir() and tmp_filename() > from Sage. > Does Sagecell use them? It should not, Python3 has perfectly good > replacements... > The problems that surfaces so far that I

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Matthias Koeppe
On Tuesday, September 27, 2022 at 3:29:10 AM UTC-7 tobias...@gmail.com wrote: > One more question: The current plan is to use the sagetrac-mirror repo as > the base for creating PRs but also to archived it. However, if I'm not > mistaken, that makes all branches in sagetrac-mirror readonly and

Re: [sage-devel] Temporary files problems

2022-09-27 Thread John H Palmieri
On Tuesday, September 27, 2022 at 10:11:00 AM UTC-7 dim...@gmail.com wrote: > Basically, we should deprecate and remove tmp_dir() and tmp_filename() > from Sage. > Does Sagecell use them? It should not, Python3 has perfectly good > replacements... > As long as we test everything on a

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Matthias Koeppe
On Tuesday, September 27, 2022 at 1:02:06 AM UTC-7 seb@gmail.com wrote: > Furthermore, it isn’t still clear to me how dependencies between PRs will > be visible (like in the Trac dependencies field). > This is an important point. See https://trac.sagemath.org/ticket/30363#comment:91 > ​

Re: [sage-devel] Temporary files problems

2022-09-27 Thread John H Palmieri
On Tuesday, September 27, 2022 at 8:33:01 AM UTC-7 dim...@gmail.com wrote: > > > On Tue, 27 Sep 2022, 15:45 John H Palmieri, wrote: > >> One of the issues is that code in Sage is using this temporary directory >> in the background; the user is not doing it and has no control over it. >>

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Dima Pasechnik
Basically, we should deprecate and remove tmp_dir() and tmp_filename() from Sage. Does Sagecell use them? It should not, Python3 has perfectly good replacements... On Tue, Sep 27, 2022 at 6:06 PM Matthias Koeppe wrote: > > Previous discussion -- in the ticket that made these changes to SAGE_TMP

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Matthias Koeppe
Previous discussion -- in the ticket that made these changes to SAGE_TMP --- https://trac.sagemath.org/ticket/33213#comment:11 On Tuesday, September 27, 2022 at 9:10:28 AM UTC-7 novo...@gmail.com wrote: > On Tuesday, 27 September 2022 at 03:22:47 UTC-6 dim...@gmail.com wrote: > >> On Tue, Sep

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Andrey Novoseltsev
On Tuesday, 27 September 2022 at 03:22:47 UTC-6 dim...@gmail.com wrote: > On Tue, Sep 27, 2022 at 3:58 AM Andrey Novoseltsev > wrote: > > this temporary directory is created and then used ever after. But what > if it gets deleted? > I think it's meant to be used in a context manager, i.e.

Re: [sage-devel] Re: specification of __bool__

2022-09-27 Thread 'Martin R' via sage-devel
OK. On Tuesday, 27 September 2022 at 17:50:04 UTC+2 David Roe wrote: > Nils put it well; please don't change __bool__ for p-adic and power > series. It should be compatible with equality testing. > David > > On Tue, Sep 27, 2022 at 11:44 AM Nils Bruin wrote: > >> It seems attractive that for

Re: [sage-devel] Re: specification of __bool__

2022-09-27 Thread David Roe
Nils put it well; please don't change __bool__ for p-adic and power series. It should be compatible with equality testing. David On Tue, Sep 27, 2022 at 11:44 AM Nils Bruin wrote: > It seems attractive that for numerical types, bool(a) gives that same > result as "not(a==0)", which would

[sage-devel] Re: specification of __bool__

2022-09-27 Thread Nils Bruin
It seems attractive that for numerical types, bool(a) gives that same result as "not(a==0)", which would hopefully be the same as "a!=0". It is definitely the case that O(t^5) == 0 is a lot more useful for computations. For instance, with that in place, Gaussian elimination will actually

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Dima Pasechnik
On Tue, 27 Sep 2022, 15:45 John H Palmieri, wrote: > One of the issues is that code in Sage is using this temporary directory > in the background; the user is not doing it and has no control over it. > Regardless of the context manager approach, apparently some browsers refuse > to open local

Re: [sage-devel] Temporary files problems

2022-09-27 Thread John H Palmieri
One of the issues is that code in Sage is using this temporary directory in the background; the user is not doing it and has no control over it. Regardless of the context manager approach, apparently some browsers refuse to open local files that are not in the user's home directory, so this

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Dima Pasechnik
On Tue, 27 Sep 2022, 14:08 Tobias Diez, wrote: > Yes, the target repo of these PRs will be the (new) sagemath/sage, but the > source will be sagemath/sagetrac-mirror, right? Hmm, I might have missed something - what is the need to have 2 repos here, if 1 is sufficient? Any fork of

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Tobias Diez
Yes, the target repo of these PRs will be the (new) sagemath/sage, but the source will be sagemath/sagetrac-mirror, right? So in order to update the pull request one needs to push the changes to sagemath/sagetrac-mirror (it is not possible to update a PR by pushing to /refs/pull/xyz, because

[sage-devel] specification of __bool__

2022-09-27 Thread 'Martin R' via sage-devel
I think that x.__bool__ should return True only if x is *known* to be zero. I have three docstrings that support this view: rings/real_mpfi.pyx\03905:def __bool__(self): rings/real_mpfi.pyx\03906-""" rings/real_mpfi.pyx\03907-Return ``True`` if ``self`` is not known to be

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Dima Pasechnik
On Tue, Sep 27, 2022 at 11:29 AM Tobias Diez wrote: > > One more question: The current plan is to use the sagetrac-mirror repo as the > base for creating PRs but also to archived it. However, if I'm not mistaken, > that makes all branches in sagetrac-mirror readonly and thus one cannot >

[sage-devel] Re: is there a convention for _bool_ was: is it intentional that prod does not stop when it hits 0?

2022-09-27 Thread Marc Mezzarobba
Vincent Delecroix wrote: > Though these are specifications for SR and does > not apply to the entire library. It is not clear to me what global > specification we could have for bool(algebraic expression). Something like "bool(x) iff x is not trivially zero" would make sense to me, where "not

Re: [sage-devel] is there a convention for _bool_ was: is it intentional that prod does not stop when it hits 0?

2022-09-27 Thread Vincent Delecroix
You are right of course (my bad): bool(expr) could be considered as being True according to these specifications (and anyway "True" is always a good answer). Though these are specifications for SR and does not apply to the entire library. It is not clear to me what global specification we could

Re: [sage-devel] is there a convention for _bool_ was: is it intentional that prod does not stop when it hits 0?

2022-09-27 Thread 'Martin R' via sage-devel
I am reading this differently, but that may be my lack of knowledge of English. I thought "Return True, unless provably zero" would give true, if something cannot be shown to be zero. Martin On Tuesday, 27 September 2022 at 12:21:12 UTC+2 vdelecroix wrote: > On Tue, 27 Sept 2022 at 11:58,

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread Tobias Diez
One more question: The current plan is to use the sagetrac-mirror repo as the base for creating PRs but also to archived it. However, if I'm not mistaken, that makes all branches in sagetrac-mirror readonly and thus one cannot continue working on existing PRs by pushing to the corresponding

Re: [sage-devel] is there a convention for _bool_ was: is it intentional that prod does not stop when it hits 0?

2022-09-27 Thread Vincent Delecroix
On Tue, 27 Sept 2022 at 11:58, 'Martin R' via sage-devel wrote: > > > > On Friday, 23 September 2022 at 20:09:55 UTC+2 Nils Bruin wrote: >> >> On Friday, 23 September 2022 at 10:37:01 UTC-7 axio...@yahoo.de wrote: >>> >>> OK, this is off topic, but: shouldn't it be this convention? At least:

Re: [sage-devel] is there a convention for _bool_ was: is it intentional that prod does not stop when it hits 0?

2022-09-27 Thread 'Martin R' via sage-devel
On Friday, 23 September 2022 at 20:09:55 UTC+2 Nils Bruin wrote: > On Friday, 23 September 2022 at 10:37:01 UTC-7 axio...@yahoo.de wrote: > >> OK, this is off topic, but: shouldn't it be this convention? At least: >> shouldn't there be some convention? Maybe it would be good to discuss this

Re: [sage-devel] Temporary files problems

2022-09-27 Thread Dima Pasechnik
On Tue, Sep 27, 2022 at 3:58 AM Andrey Novoseltsev wrote: > > Hello! > > I've run into this while testing upgrades to Ubuntu 22.04 from 20.04, but it > seems that it comes from how temporary files are handled in Sage 9.7: > > TMP_DIR_FILENAME_BASE=tempfile.TemporaryDirectory() > > this temporary

[sage-devel] Re: Temporary files problems

2022-09-27 Thread 'Martin R' via sage-devel
I also have this problem when doing sage: qu = findstat("Permutations", compute_my_brand_new_permutation_statistic); qu St00: a new statistic on Permutations sage: qu.submit() which writes the information for findstat into a temporary file, and then opens a webbrowser to display it. On

Re: [sage-devel] DISCUSS: move Sage development to Github

2022-09-27 Thread seb....@gmail.com
Matthias Koeppe schrieb am Samstag, 24. September 2022 um 19:09:46 UTC+2: On Saturday, September 24, 2022 at 9:27:46 AM UTC-7 mathzeta2 wrote: > >> Is it possible to choose the issue numbers in GH when making a migration? >> Then, setting a redirect of the form " >>