[sage-support] Re: adding all gap packages

2016-09-10 Thread leif
Dima Pasechnik wrote:
> # WARNING -- if you add a package here, also add it to
> # the gap_reset_workspace() command in
> #/src/sage/interfaces/gap.py
> 
> but AFAICS not all of the GAP packages from the current optional
> gap_packages package are actually listed / treated there, no idea why.
> 
> 
> Otherwise it *may* perhaps help to delete all old GAP workspaces (by
> default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling
> gap_reset_workspace() again.
> 
> If I'm not mistaken, you could afterwards load the GAP packages you
> want, before calling gap_reset_workspace() once again, in order to make
> them part of your saved workspace.
> 
> 
> there are GAP packages that break libGAP (see my other message in this
> thread), so you cannot allow a GAP workspace with them to be used by libGAP.

Well, both seem to have separate workspaces (workspace-XXX vs.
libgap-workspace-XXX, not always "in sync", i.e., not always both
present), so it should be possible to exclude "critical" GAP packages
from libGAP's.

With some effort, it would IMHO also be possible to even automatically
blacklist packages (completely, or just for use with libGAP).


-leif

> This probably can be fixed, or libGAP can be made compatible with them
> (although the latter is perpetuating what is basically a GAP fork).
> 
> Dima  


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: adding all gap packages

2016-09-10 Thread multiscalar
These four packages seem to be working fine now. I just copied their source 
(+quagroup) into the "pkg" directory.
I also had to issue gap_reset_workspace() in sage. I'll do more extensive 
tests later, but for now all these packages seem to be fine.
Thanks for your help.


On Saturday, September 10, 2016 at 3:31:37 PM UTC-7, Dima Pasechnik wrote:
>
>
>
> On Saturday, September 10, 2016 at 10:07:29 PM UTC, multiscalar wrote:
>>
>> How can I tell if the package I need is safe to add or not?
>> These are the ones I'd like to add for now : gbnp,sla,corelg,repsn; are 
>> these safe?
>> if they are, what's the recommended procedure with sage-7.3?
>>
> The culprit is GAP's LoadDynamicModule (functionality that uses compiled 
> GAP kernel extensions), I think.
> Anything that does not use it, e.g. just pure GAP code (not dependent on 
> another package that
> does use LoadDynamicModule), or GAP code calling standalone executables 
> (like GRAPE does)
> should be OK.
>
> gbnp and repsn are OK, as it's just pure GAP code.
> sla, corelg (and quagroup, a package they require) also look like pure GAP 
> code.
>
> To install them, follow the standard GAP procedure to install such a 
> package, i.e. just unpack the corresponding
> archive into pkg/ subdirectory of the GAP install---and GAP in Sage is 
> installed in
> SAGE_ROOT/local/gap/latest/
>
> HTH,
> Dima
>
>
>
>
>  
>
>   
>
>>
>> On Saturday, September 10, 2016 at 2:41:35 PM UTC-7, Dima Pasechnik wrote:
>>>
>>>
>>>
>>> On Saturday, September 10, 2016 at 9:26:02 PM UTC, leif wrote:

 multiscalar wrote: 
 > Thanks, this is definitely simpler and it worked, but only about half 
 of 
 > the packages I use are included. How would I add the other ones? 

 Well, if you're a bit familiar with Sage / Python and the shell, take a 
 look at 

 build/pkgs/gap_packages/spkg-install (a shell script) 

 and 

 src/sage/interfaces/gap.py (especially gap_reset_workspace(), line 
 1486 ff.) 


 The wiki page you mentioned is probably outdated, as it was last 
 updated 
 in 2013. 


 The first file above starts with 

 # WARNING -- if you add a package here, also add it to 
 # the gap_reset_workspace() command in 
 #/src/sage/interfaces/gap.py 

 but AFAICS not all of the GAP packages from the current optional 
 gap_packages package are actually listed / treated there, no idea why. 


 Otherwise it *may* perhaps help to delete all old GAP workspaces (by 
 default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling 
 gap_reset_workspace() again. 

 If I'm not mistaken, you could afterwards load the GAP packages you 
 want, before calling gap_reset_workspace() once again, in order to make 
 them part of your saved workspace. 

>>>
>>> there are GAP packages that break libGAP (see my other message in this 
>>> thread), so you cannot allow a GAP workspace with them to be used by libGAP.
>>>
>>> This probably can be fixed, or libGAP can be made compatible with them 
>>> (although the latter is perpetuating what is basically a GAP fork).
>>>
>>> Dima  
>>>


 HTH, 

 -leif 


 > I think these days diskspace isn't much of an issue, it would be nice 
 if 
 > there are similar commands to install all accepted packages. 
 > 
 > On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona 
 wrote: 
 > 
 > I just do "sage -i gap_packages" (and "sage -i database_gap") 
 which 
 > sounds a lot simpler if it includes the packages you need. 
 > 
 > On 10 September 2016 at 18:36, multiscalar  > wrote: 
 > 
 > I just built sage-7.3 under Centos7. Everything seems to have 
 > worked well : 
 > sage comes up fine and a few simple calculations work. The 
 gap 
 > part on its won 
 > also comes up and works with simple tests, but there are no 
 > packages included. 
 > 
 > I'm now trying to add all the gap packages to the gap 
 component. 
 > I tried to 
 > follow the steps in : 
 > 
 >  https://wiki.sagemath.org/InstallingGapPackages 
 >  
 > 
 > The gap version in sage-7.3 is 4r8p3 which is one version 
 older 
 > than the latest gap. 
 > To play it safe I downloaded the version that matches sage 
 and 
 > expanded it in a temporary 
 > directory. I then started sage shell : 
 > 
 >  sage -sh 
 > 
 > and copied the contents of the "pkg" subdirectory from the 
 > temporary area to the sage 
 > area (sage/local/gap/latest/pkg/). I built a couple of 
 the 
 > 

[sage-support] Re: adding all gap packages

2016-09-10 Thread Dima Pasechnik


On Saturday, September 10, 2016 at 10:07:29 PM UTC, multiscalar wrote:
>
> How can I tell if the package I need is safe to add or not?
> These are the ones I'd like to add for now : gbnp,sla,corelg,repsn; are 
> these safe?
> if they are, what's the recommended procedure with sage-7.3?
>
The culprit is GAP's LoadDynamicModule (functionality that uses compiled 
GAP kernel extensions), I think.
Anything that does not use it, e.g. just pure GAP code (not dependent on 
another package that
does use LoadDynamicModule), or GAP code calling standalone executables 
(like GRAPE does)
should be OK.

