[sage-devel] rebuilding Cython files in `conda` installation

2024-01-24 Thread Gareth Ma
Hi all, my development Sage installation uses the conda instructions here . There is a command below for how to recompile Cython files: pip install --no-build-isolation --confi

Re: [sage-devel] rebuilding Cython files in `conda` installation

2024-01-24 Thread Gareth Ma
ds, Gareth On 24/01/2024 16:37, Dima Pasechnik wrote: On 24 January 2024 15:58:56 GMT, Gareth Ma wrote: Hi all, my development Sage installation uses the conda instructions here <https://doc.sagemath.org/html/en/installation/conda.html#using-conda-to-provide-all-dependencies-for-the-sage-libra

Re: [sage-devel] Help needed with UniqueRepresentation (of SymmetricFunctions)

2024-02-05 Thread Gareth Ma
The following should show the problem: sage: from sage.structure.unique_representation import UniqueRepresentation : : class A(UniqueRepresentation): : def __init__(self, v=1): : self.v = str(v) : : A() == A() : A() is A() : A() == A(1) True True False

Re: [sage-devel] Problem extracting base B fractional digits of a number

2024-02-10 Thread Gareth Ma
I assume you should use floor division to preserve accuracy. As a numerical example, say you want the first 100 /decimal/ digits of 3 / 173. That's the same as floor(10^100 * 3 / 173). In [105]: from decimal import Decimal, getcontext ...: getcontext().prec = 300 ...: print(10**100 *

Re: [sage-devel] add transformation matrix interface for BKZ

2024-02-11 Thread Gareth Ma
Regarding fplll and flatter, Sage already has an interface with fplll (via fpylll), and issue #37207 is adding an interface call to flatter (the new pari implementation). On 11/02/2024 23:48, user ctf wrote: Hi. sage-devel members. I am kiona. I want to contribute devel for some math/crypto pa

Re: [sage-devel] Re: Problem extracting base B fractional digits of a number

2024-02-11 Thread Gareth Ma
Yes, because 1 / 2 is mathematically infinite in base 3, just like how A=1/3 and B=10 doesn't terminate. On 12/02/2024 07:31, Georgi Guninski wrote: On Sat, Feb 10, 2024 at 6:24 PM Georgi Guninski wrote: ``` def base_B_digits(A, B,prot=False): digits=[] fractional_part = A - int(A)

[sage-devel] Question about coercion model

2024-02-12 Thread Gareth Ma
Hi all, I am currently torturing myself by looking at the coercion model. I saw this line which I have questions about, in particular about its interaction with Python objects. Take the following code f

Re: [sage-devel] Re: Question about coercion model

2024-02-13 Thread Gareth Ma
epr__(self): return f"Number({self.x})" : def _mul_(self, other): return Number(self.x * ZZ(other)) : : a = Number(5) : a * ZZ(3) : a * int(3) Number(15) Number(15) ``` On 12/02/2024 17:43, Nils Bruin wrote: On Monday 12 February 2024 at 03:21:36 UTC-8 Gareth Ma wro

[sage-devel] Opinions needed from cryptographers

2024-02-13 Thread Gareth Ma
Hi all, I have created issue #37305 to collect ideas about cryptography in Sage. If you have used Sage (or Python) for cryptography before, or just has any opinions about the prompt, please discuss them there. Thanks!

[sage-devel] Re: [Proposal] allow standard packages to be pip packages, reduce source tarball size

2024-02-22 Thread Gareth Ma
Can someone from this list confirm that the PR Matthias linked (#37411) is okay i.e. not the topic of the debate in this thread? The added documentation seems harmless to me, advertises using git worktree, and can be updated when the discussion in this thread has a conclusion e.g. if upstream i

Re: [sage-devel] Re: Degree of the zero polynomial ring for `LaurentPolynomialRing`

2024-03-01 Thread Gareth Ma
I lean towards setting it to -∞. While we are at this, how should `R.random_element` be called? The method currently takes a `degree` argument, which is a tuple of lower and upper bound, and if the user sets the lower bound to -1, then `0` is a possible outcome. Would the user call it with `de

Re: [sage-devel] Re: Degree of the zero polynomial ring for `LaurentPolynomialRing`

2024-03-01 Thread Gareth Ma
And that will be a problem when `R` is a laurent polynomial ring. On 01/03/2024 09:12, Gareth Ma wrote: I lean towards setting it to -∞. While we are at this, how should `R.random_element` be called? The method currently takes a `degree` argument, which is a tuple of lower and upper bound

Re: [sage-devel] weirdest bug ever

2024-03-09 Thread Gareth Ma
You typed `mononomials` instead of `monomials`. That's a nono. On 09/03/2024 22:22, 'Martin R' via sage-devel wrote: If I store this in a file "bug.sage" I can do: sage: load('/home/martin/bug.sage') sage: c = bug() sage: c.coefficients_mononomials() -- You received this message because you a

[sage-devel] Question about Morphism and SchemeMorphism (Issue 14711)

