Hi Dima, On 2018-12-26, Dima Pasechnik <dimp...@gmail.com> 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,3),(2,5),(4,7),(6,8)) ] ) >> but it fails. > > What are these permutations, type-wise? Are they Sage permutations, or > just strings? > The following works: > > sage: G=PermutationGroup( [ ((1,2),(3,8),(4,6),(5,7)), > ((1,3),(2,5),(4,7),(6,8)) ] ) > sage: libgap(G) > Group([ (1,2)(3,8)(4,6)(5,7), (1,3)(2,5)(4,7)(6,8) ])
Seems awkward to me. I expected that libgap.Group([((1,2),...]) would work with the same input that works for PermutationGroup. See #26960. > Isn't it there already? > > sage: libgap.set_global('bla',[1,2]) > sage: libgap.get_global('bla') > [ 1, 2 ] Is that a convenience method? So far, I was directly using DeclareGlobalVariable and InstallValue directly. So, I will start using it. Thanks for the pointer! > With IO package (which already seems to work with new libgap, just needs > a bit of extra work, hopefully done this week, see > https://trac.sagemath.org/ticket/26930) > https://www.gap-system.org/Manuals/pkg/io-4.5.4/doc/chap5.html#X81BBA46880EBFC7D > > (I never used it myself, so YMMV) A few years ago I tried to understand the IO package, but at that time couldn't get it to work at all. In addition, it would require a package in GAP, in addition to database_gap that the cohomology package relies on. But is it is something that could be part of gap_packages, and if the GAP documentation is clear enough (that's very often not the case, I often need to do experiments before understanding what is written in the GAP docs), it may be an option for *new* pickles. But it won't be useful for loading old pickles. Best regards, Simon -- 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.