gbnp and repsn are OK, as it's just pure GAP code.
sla, corelg (and quagroup, a package they require) also look like pure GAP 
code.

To install them, follow the standard GAP procedure to install such a 
package, i.e. just unpack the corresponding
archive into pkg/ subdirectory of the GAP install---and GAP in Sage is 
installed in
SAGE_ROOT/local/gap/latest/

HTH,
Dima




 

  

>
> On Saturday, September 10, 2016 at 2:41:35 PM UTC-7, Dima Pasechnik wrote:
>>
>>
>>
>> On Saturday, September 10, 2016 at 9:26:02 PM UTC, leif wrote:
>>>
>>> multiscalar wrote: 
>>> > Thanks, this is definitely simpler and it worked, but only about half 
>>> of 
>>> > the packages I use are included. How would I add the other ones? 
>>>
>>> Well, if you're a bit familiar with Sage / Python and the shell, take a 
>>> look at 
>>>
>>> build/pkgs/gap_packages/spkg-install (a shell script) 
>>>
>>> and 
>>>
>>> src/sage/interfaces/gap.py (especially gap_reset_workspace(), line 
>>> 1486 ff.) 
>>>
>>>
>>> The wiki page you mentioned is probably outdated, as it was last updated 
>>> in 2013. 
>>>
>>>
>>> The first file above starts with 
>>>
>>> # WARNING -- if you add a package here, also add it to 
>>> # the gap_reset_workspace() command in 
>>> #/src/sage/interfaces/gap.py 
>>>
>>> but AFAICS not all of the GAP packages from the current optional 
>>> gap_packages package are actually listed / treated there, no idea why. 
>>>
>>>
>>> Otherwise it *may* perhaps help to delete all old GAP workspaces (by 
>>> default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling 
>>> gap_reset_workspace() again. 
>>>
>>> If I'm not mistaken, you could afterwards load the GAP packages you 
>>> want, before calling gap_reset_workspace() once again, in order to make 
>>> them part of your saved workspace. 
>>>
>>
>> there are GAP packages that break libGAP (see my other message in this 
>> thread), so you cannot allow a GAP workspace with them to be used by libGAP.
>>
>> This probably can be fixed, or libGAP can be made compatible with them 
>> (although the latter is perpetuating what is basically a GAP fork).
>>
>> Dima  
>>
>>>
>>>
>>> HTH, 
>>>
>>> -leif 
>>>
>>>
>>> > I think these days diskspace isn't much of an issue, it would be nice 
>>> if 
>>> > there are similar commands to install all accepted packages. 
>>> > 
>>> > On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona 
>>> wrote: 
>>> > 
>>> > I just do "sage -i gap_packages" (and "sage -i database_gap") 
>>> which 
>>> > sounds a lot simpler if it includes the packages you need. 
>>> > 
>>> > On 10 September 2016 at 18:36, multiscalar >> > > wrote: 
>>> > 
>>> > I just built sage-7.3 under Centos7. Everything seems to have 
>>> > worked well : 
>>> > sage comes up fine and a few simple calculations work. The gap 
>>> > part on its won 
>>> > also comes up and works with simple tests, but there are no 
>>> > packages included. 
>>> > 
>>> > I'm now trying to add all the gap packages to the gap 
>>> component. 
>>> > I tried to 
>>> > follow the steps in : 
>>> > 
>>> >  https://wiki.sagemath.org/InstallingGapPackages 
>>> >  
>>> > 
>>> > The gap version in sage-7.3 is 4r8p3 which is one version 
>>> older 
>>> > than the latest gap. 
>>> > To play it safe I downloaded the version that matches sage and 
>>> > expanded it in a temporary 
>>> > directory. I then started sage shell : 
>>> > 
>>> >  sage -sh 
>>> > 
>>> > and copied the contents of the "pkg" subdirectory from the 
>>> > temporary area to the sage 
>>> > area (sage/local/gap/latest/pkg/). I built a couple of the 
>>> > packages and that worked 
>>> > fine. I then exited the sage shell. 
>>> > 
>>> > Following the instructions I then called sage and typed : 
>>> > 
>>> > gap_reset_workspace() 
>>> > 
>>> > I got a "WARNING : this should never happen" and it seems that 
>>> > sage got stuck somewhere. 
>>> > Also calling the gap on its own shows that the package 
>>> > installation didn't work. 
>>> > 
>>> > I think this shouldn't be too hard to fix, but I'm out of 
>>> ideas. 
>>> > 

[sage-support] Re: adding all gap packages

2016-09-10 Thread multiscalar
How can I tell if the package I need is safe to add or not?
These are the ones I'd like to add for now : gbnp,sla,corelg,repsn; are 
these safe?
if they are, what's the recommended procedure with sage-7.3?

On Saturday, September 10, 2016 at 2:41:35 PM UTC-7, Dima Pasechnik wrote:
>
>
>
> On Saturday, September 10, 2016 at 9:26:02 PM UTC, leif wrote:
>>
>> multiscalar wrote: 
>> > Thanks, this is definitely simpler and it worked, but only about half 
>> of 
>> > the packages I use are included. How would I add the other ones? 
>>
>> Well, if you're a bit familiar with Sage / Python and the shell, take a 
>> look at 
>>
>> build/pkgs/gap_packages/spkg-install (a shell script) 
>>
>> and 
>>
>> src/sage/interfaces/gap.py (especially gap_reset_workspace(), line 
>> 1486 ff.) 
>>
>>
>> The wiki page you mentioned is probably outdated, as it was last updated 
>> in 2013. 
>>
>>
>> The first file above starts with 
>>
>> # WARNING -- if you add a package here, also add it to 
>> # the gap_reset_workspace() command in 
>> #/src/sage/interfaces/gap.py 
>>
>> but AFAICS not all of the GAP packages from the current optional 
>> gap_packages package are actually listed / treated there, no idea why. 
>>
>>
>> Otherwise it *may* perhaps help to delete all old GAP workspaces (by 
>> default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling 
>> gap_reset_workspace() again. 
>>
>> If I'm not mistaken, you could afterwards load the GAP packages you 
>> want, before calling gap_reset_workspace() once again, in order to make 
>> them part of your saved workspace. 
>>
>
> there are GAP packages that break libGAP (see my other message in this 
> thread), so you cannot allow a GAP workspace with them to be used by libGAP.
>
> This probably can be fixed, or libGAP can be made compatible with them 
> (although the latter is perpetuating what is basically a GAP fork).
>
> Dima  
>
>>
>>
>> HTH, 
>>
>> -leif 
>>
>>
>> > I think these days diskspace isn't much of an issue, it would be nice 
>> if 
>> > there are similar commands to install all accepted packages. 
>> > 
>> > On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona 
>> wrote: 
>> > 
>> > I just do "sage -i gap_packages" (and "sage -i database_gap") which 
>> > sounds a lot simpler if it includes the packages you need. 
>> > 
>> > On 10 September 2016 at 18:36, multiscalar > > > wrote: 
>> > 
>> > I just built sage-7.3 under Centos7. Everything seems to have 
>> > worked well : 
>> > sage comes up fine and a few simple calculations work. The gap 
>> > part on its won 
>> > also comes up and works with simple tests, but there are no 
>> > packages included. 
>> > 
>> > I'm now trying to add all the gap packages to the gap 
>> component. 
>> > I tried to 
>> > follow the steps in : 
>> > 
>> >  https://wiki.sagemath.org/InstallingGapPackages 
>> >  
>> > 
>> > The gap version in sage-7.3 is 4r8p3 which is one version older 
>> > than the latest gap. 
>> > To play it safe I downloaded the version that matches sage and 
>> > expanded it in a temporary 
>> > directory. I then started sage shell : 
>> > 
>> >  sage -sh 
>> > 
>> > and copied the contents of the "pkg" subdirectory from the 
>> > temporary area to the sage 
>> > area (sage/local/gap/latest/pkg/). I built a couple of the 
>> > packages and that worked 
>> > fine. I then exited the sage shell. 
>> > 
>> > Following the instructions I then called sage and typed : 
>> > 
>> > gap_reset_workspace() 
>> > 
>> > I got a "WARNING : this should never happen" and it seems that 
>> > sage got stuck somewhere. 
>> > Also calling the gap on its own shows that the package 
>> > installation didn't work. 
>> > 
>> > I think this shouldn't be too hard to fix, but I'm out of 
>> ideas. 
>> > 
>> > Thanks for your help. 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Easy way to combine fractions in Sage?

2016-09-10 Thread leif
saad khalid wrote:
> In mathematica, there is the function "together" which combines
> fractions by giving them a common denominator and then cancels out the
> factors. It is shown here:
> https://reference.wolfram.com/language/ref/Together.html
> 
> In Sage, I would like to do something similar. I just want to do
> |
> A,B =var("A,B")
> A/3+B/2
> |
> 
> I want the output to be (2A + 3B)/6, but instead it's just outputing
> what I input. Does Sage have any function that works like "together"
> does in mathematica? Thanks!

Well, not sure what you want to do with the result, but there's for example

sage: (A/3 + B/2).numerator_denominator()
(2*A + 3*B, 6)

If you just want to *see* the common "denominator" and factors, simply
taking the reciprocal 1/(A/3 + B/2) (aka ~(...) in Sage) might be
convenient as well... :-)

But I bet others will have better suggestions.


-leif


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: adding all gap packages

2016-09-10 Thread Dima Pasechnik


On Saturday, September 10, 2016 at 9:26:02 PM UTC, leif wrote:
>
> multiscalar wrote: 
> > Thanks, this is definitely simpler and it worked, but only about half of 
> > the packages I use are included. How would I add the other ones? 
>
> Well, if you're a bit familiar with Sage / Python and the shell, take a 
> look at 
>
> build/pkgs/gap_packages/spkg-install (a shell script) 
>
> and 
>
> src/sage/interfaces/gap.py (especially gap_reset_workspace(), line 
> 1486 ff.) 
>
>
> The wiki page you mentioned is probably outdated, as it was last updated 
> in 2013. 
>
>
> The first file above starts with 
>
> # WARNING -- if you add a package here, also add it to 
> # the gap_reset_workspace() command in 
> #/src/sage/interfaces/gap.py 
>
> but AFAICS not all of the GAP packages from the current optional 
> gap_packages package are actually listed / treated there, no idea why. 
>
>
> Otherwise it *may* perhaps help to delete all old GAP workspaces (by 
> default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling 
> gap_reset_workspace() again. 
>
> If I'm not mistaken, you could afterwards load the GAP packages you 
> want, before calling gap_reset_workspace() once again, in order to make 
> them part of your saved workspace. 
>

there are GAP packages that break libGAP (see my other message in this 
thread), so you cannot allow a GAP workspace with them to be used by libGAP.

This probably can be fixed, or libGAP can be made compatible with them 
(although the latter is perpetuating what is basically a GAP fork).

Dima  

>
>
> HTH, 
>
> -leif 
>
>
> > I think these days diskspace isn't much of an issue, it would be nice if 
> > there are similar commands to install all accepted packages. 
> > 
> > On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona 
> wrote: 
> > 
> > I just do "sage -i gap_packages" (and "sage -i database_gap") which 
> > sounds a lot simpler if it includes the packages you need. 
> > 
> > On 10 September 2016 at 18:36, multiscalar  > > wrote: 
> > 
> > I just built sage-7.3 under Centos7. Everything seems to have 
> > worked well : 
> > sage comes up fine and a few simple calculations work. The gap 
> > part on its won 
> > also comes up and works with simple tests, but there are no 
> > packages included. 
> > 
> > I'm now trying to add all the gap packages to the gap component. 
> > I tried to 
> > follow the steps in : 
> > 
> >  https://wiki.sagemath.org/InstallingGapPackages 
> >  
> > 
> > The gap version in sage-7.3 is 4r8p3 which is one version older 
> > than the latest gap. 
> > To play it safe I downloaded the version that matches sage and 
> > expanded it in a temporary 
> > directory. I then started sage shell : 
> > 
> >  sage -sh 
> > 
> > and copied the contents of the "pkg" subdirectory from the 
> > temporary area to the sage 
> > area (sage/local/gap/latest/pkg/). I built a couple of the 
> > packages and that worked 
> > fine. I then exited the sage shell. 
> > 
> > Following the instructions I then called sage and typed : 
> > 
> > gap_reset_workspace() 
> > 
> > I got a "WARNING : this should never happen" and it seems that 
> > sage got stuck somewhere. 
> > Also calling the gap on its own shows that the package 
> > installation didn't work. 
> > 
> > I think this shouldn't be too hard to fix, but I'm out of ideas. 
> > 
> > Thanks for your help. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] adding all gap packages

2016-09-10 Thread Dima Pasechnik
This is not a good idea to install all GAP packages, if you don't want to 
break your Sage install.
Not all GAP packages are compatible with libGAP (namely, ones that use 
GAP's dynamic loaded modules, e.g. IO); that is, installing them will break 
libGAP (and everything that uses it in Sage, which is quite a bit).

See 
https://github.com/OpenDreamKit/OpenDreamKit/issues/93#issuecomment-244484261
and https://trac.sagemath.org/ticket/20673

Once a GAP workspace with IO or another package like this is saved, it 
won't load properly into libGAP,
wrecking havoc...

On the other hand there are lots of GAP packages that are safe to install 
in this sense.

Dima


On Saturday, September 10, 2016 at 8:46:52 PM UTC, multiscalar wrote:
>
> Thanks, this is definitely simpler and it worked, but only about half of 
> the packages I use are included. How would I add the other ones?
> I think these days diskspace isn't much of an issue, it would be nice if 
> there are similar commands to install all accepted packages.
>
> On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona wrote:
>>
>> I just do "sage -i gap_packages" (and "sage -i database_gap") which 
>> sounds a lot simpler if it includes the packages you need.
>>
>> On 10 September 2016 at 18:36, multiscalar  wrote:
>>
>>> I just built sage-7.3 under Centos7. Everything seems to have worked 
>>> well :
>>> sage comes up fine and a few simple calculations work. The gap part on 
>>> its won
>>> also comes up and works with simple tests, but there are no packages 
>>> included.
>>>
>>> I'm now trying to add all the gap packages to the gap component. I tried 
>>> to
>>> follow the steps in :
>>>
>>>  https://wiki.sagemath.org/InstallingGapPackages
>>>
>>> The gap version in sage-7.3 is 4r8p3 which is one version older than the 
>>> latest gap.
>>> To play it safe I downloaded the version that matches sage and expanded 
>>> it in a temporary
>>> directory. I then started sage shell :
>>>
>>>  sage -sh
>>>
>>> and copied the contents of the "pkg" subdirectory from the temporary 
>>> area to the sage
>>> area (sage/local/gap/latest/pkg/). I built a couple of the packages 
>>> and that worked
>>> fine. I then exited the sage shell.
>>>
>>> Following the instructions I then called sage and typed :
>>>
>>> gap_reset_workspace() 
>>>
>>> I got a "WARNING : this should never happen" and it seems that sage got 
>>> stuck somewhere.
>>> Also calling the gap on its own shows that the package installation 
>>> didn't work.
>>>
>>> I think this shouldn't be too hard to fix, but I'm out of ideas.
>>>
>>> Thanks for your help.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-support...@googlegroups.com.
>>> To post to this group, send email to sage-s...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/sage-support.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: adding all gap packages

2016-09-10 Thread leif
multiscalar wrote:
> Thanks, this is definitely simpler and it worked, but only about half of
> the packages I use are included. How would I add the other ones?

Well, if you're a bit familiar with Sage / Python and the shell, take a
look at

build/pkgs/gap_packages/spkg-install (a shell script)

and

src/sage/interfaces/gap.py (especially gap_reset_workspace(), line
1486 ff.)


The wiki page you mentioned is probably outdated, as it was last updated
in 2013.


The first file above starts with

# WARNING -- if you add a package here, also add it to
# the gap_reset_workspace() command in
#/src/sage/interfaces/gap.py

but AFAICS not all of the GAP packages from the current optional
gap_packages package are actually listed / treated there, no idea why.


Otherwise it *may* perhaps help to delete all old GAP workspaces (by
default in $HOME/.sage/gap/) *before* (re)starting Sage, then calling
gap_reset_workspace() again.

If I'm not mistaken, you could afterwards load the GAP packages you
want, before calling gap_reset_workspace() once again, in order to make
them part of your saved workspace.


HTH,

-leif


> I think these days diskspace isn't much of an issue, it would be nice if
> there are similar commands to install all accepted packages.
> 
> On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona wrote:
> 
> I just do "sage -i gap_packages" (and "sage -i database_gap") which
> sounds a lot simpler if it includes the packages you need.
> 
> On 10 September 2016 at 18:36, multiscalar  > wrote:
> 
> I just built sage-7.3 under Centos7. Everything seems to have
> worked well :
> sage comes up fine and a few simple calculations work. The gap
> part on its won
> also comes up and works with simple tests, but there are no
> packages included.
> 
> I'm now trying to add all the gap packages to the gap component.
> I tried to
> follow the steps in :
> 
>  https://wiki.sagemath.org/InstallingGapPackages
> 
> 
> The gap version in sage-7.3 is 4r8p3 which is one version older
> than the latest gap.
> To play it safe I downloaded the version that matches sage and
> expanded it in a temporary
> directory. I then started sage shell :
> 
>  sage -sh
> 
> and copied the contents of the "pkg" subdirectory from the
> temporary area to the sage
> area (sage/local/gap/latest/pkg/). I built a couple of the
> packages and that worked
> fine. I then exited the sage shell.
> 
> Following the instructions I then called sage and typed :
> 
> gap_reset_workspace() 
> 
> I got a "WARNING : this should never happen" and it seems that
> sage got stuck somewhere.
> Also calling the gap on its own shows that the package
> installation didn't work.
> 
> I think this shouldn't be too hard to fix, but I'm out of ideas.
> 
> Thanks for your help.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] linear solutions

2016-09-10 Thread Michael Orlitzky
On 09/10/2016 04:41 PM, Anton Sherwood wrote:
> I haven't guessed the right keywords.  How do I solve a set of linear 
> equations in which the coefficients are symbolic expressions like 
> a^2-sqrt(b)?
> 

Try creating vectors/matrices over the symbolic ring "SR", and then use
solve_left or solve_right. For example,

  sage: a,b = SR.var('a,b',domain='real')
  sage: A = matrix(SR,[[a+b, a-b],[a-b^2,a+b^2]])
  sage: z = vector(SR,[1,2])
  sage: A.solve_right(z)
  (-(a - b)*((b^2 - a)/(a + b) + 2)/((b^2 + (b^2 - a)*(a - b)/(a + b) +
  a)*(a + b)) + 1/(a + b), ((b^2 - a)/(a + b) + 2)/(b^2 + (b^2 - a)*(a
  - b)/(a + b) + a))


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Easy way to combine fractions in Sage?

2016-09-10 Thread saad khalid
In mathematica, there is the function "together" which combines fractions 
by giving them a common denominator and then cancels out the factors. It is 
shown here:
https://reference.wolfram.com/language/ref/Together.html

In Sage, I would like to do something similar. I just want to do 
A,B = var("A,B")
A/3 + B/2

I want the output to be (2A + 3B)/6, but instead it's just outputing what I 
input. Does Sage have any function that works like "together" does in 
mathematica? Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] adding all gap packages