2024-03-31 Thread Gareth Ma
I'm currently working on stuff related to `EllipticCurveHom` and `SchemeMorphism` at #37705. While working on it, I realised there's a fundamental difference between the two `EllipticCurveHom` inherits from `sage.categories.morphism.Morphism`, while `SchemeMorphism` inherits from `sage.schemes.

[sage-devel] Re: Question about Morphism and SchemeMorphism (Issue 14711)

2024-04-02 Thread Gareth Ma
eaning the operation defined in Morphism/Map will be ignored, which is undesirable since well a SchemeMorphism should be more like a morphism not a module element I guess (Sorry for the spam on Easter holidays) On 01/04/2024 04:34, Gareth Ma wrote: I'm currently working on stuff related to `E

[sage-devel] Projective Spaces are not not cached

2024-06-11 Thread Gareth Ma
In the documentation of `ProjectiveSpace` constructor, it says > Projective spaces are not cached, i.e., there can be several with > the same base ring and dimension (to facilitate gluing > constructions). However, that doesn't seem to be true, since (1) it's a `UniqueRepresentation`, and (2) `Pr

Re: [sage-devel] Re: Vote: Removing Automatic PR Size Labels

2024-06-15 Thread Gareth Ma
I vote for (A1) and no other options. In fact, I don't think size related labels should be a thing at all, so the second half of (A1), i.e. "the[y] must be added manually (like most other labels)", should preferably be removed as well. (The wording suggests they will be kept and added manually.)

Re: [sage-devel] Bug in `discrete_log(...,bounds=(1,p.isqrt()))`

2024-06-30 Thread Gareth Ma
I think so too. Here's a more minimal version (note a == 1 in your example): p = 31 g = GF(31)(3) discrete_log(1, g, bounds=(1, 6), algorithm="lambda", operation="*") # 6 g^6 # 16 It seems there's some serious bugs going on, as the return value isn't in the bounds: K = GF(2^61 - 1) d = discrete_

[sage-devel] fflas-ffpack install fail

2024-07-31 Thread Gareth Ma
Hi, I'm running `make build` on latest dev branch, and I get the following error: ``` Error building Sage. The following package(s) may have failed to build (not necessarily during this run of 'make all-build'): * package: fflas_ffpack-2.5.0+sage-2024-05-18b last build time: Jul 31 18

[sage-devel] Re: fflas-ffpack install fail

2024-08-02 Thread Gareth Ma
Bumping this thread, since it's stopping me from reviewing tickets :) On Wednesday 31 July 2024 at 20:11:42 UTC+1 Gareth Ma wrote: > Hi, I'm running `make build` on latest dev branch, and I get the following > error: > > ``` > Error building Sage. > > The followin

Re: [sage-devel] Re: fflas-ffpack install fail

2024-08-02 Thread Gareth Ma
.g. if a > different C++ compiler was used) > > > On Fri, Aug 2, 2024 at 1:24 PM Gareth Ma wrote:M >> >> Bumping this thread, since it's stopping me from reviewing tickets :) >> >> On Wednesday 31 July 2024 at 20:11:42 UTC+1 Gareth Ma wrote: >>> >&g

Re: [sage-devel] Re: meson build doesn't find cysignals?

2025-01-01 Thread Gareth Ma
Content of /home/grhkm/git/sage/build/cp311/meson-logs/meson-log.txt: https://gist.github.com/grhkm21/21dea0c9b2f3b712f91f926757863045 (The conda environment is now called `sage-dev-2`) Yes, importing `cysignals.signals` works in the conda python. I guess because it's installed in `$CONDA_PREFIX

[sage-devel] meson build doesn't find cysignals?

2025-01-01 Thread Gareth Ma
I am trying to use the `meson` build method instead of conda-forge for dependencies. I installed the build dependencies following [prerequisites](https://doc.sagemath.org/html/en/installation/source.html#section-prereqs), then run these commands ```sh conda remove -n sage-dev --all # remove the en

[sage-devel] GSoC 2025 Applications

2025-02-05 Thread Gareth Ma
Are we applying to become a GSoC organisation this year? Have we done so? -- 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.

[sage-devel] Patching Sage's Python's packages

2025-01-31 Thread Gareth Ma
Not sure how to title the subject because I am not familiar with Sage's build system at all, but hope the body explains what it means. === Usually, I build Sage with `./bootstrap && ./configure && make build`, but I believe the same problem below happens for conda install as well (the set

Re: [sage-devel] Subgroups of automorphism groups of graphs

2025-01-28 Thread Gareth Ma
It seems that this is intended? The correct equivalent code is: sage: gens = [[(2, 4)], [(1, 2)]] sage: pg = PermutationGroup(gens=gens); pg Permutation Group with generators [(2,4), (1,2)] sage: pg._libgap_() Group([ (2,4), (1,2) ]) sage: pg = PermutationGroup(gens=gens, domain={1, 2, 4}); pg Per