[sage-devel] Re: short python3 report (March of the last python2 year)

2019-03-07 Thread Simon King
Hi Erik, On 2019-03-07, E. Madison Bray wrote: > This is completely normal: > https://en.wikipedia.org/wiki/Rounding#Round_half_to_even Thanks for the pointer. >> If I understand correctly, Sage currently uses .round() for customised >> rounding. Would it be a good idea to add a .__round__() me

[sage-devel] Re: short python3 report (March of the last python2 year)

2019-03-07 Thread Simon King
Hi Erik, On 2019-03-06, E. Madison Bray wrote: > and also Python 2 always rounds half-integers up, whereas > Python 3 rounds even half-integers down and odd half-integers up. What the heck?? Is there any widely accepted industry standard for that "odd" rule? Why not round down half-integers whos

[sage-devel] Re: `ModuleElement` is forced though `Element` should be enough by the category framework

2019-02-26 Thread Simon King
Hi Jeroen, On 2019-02-27, Jeroen Demeyer wrote: > By the way, why is it an issue in the first place? Is there any reason > why you don't want to inherit from ModuleElement? I don't know what Kwankyu has in mind, but conceivably it is possible to have a parent that, depending on input parameters

[sage-devel] Re: `ModuleElement` is forced though `Element` should be enough by the category framework

2019-02-26 Thread Simon King
Hi Kwankyu, On 2019-02-26, Kwankyu Lee wrote: > Since my parent is in the category of modules over QQ, then I think > elements of the parent should be automatically treated as module elements, > and using `Element` should just be ok. > > What do you think? I think that speed matters. I see m

[sage-devel] Re: Valgrind - how to?

2019-02-12 Thread Simon King
Hi again, On 2019-02-12, Simon King wrote: > If I recall correctly, valgrind would be able to report leaking memory. > But how to use it in Sage? > > I guess `sage -i valgrind` is the first step. But then? `make start`? > `sage -ba`? Can you also point me to a valgrin

Re: [sage-devel] Valgrind - how to?

2019-02-12 Thread Simon King
Hi Justin, Am Dienstag, 12. Februar 2019 21:45:44 UTC+1 schrieb Justin C. Walker: > > I can’t answer most of your questions, but for the last, internet search > is your friend… > > Of course I did search before asking. However, I believe that recommendations of people who have actually read a m

[sage-devel] Valgrind - how to?

2019-02-12 Thread Simon King
Hi! Working at #27261, it seems to me that there is a memory leak somewhere either in Sage's use of libsingular, or in libsingular internally. If I recall correctly, valgrind would be able to report leaking memory. But how to use it in Sage? I guess `sage -i valgrind` is the first step. But then

[sage-devel] Re: issues (memory leak + slowness) with multivariate polynomials

2019-02-12 Thread Simon King
Hi Dima, On 2019-02-12, Dima Pasechnik wrote: > it fixes the leak in the 1st example, but not in the 2nd, according to my > test. First I thought so, too. But it seems that the leak has only been /partially/ fixed. sage: R. = ZZ[] sage: import gc sage: P = (X+Y)^120*Y^100 sage: mem0 = get_memo

[sage-devel] Re: issues (memory leak + slowness) with multivariate polynomials

2019-02-12 Thread Simon King
Dear Nadim, On 2019-02-12, Nadim Rustom wrote: > Just to clarify, I didn't mean to ask whether #13447 itself is causing the > problem, I was just wondering if these problems were known and whether > #13447 was meant to fix the memory leak and speed problem. Thanks for your > efforts. No probl

[sage-devel] Re: issues (memory leak + slowness) with multivariate polynomials

2019-02-12 Thread Simon King
Hi Nadim, On 2019-02-12, Nadim Rustom wrote: > The following shows a small memory leak: > R. = ZZ[] > > > P = (X+Y)^120*Y^100 > > > mem1 = get_memory_usage() > for i in range(100): > Q = P(X,Y) > mem2 = get_memory_usage() > > > print mem2 - mem1 > > > whereas the following gives a much bigger

[sage-devel] Re: Trac #22029: Python 3 style comparisons

2019-02-05 Thread Simon King
On 2019-02-05, Jeroen Demeyer wrote: > The change in the code is quite small, but the implications are big, so > that's why I wanted to mention it here on sage-devel. Out of curiosity: How many existing tests fail for that reason? Even though the implications are big, I suppose we do not have ma