2016-09-10 Thread multiscalar
Thanks, this is definitely simpler and it worked, but only about half of 
the packages I use are included. How would I add the other ones?
I think these days diskspace isn't much of an issue, it would be nice if 
there are similar commands to install all accepted packages.

On Saturday, September 10, 2016 at 11:46:33 AM UTC-7, John Cremona wrote:
>
> I just do "sage -i gap_packages" (and "sage -i database_gap") which sounds 
> a lot simpler if it includes the packages you need.
>
> On 10 September 2016 at 18:36, multiscalar  > wrote:
>
>> I just built sage-7.3 under Centos7. Everything seems to have worked well 
>> :
>> sage comes up fine and a few simple calculations work. The gap part on 
>> its won
>> also comes up and works with simple tests, but there are no packages 
>> included.
>>
>> I'm now trying to add all the gap packages to the gap component. I tried 
>> to
>> follow the steps in :
>>
>>  https://wiki.sagemath.org/InstallingGapPackages
>>
>> The gap version in sage-7.3 is 4r8p3 which is one version older than the 
>> latest gap.
>> To play it safe I downloaded the version that matches sage and expanded 
>> it in a temporary
>> directory. I then started sage shell :
>>
>>  sage -sh
>>
>> and copied the contents of the "pkg" subdirectory from the temporary area 
>> to the sage
>> area (sage/local/gap/latest/pkg/). I built a couple of the packages 
>> and that worked
>> fine. I then exited the sage shell.
>>
>> Following the instructions I then called sage and typed :
>>
>> gap_reset_workspace() 
>>
>> I got a "WARNING : this should never happen" and it seems that sage got 
>> stuck somewhere.
>> Also calling the gap on its own shows that the package installation 
>> didn't work.
>>
>> I think this shouldn't be too hard to fix, but I'm out of ideas.
>>
>> Thanks for your help.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com .
>> To post to this group, send email to sage-s...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] linear solutions

2016-09-10 Thread Anton Sherwood
I haven't guessed the right keywords.  How do I solve a set of linear 
equations in which the coefficients are symbolic expressions like 
a^2-sqrt(b)?


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] adding all gap packages

2016-09-10 Thread John Cremona
I just do "sage -i gap_packages" (and "sage -i database_gap") which sounds
a lot simpler if it includes the packages you need.

On 10 September 2016 at 18:36, multiscalar  wrote:

> I just built sage-7.3 under Centos7. Everything seems to have worked well :
> sage comes up fine and a few simple calculations work. The gap part on its
> won
> also comes up and works with simple tests, but there are no packages
> included.
>
> I'm now trying to add all the gap packages to the gap component. I tried to
> follow the steps in :
>
>  https://wiki.sagemath.org/InstallingGapPackages
>
> The gap version in sage-7.3 is 4r8p3 which is one version older than the
> latest gap.
> To play it safe I downloaded the version that matches sage and expanded it
> in a temporary
> directory. I then started sage shell :
>
>  sage -sh
>
> and copied the contents of the "pkg" subdirectory from the temporary area
> to the sage
> area (sage/local/gap/latest/pkg/). I built a couple of the packages
> and that worked
> fine. I then exited the sage shell.
>
> Following the instructions I then called sage and typed :
>
> gap_reset_workspace()
>
> I got a "WARNING : this should never happen" and it seems that sage got
> stuck somewhere.
> Also calling the gap on its own shows that the package installation didn't
> work.
>
> I think this shouldn't be too hard to fix, but I'm out of ideas.
>
> Thanks for your help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] adding all gap packages

2016-09-10 Thread multiscalar
I just built sage-7.3 under Centos7. Everything seems to have worked well :
sage comes up fine and a few simple calculations work. The gap part on its 
won
also comes up and works with simple tests, but there are no packages 
included.

I'm now trying to add all the gap packages to the gap component. I tried to
follow the steps in :

 https://wiki.sagemath.org/InstallingGapPackages

The gap version in sage-7.3 is 4r8p3 which is one version older than the 
latest gap.
To play it safe I downloaded the version that matches sage and expanded it 
in a temporary
directory. I then started sage shell :

 sage -sh

and copied the contents of the "pkg" subdirectory from the temporary area 
to the sage
area (sage/local/gap/latest/pkg/). I built a couple of the packages and 
that worked
fine. I then exited the sage shell.

Following the instructions I then called sage and typed :

gap_reset_workspace() 

I got a "WARNING : this should never happen" and it seems that sage got 
stuck somewhere.
Also calling the gap on its own shows that the package installation didn't 
work.

I think this shouldn't be too hard to fix, but I'm out of ideas.

Thanks for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.