[sage-devel] Re: Python 3: gap interface issue

2019-02-03 Thread Simon King
Hi Nathan, On 2019-02-04, Nathan Dunfield wrote: > On Sage 8.6 with Python 2, the following command produces the expected > result (namely, a sage.interfaces.gap.GapElement): > > sage: gap('0') > 0 > > whereas in Sage 8.6 with Python 3 I get the following error: Works for me. In Sage 8.7.beta1

[sage-devel] Re: Python 3: adding object to a category

2019-02-03 Thread Simon King
Hi Nathan, On 2019-02-04, Nathan Dunfield wrote: > On Sunday, February 3, 2019 at 2:22:33 AM UTC-6, Frédéric Chapoton wrote: >> >> git grep "@add_metaclass" src/sage >> >> will give you plenty of examples on how to add metaclasses in a py3 >> compatible way >> > > Frédéric, > > Thanks for the p

[sage-devel] Re: Python 3: adding object to a category

2019-02-03 Thread Simon King
Hi Nathan, Am Sonntag, 3. Februar 2019 12:59:50 UTC+1 schrieb Simon King: > > Hi Nathan, > > You approach to make SnapPyNumbers be recognised as a field is not > very efficient. Better provide the category during Parent.__init__, > which is how the category framework is s

[sage-devel] Re: Python 3: adding object to a category

2019-02-03 Thread Simon King
Hi Nathan, You approach to make SnapPyNumbers be recognised as a field is not very efficient. Better provide the category during Parent.__init__, which is how the category framework is supposed to be used anyway. Your approach: sage: from sage.misc.classcall_metaclass import ClasscallMetaclass sa

[sage-devel] Re: How to efficiently pickle a block of memory?

2019-02-02 Thread Simon King
Hi Nils, On 2019-02-02, Nils Bruin wrote: > PyByteArray_AsString > > should get you a pointer to the memory block (as a chr*). Cython refuses to compile it, because "Storing unsafe C derivative of temporary Python reference" How can that be solved? Best regards, Simon -- You received this

[sage-devel] Re: How to efficiently pickle a block of memory?

2019-02-02 Thread Simon King
On 2019-02-02, Simon King wrote: > On 2019-02-02, Nils Bruin wrote: >> PyByteArray_AsString >> >> should get you a pointer to the memory block (as a chr*). > > Cython refuses to compile it, because > "Storing unsafe C derivative of temporary Python reference

[sage-devel] Re: How to efficiently pickle a block of memory?

2019-02-02 Thread Simon King
Hi Nils, On 2019-02-02, Nils Bruin wrote: > C-api: > > PyBytes_FromStringAndSize(NULL, length) > > ... > Of course, you probably want to be efficient and maybe use memcpy to > transfer the data, or something similar. On C-api level you should just be > able to get a pointer to the actual memory

[sage-devel] How to efficiently pickle a block of memory?

2019-02-02 Thread Simon King
Hi! Bitsets (sage.data_structures.bitset) as well as MeatAxe matrices (sage.matrix.matrix_gfpn_dense) pickle their data as follows: - Allocate enough memory to some some char* s. - Put data into the region pointed at by s. - Convert s into a python object py_s of type "bytes". - release the memory

[sage-devel] Re: Help : best way to compile a package sphinx's documentation during spkg-install

2019-01-31 Thread Simon King
Hi Sébastien, On 2019-01-31, Sébastien Labbé wrote: > I do not know if this helps, but I do it this way in my optional package: > > doc: > cd docs && sage -sh -c "make html" > > doc-pdf: > cd docs && sage -sh -c "make latexpdf" Interesting. Isn't the spkg installation happening in a Sage

[sage-devel] Re: Help : best way to compile a package sphinx's documentation during spkg-install

2019-01-31 Thread Simon King
On 2019-01-31, Vincent Klein wrote: > Thanks for your answer. > I don't know exactly why it works with sagenb but doing the same with pplpy > doesn't work > #spkg-install > > cd src && sdh_pip_install . > > cd docs > $MAKE html I would like to know it, too. With p_group_cohomology, if I recall c

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Jeroen, On 2019-01-27, Jeroen Demeyer wrote: > On 2019-01-27 22:36, Simon King wrote: >> But do py3 experts agree that to transform os.path.join(...) to char* >> (which is not in pickling but in module initialisation), I need >> PyString_...? > > No! Please see

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
PS: On 2019-01-27, Simon King wrote: > The funny thing is that 2 years ago, I was told by Jeroen: > """ > For Python 3 compatibility, you should use bytes instead of str for > pickling. > > This means changing the PyString_... functions to PyBytes_...

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi, On 2019-01-27, Simon King wrote: > Is there a ticket for meataxe on python 3 already? I guess not. So, > unless someone stops me in the next hour or so, I'll open one... I created https://trac.sagemath.org/ticket/27152. First problem: In py2, PyBytes_AsString(os.path.join(DOT_SA

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Dear all, using "git worktree", I now have both python 2 and python 3 versions of Sage on my computer. Thank you! Of course, I started to check packages that I care about --- and immediately found a problem with the "meataxe" optional package. When trying to create a matrix of type Matrix_gfpn_d

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Frédéric, On 2019-01-27, Frédéric Chapoton wrote: > Does this mean that everything dependent on python will have to be > recompiled when you switch ? My original worktree was ~/Sage/git/sage. I added a new worktree ~/Sage/git/py3 using "git worktree add". The fact that ~/Sage/git/sage/local

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Timo, On 2019-01-27, Timo Kaufmann wrote: > Git worktrees would be a solution. Essentially you keep one git repository, > but check out two branches at the same time in different directories. From > your main repo do this: > > $ git worktree add /path/to/the/new/checkout branch-to-checkout

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Vincent, On 2019-01-27, Vincent Delecroix <20100.delecr...@gmail.com> wrote: >> king@klap:~/Sage/py3/sage$ git remote add trac >> g...@trac.sagemath.org:sage.git > > After that, you should see "trac" among your remotes > > $ git remote -v > > And "origin" should be your local repo. Correct!

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Vincent, On 2019-01-27, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > This has nothing to do with python 3. Sure. > You only need to set up > properly your remote and branches. Exactly. And that's already more than what I can do in git without reading tons of documentation. > After

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Frédéric, On 2019-01-27, Frédéric Chapoton wrote: > I am pretty sure you would be rather happy working only with python3. That's too early. For teaching, I need to know that I have a working Sage installation, and for research I also have to have a working installation of my group cohomology

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Vincent, On 2019-01-27, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > You need a different clone of your git repo, let say sage-py3. 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" wou

[sage-devel] Re: python3 status report

2019-01-27 Thread Simon King
Hi Frédéric, On 2019-01-27, Frédéric Chapoton wrote: > (2) the most badly failing file is "explain_pickle" with 70 failing > doctests. Hopefully, this will be treated very carefully by Erik M. Bray > > (3) after that, we still have problems with graph, where generic_graph.py > has 50 failing do

[sage-devel] Re: Startup time improvement in 8.6

2019-01-17 Thread Simon King
Hi all, On 2019-01-17, Nils Bruin wrote: > On Thursday, January 17, 2019 at 12:11:03 PM UTC-8, Timo Kaufmann wrote: >> >> Result: >> 8.5: 751.77ms >> 8.6: 1033.39ms >> >> Thats 1/3rd improvement! Thanks to whoever is responsible for this. >> >> Did you mislabel those results? I would think that f

[sage-devel] Re: CachedInParentMethod clear cache

2019-01-07 Thread Simon King
Hi! On 2019-01-07, E. Madison Bray wrote: > On Tue, Dec 18, 2018 at 5:29 PM VulK wrote: >> Unfortunately this is not the case; this method store its cache *both* in the >> parent and in the element. Apparently this was done in #8611 for speed >> reasons. I do not really understand the rationale

[sage-devel] How to work with Singular's superCommutative via libsingular?

2019-01-02 Thread Simon King
Hi! In the past I intensely used pexpect interfaces to GAP and even more to Singular. Recently I switched to using libgap, which turned out to be a good idea. Now I consider to replace "singular-via-pexpect" by libsingular. But I got stuck very early. Setting: I am dealing with graded-homogeneous

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
Hi Dima, On 2019-01-01, Dima Pasechnik wrote: > here is the full list of GAP packages in gap spkg now: > > GAPDoc > primgrp - packages in "old" database_gap > SmallGrp Excellent! > transgrp > tomlib > atlasrep - their dependencies in GAP 4.10: Atlasrep? Whow, even better! Thank you for the i

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
Hi Volker, On 2019-01-01, Volker Braun wrote: > On Tuesday, January 1, 2019 at 1:32:22 PM UTC+1, Simon King wrote: >> >> When will that be? > > Now ;-) Great! I was afraid that I needed to wait more. Can I conclude that the comment "merge conflict" without in

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
On 2019-01-01, Volker Braun wrote: > The by far easiest solution, both to getting the code and figuring out what > the conflict is, is to wait until the next beta release. When will that be? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To un

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
On 2019-01-01, Volker Braun wrote: > gap is standard, gap_packages is optional > > $ cat build/pkgs/gap/type > standard > $ cat build/pkgs/gap_packages/type > optional I had a look at #22626, where some comments indicate that database_gap is becoming fully *standard*. On the other hand, comments

Re: [sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
Am Dienstag, 1. Januar 2019 12:33:10 UTC+1 schrieb Samuel Lelievre: > > Ticket 26856 should fix that. > > https://trac.sagemath.org/ticket/26856 > Technical question: How to checkout the ticket branch? I tried git trac checkout 26856 but it fails. -- You received this message because

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
On 2019-01-01, Samuel Lelievre wrote: > Ticket 26856 should fix that. > > https://trac.sagemath.org/ticket/26856 Should fix *what* exactly? OK, I understood that database_gap got merged into gap_packages. But is gap_packages now standard? In that case, one has to *remove* "database_gap" from t

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
Hi Volker, Am Dienstag, 1. Januar 2019 11:40:05 UTC+1 schrieb Volker Braun: > > database_gap has been removed (the functionality is now merged into > gap/gap_packages) > Perhaps you can provide another clarification: On #26001, you claim that there is a merge conflict, but you didn't tell what

[sage-devel] Re: error installing database-gap

2019-01-01 Thread Simon King
Hi all, On 2019-01-01, Volker Braun wrote: > database_gap has been removed (the functionality is now merged into > gap/gap_packages) Then I need a clarification. I got the impression that the SmallGroups library, that used to be provided by database_gap, is now installed by default. But by wh

[sage-devel] Re: Single instance of R only

2018-12-26 Thread Simon King
Hi Dima, On 2018-12-26, Dima Pasechnik wrote: >> 1. Creating examples in the doc strings. Reason: I simply don't know >>how to express the GAP command >> Group( [ (1,2)(3,8)(4,6)(5,7), (1,3)(2,5)(4,7)(6,8) ] ) >>in libgap. I tried >>libgap.Group( [ ((1,2),(3,8),(4,6),(5,7)), ((1

[sage-devel] Re: Single instance of R only

2018-12-26 Thread Simon King
Hi Dima, On 2018-12-26, Dima Pasechnik wrote: > E.g. do not do > > G = libgap('DihedralGroup(8)') > > instead do > > G = libgap.DihedralGroup(8) Sure, that's what I do. I also used to do gap.DihedralGroup(8), which works just as well. I just chose an example to point out that the two call method

[sage-devel] Re: Single instance of R only

2018-12-26 Thread Simon King
Hi Dima, On 2018-12-26, Dima Pasechnik wrote: >>> No, it does, by tradiation: >>> AFAIK, *ALL* interfaces that are named after a third-party computer algebra > > if you count ECL in, the interface with it is not pexpect, yet it is > called ecl, not libecl. Right. I wasn't aware of ecl. >> proje

[sage-devel] Re: Single instance of R only

2018-12-25 Thread Simon King
Hi Timo. On 2018-12-25, Timo Kaufmann wrote: > I don't really see a reason to rename it. The old name doesn't suggest that > it is implemented with pexpect. No, it does, by tradiation: AFAIK, *ALL* interfaces that are named after a third-party computer algebra projects (gap, singular, r, pari,

[sage-devel] Re: Python 3 startup time speedup

2018-12-17 Thread Simon King
Hi Erik, On 2018-12-17, E. Madison Bray wrote: > For those of you interested in following the Python 3 port of Sage, > you'll be amused to learn that an effectively one line change [1] made > startup time of Sage on Python 3 about 20 times faster, and almost as > fast as on Python 2 (though still

[sage-devel] Re: merging gap_packages and database_gap spkgs into gap spkg

2018-12-16 Thread Simon King
Hi Dima, I'm installing database_gap and gap_packages anyway, so, I am +1 to making them standard and I am happy that the licence problems have finally been resolved. Best regards, Simon On 2018-12-15, Dima Pasechnik wrote: > The present design with two optional packages gap_packages and > data

[sage-devel] Re: Mystery of "GAP documented global functions"

2018-12-14 Thread Simon King
Hi Eric, On 2018-12-14, E. Madison Bray wrote: > sage: from sage.libs.gap.all_documented_functions import * > sage: DihedralGroup(8) > > sage: type(_) > > > Oops, this clobbers multiple existing built-ins in Sage. What's the problem? If you import something, the stuff you import will of course o

[sage-devel] Re: "COMPUTATIONAL MATHEMATICS WITH SAGEMATH"

2018-12-12 Thread Simon King
To the authors, After skimming through the table of contents and reading just a single page of text, I already learnt something that I can use in class tomorrow. Thank you very much!!! Simon On 2018-12-12, William Stein wrote: > "COMPUTATIONAL MATHEMATICS WITH SAGEMATH" is now in English and >

[sage-devel] Re: Weak references in the coercion model

2018-12-06 Thread Simon King
On 2018-12-06, Simon King wrote: > Hopefully it is explained in #26790; I'll have a look... Sorry, must be another ticket. #26811, I guess. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and sto

[sage-devel] Re: Weak references in the coercion model

2018-12-06 Thread Simon King
Hi Jeroen, On 2018-12-06, Jeroen Demeyer wrote: > * The domain and codomain store MultiWeakref references to the map, > where one of those references is weak and one is strong. And if I understand correctly what you said in another post, it is *dynamically* determined which reference is weak an

[sage-devel] Re: Weak references in the coercion model

2018-12-05 Thread Simon King
Hi Jeroen, On 2018-12-05, Jeroen Demeyer wrote: > On 2018-12-05 14:54, Simon King wrote: >> o Mild problem: If there is an external strong reference to, say, >> f, then it is possible that Q becomes garbage collected anyway, >> and we would end u

[sage-devel] Re: Weak references in the coercion model

2018-12-05 Thread Simon King
Hi Erik, On 2018-12-05, E. Madison Bray wrote: >> Has that changed? I recall that in my early days in Sage (when I created the >> first version of my group cohomology package) I had to remove some __del__ >> method (or change it into a __dealloc__ method), since otherwise some >> reference cyc

[sage-devel] Re: Weak references in the coercion model

2018-12-05 Thread Simon King
Am Mittwoch, 5. Dezember 2018 13:38:03 UTC+1 schrieb Volker Braun: > > On Wednesday, December 5, 2018 at 6:52:55 AM UTC-5, Simon King wrote: >> >> - If there is a reference cycle involving one instance with a __del__ >> method, then Python would not apply garbage

[sage-devel] Re: Weak references in the coercion model

2018-12-05 Thread Simon King
Hi Jeroen, Am Montag, 3. Dezember 2018 11:46:50 UTC+1 schrieb Jeroen Demeyer: > > I am studying the coercion model in detail, looking for optimization > opportunities. One source of slow-down is the use of weak references. > > Over time, more and more places in Sage use weak references. But I'd

[sage-devel] Re: Weak references in the coercion model

2018-12-05 Thread Simon King
Hi Steven, On 2018-12-05, Steven Craighead wrote: > How difficult is it to create a stack that can control the order of objects > being created and destroyed so you prevent leaks? Can you add a new method > on your base class that is inherited to all children to track this? One basic principle

[sage-devel] Re: Fwd: [sage-trac] #26795: Some memory leaks

2018-12-03 Thread Simon King
Hi! On 2018-12-03, Jori =?ISO-8859-1?Q?M=E4ntysalo?= wrote: > I grepped the source, and this was the only __destruct__(). Of course > there might be other misnamed methods. By > > egrep -R 'def __d[^ (]+' src/sage -o --no-filename | colrm 1 4 | sort | uniq > -c | sort -rn > > I found only __del

Re: [sage-devel] Re: A Sage interface for FGb (Gröbner bases)

2018-11-27 Thread Simon King
Hi Bernard, On 2018-11-27, parisse wrote: > I meant a more efficient elimination order like double revlex. Actually I've never heard of that. The only reference I could find with duckduckgo was the phrase "Fast Gröbner basis f4 algorithm (revlex order and double revlex for elimination), fast

Re: [sage-devel] Re: A Sage interface for FGb (Gröbner bases)

2018-11-26 Thread Simon King
Hi! On 2018-11-26, parisse wrote: > not as complete: a quick look indicates that monomial ordering supported > are revlex and lex (no elimination, this is probably not hard to add), and > coefficients must belong to Z/pZ (support for Q would require more work...) What is your definition of "el

[sage-devel] Re: how to use a singular lib

2018-11-23 Thread Simon King
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 c

[sage-devel] Re: doctest quality and patchbots

2018-11-23 Thread Simon King
Hi Jeroen, On 2018-11-23, Jeroen Demeyer wrote: > On 2018-11-22 18:45, 'Martin R' via sage-devel wrote: >> 1) would it be easy and desirable to make the patchbots run tests in >> random order? > > Easy: yes > Desirable: no, it would create a lot of doctest failures ... whose fixing is likely to

[sage-devel] Re: Implementing rings of coordinates

2018-11-22 Thread Simon King
On 2018-11-22, Simon King wrote: > However, I believe it is bad usage to hard-code a certain class as > output of arithmetic errors. Oops. "errors" is an error, it should be "operations". -- You received this message because you are subscribed to the Google Grou

[sage-devel] Re: Implementing rings of coordinates

2018-11-22 Thread Simon King
Dear Salvatore, On 2018-11-21, VulK wrote: > is there any reason why `MPolynomialRing_polydict` > hardcodes `MPolynomial_polydict` as its element class? I believe it shouldn't hard-code it. > I would have expected something like > > ``` > class MPolynomialRing_polydict( MPolynomialRing_macaul

[sage-devel] Re: Implementing rings of coordinates

2018-11-21 Thread Simon King
Dear S., On 2018-11-20, VulK wrote: > I am trying to implement the ring of coordinates of a Lie group in the > perspective of Peter-Weyl theorem. > > Concretely I would like to define a polynomial ring with infinitely many > generators each depending on two points on a lattice. These generators

[sage-devel] Re: _l_action_ and _r_action_ not working?

2018-10-30 Thread Simon King
Hi Daniel, On 2018-10-30, Daniel Krenn wrote: > Do _l_action_ and _r_action_ actually work? I've already used that kind of methods in the past. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group

[sage-devel] Re: refresh the banner

2018-10-29 Thread Simon King
Hi Frédéric, On 2018-10-29, Frédéric Chapoton wrote: > (1) there is no longer any line about "notebook()" (because the legacy > sagenb is deprecated now) Why not mention the jupyter notebook instead? > (2) the python version which is used is displayed (because we will try to > switch to pytho

[sage-devel] Re: Is there a math alternative to range and interval?

2018-10-18 Thread Simon King
Hi Kwankyu, On 2018-10-18, Kwankyu Lee wrote: > I am teaching sage to a class of first year math students. Today I was > embarrassed when I tried > > [i.is_prime() for i in range(1,10)] > > because this raises an error. Until this point, I deliberately did not > mention that there are in fact

[sage-devel] Re: Limitations of libGAP

2018-10-05 Thread Simon King
r than what fits into the buffer size, use a temporary file. On > #25477, I was lazy and opted to do the quick fix of changing what I am > passing to libgap. +1 for addressing this. > > Best, > Travis > > > On Friday, October 5, 2018 at 8:39:37 PM UTC+10, Simon King wrot

[sage-devel] Limitations of libGAP

2018-10-05 Thread Simon King
Hi! I was expressing some group (in fact, libgap.SuzukiGroup(8)) as a permutation group (via regular permutation action) and took the string representation of that permutation group. Reason: GAP doesn't know how to pickle individual objects, but GAP can reconstruct a group from its string represen

[sage-devel] Re: embedding sage in c or c++

2018-09-28 Thread Simon King
Hi Abhishek, On 2018-09-29, Abhishek Kesarwani <1907a...@gmail.com> wrote: > > No, I am getting this error: > sage --python > Traceback (most recent call last): > File "", line 1, in > NameError: name 'sage' is not defined "sage --python" is the command that you should use on the command

[sage-devel] Re: Developer guide for casual user

2018-09-23 Thread Simon King
Hi Andy, On 2018-09-23, Andy Howell wrote: > I'd guess the word "tricks" was objectionable. What I meant was > techniques like locating the source using funcName? Now that I know that > exists, I can add it to my "practice". Discovering those though google > searches takes time. I'd rather have a

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-15 Thread Simon King
On 2018-09-11, Simon King wrote: > FWIW: I opened #26243, providing code to compute Hilbert series. It is > generally a bit slower than libsingular (not much), but does not suffer > from libsingular's 32-bit limitation. Meanwhile the work is done. It is *faster* than Singular an

[sage-devel] Re: Question on the features introduced by #20382

2018-09-12 Thread Simon King
Hi Jeroen, On 2018-09-12, Jeroen Demeyer wrote: > Why does a Python file care whether the normaliz library and headers are > installed? Now I'm looking at #25091 and it seems to me (but correct me > if I'm wrong) that you *really* care about the PyNormaliz Python module, > for which there is a

[sage-devel] Re: Question on the features introduced by #20382

2018-09-11 Thread Simon King
Hi Jeroen, On 2018-09-11, Jeroen Demeyer wrote: > On 2018-09-11 18:55, Simon King wrote: >> Specifically, I ask because of #25090/#25091: How can one test whether >> normaliz is installed? > > Use Cython: see src/sage/features/bliss.py for an example for the > "bli

[sage-devel] Re: No signature shown for methods

2018-09-11 Thread Simon King
Hi Erik, On 2018-09-11, Erik Bray wrote: > Oh right, thank you for the reminder. I could have sworn there *was* > something like that but I couldn't remember what it was. I think it > works by parsing the Cython sources IIRC. Correct. And in addition there are certain special methods (_sage_do

[sage-devel] Question on the features introduced by #20382

2018-09-11 Thread Simon King
Hi! In #20382, is_package_installed got replaced by "Features". I found out how to check for the presence of an executable. But how can one check with "Features" whether a certain c-library and its headers is installed? Specifically, I ask because of #25090/#25091: How can one test whether norma

[sage-devel] Re: No signature shown for methods

2018-09-11 Thread Simon King
Hi Erik, On 2018-09-11, Erik Bray wrote: > On Tue, Sep 11, 2018 at 9:57 AM Kwankyu Lee wrote: >> >> Hi, >> >> I wonder why help on a method does not show the signature: > > ... > In the meantime I don't know that there's a satisfactory workaround > (some kind of Sage-specific solution using deco

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-11 Thread Simon King
Hi! FWIW: I opened #26243, providing code to compute Hilbert series. It is generally a bit slower than libsingular (not much), but does not suffer from libsingular's 32-bit limitation. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel"

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-06 Thread Simon King
Done. On 2018-09-06, Dima Pasechnik wrote: > On Tue, Sep 4, 2018 at 10:15 AM Simon King wrote: >> Hannes wrote in the Singular forum > > I had an account for the Singular forum, it was linked to my employer's email > (back in 2005), long gone. I tried to create another a

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-04 Thread Simon King
Hi Dima, On 2018-09-04, Dima Pasechnik wrote: > M2 needs a libgc-compatible version of everything, including fflas. That's > probably why > two copies etc. > > > M2 is maintained and developed. What is not maintained is Sagemath's M2 > package. I see. In that case: *IF* someone explains to me ho

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-04 Thread Simon King
Hi Clement, On 2018-09-04, Clement Pernet wrote: > Le 02/09/2018 à 14:13, Simon King a écrit : >> /home/king/Projekte/Macaulay2/M2/M2/usr-host/include/fflas-ffpack/fflas/fflas_ftrsm_src.inl:279:27: >> error: ‘openblas_set_num_threads’ was not declare

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-04 Thread Simon King
FWIW: Hannes wrote in the Singular forum that he finds it a bad idea to use 64 bit integers, because it would behave differently on 32bit machines. He also argues that bigint vectors exist in Singular, since there are bigint *matrices* in Singular; right, but the syntax is different and thus it is

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-03 Thread Simon King
Hi Dima, On 2018-09-03, Dima Pasechnik wrote: > once you have a github account, which is trivial to get, go to > https://github.com/Singular/Sources/issues > > and click on New Issue (a big green button)... Actually this is what I did yesterday. I remembered that once upon a time I created a git

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi Volker, On 2018-09-02, Simon King wrote: > The non-similarities: > ... > - Your code is recursive. I replace the recursion by a loop, as at some > point the recursion went over the permitted limit. I just tested: Your code also gives an error because of recursion. So, here are

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi Dima, On 2018-09-02, Dima Pasechnik wrote: > On Sun, 2 Sep 2018, 17:53 Simon King, wrote: >> On 2018-09-02, Dima Pasechnik wrote: >> > It would be good to submit a Singular bug report with an example at >> > https://github.com/Singular/Sources >> >>

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi Dima, On 2018-09-02, Dima Pasechnik wrote: > It would be good to submit a Singular bug report with an example at > https://github.com/Singular/Sources I guess I should rather file it in the Singular trac. Well, I'll wait to see if a post in the Singular forum helps :-) > It's silly to see an

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi Volker, On 2018-09-02, Volker Braun wrote: > FWIW I once wrote a monomial ideal implementation in Sage/Cython, probably > for some related reason though I forget exactly why I couldn't use > Singular. Its presumably similar to the code you wrote already. It doesn't > do weights but does imp

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi Dima, On 2018-09-02, Dima Pasechnik wrote: > I wonder what kind of overflow you get in Singular - is it related to > exponents being too small to incorporate your weights? No. Quite simply the elements of an intvec in Singular have to be at most 2147483647, but the coefficients of the first

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi! Since this post summarises replies to various posts in this thread and to an off-list message, I am making this a reply to the top of the thread. Objective: As a *small* part of some group cohomology computations, I need to compute the first Hilbert series of certain homogeneous ideals in gra

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-02 Thread Simon King
Hi Dima, On 2018-09-02, Dima Pasechnik wrote: > Frobby gives you the Hilbert function with N^n-grading, with all weights of > the variables x_j being 1. > I may be saying something silly, but isn't substituting x_j |-> x_j^{w_j} > for weights w_j of x_j gives you the function you need (making

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-01 Thread Simon King
Hi Dima, On 2018-09-01, Dima Pasechnik wrote: > Sage does not need that broken and obsolete package, it can talk to an > instance of Macaulay2 (usually called M2) > in the PATH. See > http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/macaulay2.html I tried to find out how to

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-01 Thread Simon King
Hi Dima, On 2018-09-01, Dima Pasechnik wrote: > Did you check that > http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/frobby.html#sage.interfaces.frobby.Frobby.hilbert > doesn't do what you need? Two questions: - The docs say: "Use the -univariate option to get the univariate

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-01 Thread Simon King
PPS: On 2018-09-01, Simon King wrote: > A user called Tomer has contacted me off-list and pointed to a CoCoALib > interface > (Trac #25707); I didn't know that such (experimental) interface exists. CoCoA > is > well known for efficient Hilbert series computations. "sa

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-01 Thread Simon King
PS: On 2018-09-01, Dima Pasechnik wrote: >> > On 2018-08-29, Dima Pasechnik > wrote: >> >> I think this machinery is much better implemented in Macaulay2. >> > >> > I'll have a look, thank you! >> >> There is an experimental old-style Macaulay2 package. Is it reliable? >> > > I'd expect it t

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-01 Thread Simon King
Hi Dima, On 2018-09-01, Dima Pasechnik wrote: > On Saturday, September 1, 2018 at 8:24:37 PM UTC+3, Simon King wrote: > I'd expect it to be in Macaulay2 core, not in a package. > > Did you check that > http://doc.sagemath.org/html/en/reference/interfaces/sage/in

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-09-01 Thread Simon King
On 2018-08-29, Simon King wrote: > Hi Dima, > > On 2018-08-29, Dima Pasechnik wrote: >> I think this machinery is much better implemented in Macaulay2. > > I'll have a look, thank you! There is an experimental old-style Macaulay2 package. Is it reliable? Best regard

Re: [sage-devel] Re: Tools to compute Hilbert Poincaré series

2018-08-29 Thread Simon King
Hi Travis, On 2018-08-28, Travis Scrimshaw wrote: > You might find this useful: > > https://stackoverflow.com/questions/3323001/what-is-the-maximum-recursion-depth-in-python-and-how-to-increase-it Thank you! But I suppose it is better to reimplement the recursion by a loop. I did already, and it

Re: [sage-devel] Tools to compute Hilbert Poincaré series

2018-08-29 Thread Simon King
Hi Dima, On 2018-08-29, Dima Pasechnik wrote: > I think this machinery is much better implemented in Macaulay2. I'll have a look, thank you! For now, I did implement something myself: Based on Singular, but all manipulations of integer polynomials is done in Sage. The question is if I should pu

<    1   2   3   4   5   6   7   8   9   10   >